mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Compare commits
3 Commits
django5
...
be5afaf644
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be5afaf644 | ||
|
|
9244173533 | ||
|
|
b608eff54a |
@@ -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 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if event.can_check_in %}
|
||||
<div class="col-sm-12">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Crew Record</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Vehicle</th>
|
||||
<th scope="col">Start Time</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col">End Time</th>
|
||||
<th scope="col">{% if request.user.pk is event.mic.pk %}<a href="{% url 'event_checkin_override' event.pk %}" class="btn btn-sm btn-success"><span class="fas fa-plus"></span> Add</a>{% endif %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="crewmembers">
|
||||
{% for crew in object.crew.all %}
|
||||
<tr>
|
||||
<td>{{crew.person}}</td>
|
||||
<td>{{crew.vehicle|default:"None"}}</td>
|
||||
<td>{{crew.time}}</td>
|
||||
<td>{{crew.role}}</td>
|
||||
<td>{% if crew.end_time %}{{crew.end_time}}{% else %}<span class="text-success fas fa-clock" data-toggle="tooltip" title="This person is currently checked into this event"></span>{% endif %}</td>
|
||||
<td>{% 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%}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center bg-warning">Apparently this event happened by magic...</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'partials/crew_list.html' %}
|
||||
|
||||
{% if not request.is_ajax and perms.RIGS.view_event %}
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'partials/event_detail_buttons.html' %}
|
||||
|
||||
@@ -69,8 +69,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'partials/crew_list.html' with event=object.event %}
|
||||
</div>
|
||||
<div class="col-12 text-right">
|
||||
|
||||
<div class="col-12 text-right mt-4">
|
||||
{% button 'edit' url='ec_edit' pk=object.pk %}
|
||||
{% button 'view' url='event_detail' pk=object.pk text="Event" %}
|
||||
<a href="{% url 'event_pt' object.event.pk %}" class="btn btn-info"><span class="fas fa-paperclip"></span> <span
|
||||
|
||||
48
RIGS/templates/partials/crew_list.html
Normal file
48
RIGS/templates/partials/crew_list.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% load button from filters %}
|
||||
|
||||
{% if event.can_check_in %}
|
||||
<div class="col-sm-12">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Crew Record</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Vehicle</th>
|
||||
<th scope="col">Start Time</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col">End Time</th>
|
||||
<th scope="col">{% if request.user.pk is event.mic.pk %}<a
|
||||
href="{% url 'event_checkin_override' event.pk %}" class="btn btn-sm btn-success"><span
|
||||
class="fas fa-plus"></span> Add</a>{% endif %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="crewmembers">
|
||||
{% for crew in event.crew.all %}
|
||||
<tr>
|
||||
<td>{{crew.person}}</td>
|
||||
<td>{{crew.vehicle|default:"None"}}</td>
|
||||
<td>{{crew.time}}</td>
|
||||
<td>{{crew.role}}</td>
|
||||
<td>{% if crew.end_time %}
|
||||
{{crew.end_time}}
|
||||
{% else %}
|
||||
<span class="text-success fas fa-clock" data-toggle="tooltip"
|
||||
title="This person is currently checked into this event"></span>{% endif %}
|
||||
</td>
|
||||
<td>{% 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 %}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center bg-warning">Apparently this event happened by magic...</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user