From eb07990f4c4fbadd8b4b9dc7099fd0ac43411b75 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Fri, 16 Dec 2022 13:33:18 +0000 Subject: [PATCH] More template work --- RIGS/templates/event_detail.html | 10 ++++++++-- RIGS/templates/partials/event_detail_buttons.html | 2 -- RIGS/templates/partials/item_table.html | 2 +- RIGS/templates/subhire_detail.html | 11 +++++------ 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/RIGS/templates/event_detail.html b/RIGS/templates/event_detail.html index 3d83105b..4b7d7aa2 100644 --- a/RIGS/templates/event_detail.html +++ b/RIGS/templates/event_detail.html @@ -45,9 +45,15 @@

{{ event.notes|markdown }}

{% endif %} -
- {% include 'partials/item_table.html' %} +

Event Items

+ {% include 'partials/item_table.html' %} + {% if event.subhire_set %} +

Associated Subhires

+ {% with event.subhire_set.all as events %} + {% include 'partials/event_table.html' %} + {%endwith%} + {% endif %} {% if not request.is_ajax and perms.RIGS.view_event %} diff --git a/RIGS/templates/partials/event_detail_buttons.html b/RIGS/templates/partials/event_detail_buttons.html index f04f20f8..ce033264 100644 --- a/RIGS/templates/partials/event_detail_buttons.html +++ b/RIGS/templates/partials/event_detail_buttons.html @@ -47,7 +47,5 @@ class="fas fa-pound-sign"> Invoice {% endif %} - - Subhire Insurance Form {% endif %} diff --git a/RIGS/templates/partials/item_table.html b/RIGS/templates/partials/item_table.html index 5e3dce46..5947dd88 100644 --- a/RIGS/templates/partials/item_table.html +++ b/RIGS/templates/partials/item_table.html @@ -15,7 +15,7 @@ {% endif %} diff --git a/RIGS/templates/subhire_detail.html b/RIGS/templates/subhire_detail.html index 29bc78c3..f5c723ec 100644 --- a/RIGS/templates/subhire_detail.html +++ b/RIGS/templates/subhire_detail.html @@ -46,14 +46,12 @@ -
+
Associated Events
-
- {% for event in object.events.all %} - {{event}} - {%endfor%} -
+ {% with object.events.all as events %} + {% include 'partials/event_table.html' %} + {%endwith%}
{% if not request.is_ajax and perms.RIGS.view_event %} @@ -69,5 +67,6 @@ {% if perms.RIGS.view_event %} {% include 'partials/last_edited.html' with target="event_history" %} {% endif %} + Open Event Page {% endblock %} {% endif %}