mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-28 10:52: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()),
|
path('api/<str:model>/<int:pk>/', login_required(views.SecureAPIRequest.as_view()),
|
||||||
name="api_secure"),
|
name="api_secure"),
|
||||||
|
|
||||||
|
path('closemodal/', views.CloseModal.as_view(), name='closemodal'),
|
||||||
path('search_help/', views.SearchHelp.as_view(), name='search_help'),
|
path('search_help/', views.SearchHelp.as_view(), name='search_help'),
|
||||||
|
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
|
|||||||
@@ -163,3 +163,17 @@ class GenericListView(generic.ListView):
|
|||||||
|
|
||||||
class SearchHelp(generic.TemplateView):
|
class SearchHelp(generic.TemplateView):
|
||||||
template_name = 'search_help.html'
|
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 = [
|
urlpatterns = [
|
||||||
path('', login_required(views.Index.as_view()), name='index'),
|
path('', login_required(views.Index.as_view()), name='index'),
|
||||||
|
|
||||||
path('closemodal/', views.CloseModal.as_view(), name='closemodal'),
|
|
||||||
|
|
||||||
# People
|
# People
|
||||||
path('people/', permission_required_with_403('RIGS.view_person')(views.PersonList.as_view()),
|
path('people/', permission_required_with_403('RIGS.view_person')(views.PersonList.as_view()),
|
||||||
name='person_list'),
|
name='person_list'),
|
||||||
|
|||||||
@@ -41,20 +41,6 @@ class Index(generic.TemplateView):
|
|||||||
return context
|
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):
|
class PersonList(GenericListView):
|
||||||
template_name = 'person_list.html'
|
template_name = 'person_list.html'
|
||||||
model = models.Person
|
model = models.Person
|
||||||
|
|||||||
Reference in New Issue
Block a user