mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Move closemodal into PyRIGS
This commit is contained in:
@@ -23,6 +23,7 @@ urlpatterns = [
|
||||
path('api/<str:model>/<int:pk>/', login_required(views.SecureAPIRequest.as_view()),
|
||||
name="api_secure"),
|
||||
|
||||
path('closemodal/', views.CloseModal.as_view(), name='closemodal'),
|
||||
path('search_help/', views.SearchHelp.as_view(), name='search_help'),
|
||||
|
||||
path('admin/', admin.site.urls),
|
||||
|
||||
@@ -163,3 +163,17 @@ class GenericListView(generic.ListView):
|
||||
|
||||
class SearchHelp(generic.TemplateView):
|
||||
template_name = 'search_help.html'
|
||||
|
||||
|
||||
"""
|
||||
Called from a modal window (e.g. when an item is submitted to an event/invoice).
|
||||
May optionally also include some javascript in a success message to cause a load of
|
||||
the new information onto the page.
|
||||
"""
|
||||
|
||||
|
||||
class CloseModal(generic.TemplateView):
|
||||
template_name = 'closemodal.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
return {'messages': messages.get_messages(self.request)}
|
||||
|
||||
@@ -12,8 +12,6 @@ from django.views.decorators.cache import cache_page
|
||||
urlpatterns = [
|
||||
path('', login_required(views.Index.as_view()), name='index'),
|
||||
|
||||
path('closemodal/', views.CloseModal.as_view(), name='closemodal'),
|
||||
|
||||
# People
|
||||
path('people/', permission_required_with_403('RIGS.view_person')(views.PersonList.as_view()),
|
||||
name='person_list'),
|
||||
|
||||
@@ -41,20 +41,6 @@ class Index(generic.TemplateView):
|
||||
return context
|
||||
|
||||
|
||||
"""
|
||||
Called from a modal window (e.g. when an item is submitted to an event/invoice).
|
||||
May optionally also include some javascript in a success message to cause a load of
|
||||
the new information onto the page.
|
||||
"""
|
||||
|
||||
|
||||
class CloseModal(generic.TemplateView):
|
||||
template_name = 'closemodal.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
return {'messages': messages.get_messages(self.request)}
|
||||
|
||||
|
||||
class PersonList(GenericListView):
|
||||
template_name = 'person_list.html'
|
||||
model = models.Person
|
||||
|
||||
Reference in New Issue
Block a user