From 99fdca6a2de2b8cfd687f8b78b1911465f156be2 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Fri, 13 Dec 2024 16:43:12 +0000 Subject: [PATCH] Show crew list on event checklist view (#613) * Split crew list into partial * Use new crew list partial on event checklist --- RIGS/templates/event_detail.html | 41 ++-------------- RIGS/templates/hs/event_checklist_detail.html | 5 +- RIGS/templates/partials/crew_list.html | 48 +++++++++++++++++++ 3 files changed, 55 insertions(+), 39 deletions(-) create mode 100644 RIGS/templates/partials/crew_list.html diff --git a/RIGS/templates/event_detail.html b/RIGS/templates/event_detail.html index 96296546..e70050da 100644 --- a/RIGS/templates/event_detail.html +++ b/RIGS/templates/event_detail.html @@ -1,7 +1,6 @@ {% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %} {% load markdown_tags %} -{% load button from filters %} {% load static %} {% block content %} @@ -57,43 +56,9 @@ - {% if event.can_check_in %} -
-
-
Crew Record
-
- - - - - - - - - - - - - {% for crew in object.crew.all %} - - - - - - - - - {% empty %} - - - - {% endfor %} - -
NameVehicleStart TimeRoleEnd Time{% if request.user.pk is event.mic.pk %} Add{% endif %}
{{crew.person}}{{crew.vehicle|default:"None"}}{{crew.time}}{{crew.role}}{% if crew.end_time %}{{crew.end_time}}{% else %}{% endif %}{% if crew.end_time %}{% if crew.person.pk == request.user.pk or event.mic.pk == request.user.pk %}{% button 'edit' 'edit_checkin' crew.pk clazz='btn-sm modal-href' %}{% endif %}{%endif%}
Apparently this event happened by magic...
-
-
- {% endif %} -
+ + {% include 'partials/crew_list.html' %} + {% if not request.is_ajax and perms.RIGS.view_event %}
{% include 'partials/event_detail_buttons.html' %} diff --git a/RIGS/templates/hs/event_checklist_detail.html b/RIGS/templates/hs/event_checklist_detail.html index 82e20020..21a37c03 100644 --- a/RIGS/templates/hs/event_checklist_detail.html +++ b/RIGS/templates/hs/event_checklist_detail.html @@ -69,8 +69,11 @@
+ + {% include 'partials/crew_list.html' with event=object.event %} -
+ + +{% endif %}