mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
257 lines
11 KiB
HTML
257 lines
11 KiB
HTML
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
|
{% block title %}{% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %} | {{object.name}}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row my-3 py-3">
|
|
{% if not request.is_ajax %}
|
|
<div class="col-sm-12">
|
|
<h1>
|
|
{% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %}
|
|
| {{ object.name }} {% if event.dry_hire %}<span class="badge badge-secondary">Dry Hire</span>{% endif %}
|
|
</h1>
|
|
</div>
|
|
{% if perms.RIGS.view_event %}
|
|
<div class="col-sm-12 text-right">
|
|
{% include 'event_detail_buttons.html' %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if object.is_rig and perms.RIGS.view_event %}
|
|
{# only need contact details for a rig #}
|
|
<div class="col-sm">
|
|
<div class="card card-default mb-3">
|
|
<div class="card-header">Contact Details</div>
|
|
<div class="card-body">
|
|
<dl class="row">
|
|
<dt class="col-sm-6">Person</dt>
|
|
<dd class="col-sm-6"
|
|
{% if object.person %}
|
|
<a href="{% url 'person_detail' object.person.pk %}" class="modal-href">
|
|
{{ object.person }}
|
|
</a>
|
|
{% endif %}
|
|
</dd>
|
|
<dt class="col-sm-6">Email</dt>
|
|
<dd class="col-sm-6">
|
|
<a href="mailto:{{object.person.email}}" target="_blank">
|
|
<span class="overflow-ellipsis">{{ object.person.email }}</span>
|
|
</a>
|
|
</dd>
|
|
<dt class="col-sm-6">Phone Number</dt>
|
|
<dd class="col-sm-6"><a href="tel:{{object.person.phone}}">{{ object.person.phone }}</a></dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
{% if event.organisation %}
|
|
<div class="card card-default">
|
|
<div class="card-header">Organisation</div>
|
|
<div class="card-body">
|
|
<dl class="row">
|
|
<dt class="col-sm-6">Organisation</dt>
|
|
<dd class="col-sm-6">
|
|
{% if object.organisation %}
|
|
<a href="{% url 'organisation_detail' object.organisation.pk %}" class="modal-href">
|
|
{{ object.organisation }}
|
|
</a>
|
|
{% endif %}
|
|
</dd>
|
|
<dt class="col-sm-6">Phone Number</dt>
|
|
<dd class="col-sm-6">
|
|
<a href="tel:{{object.person.phone}}">
|
|
{{ object.organisation.phone }}
|
|
</a>
|
|
</dd>
|
|
<dt class="col-sm-6">Has SU Account</dt>
|
|
<dd class="col-sm-6">{{ event.organisation.union_account|yesno|capfirst }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
<div class="col-sm">
|
|
<div class="card card-info">
|
|
<div class="card-header">Event Info</div>
|
|
<div class="card-body">
|
|
<dl class="row">
|
|
<dt class="col-sm-6">Event Venue</dt>
|
|
<dd class="col-sm-6">
|
|
{% if object.venue %}
|
|
<a href="{% url 'venue_detail' object.venue.pk %}" class="modal-href">
|
|
{{ object.venue }}
|
|
</a>
|
|
{% endif %}
|
|
</dd>
|
|
|
|
{% if event.is_rig %}
|
|
<dt class="col-sm-6">Event MIC</dt>
|
|
<dd class="col-sm-6">
|
|
{% if event.mic and perms.RIGS.view_profile %}
|
|
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
|
|
{{ event.mic.name }}
|
|
</a>
|
|
{% else %}
|
|
{{ event.mic.name }}
|
|
{% endif %}
|
|
</dd>
|
|
{% endif %}
|
|
|
|
<dt class="col-sm-6">Status</dt>
|
|
<dd class="col-sm-6">{{ event.get_status_display }}</dd>
|
|
|
|
<dd class="col-sm-12"> </dd>
|
|
|
|
{% if event.is_rig %}
|
|
<dt class="col-sm-6">Crew Meet</dt>
|
|
<dd class="col-sm-6">{{ event.meet_at|date:"D d M Y H:i"|default:"TBC" }}</dd>
|
|
<!---TODO<dd class="col-sm-6">{{ event.meet_info|default:"" }}</dd>--->
|
|
|
|
<dt class="col-sm-6">Access From</dt>
|
|
<dd class="col-sm-6">{{ event.access_at|date:"D d M Y H:i"|default:"TBC" }}</dd>
|
|
{% endif %}
|
|
|
|
<dt class="col-sm-6">Event Starts</dt>
|
|
<dd class="col-sm-6">{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
|
|
|
<dt class="col-sm-6">Event Ends</dt>
|
|
<dd class="col-sm-6">{{ event.end_date|date:"D d M Y" }} {{ event.end_time|date:"H:i" }}</dd>
|
|
|
|
<dd class="col-sm-12"> </dd>
|
|
|
|
<dt class="col-sm-6">Event Description</dt>
|
|
<dd class="dont-break-out col-sm-12">{{ event.description|linebreaksbr }}</dd>
|
|
|
|
<dd class="col-sm-12"> </dd>
|
|
|
|
<dt class="col-sm-6">Based On</dt>
|
|
<dd class="col-sm-6">
|
|
{% if object.based_on %}
|
|
<a href="{% url 'event_detail' pk=object.based_on.pk %}">
|
|
{% if object.based_on.is_rig %}N{{ object.based_on.pk|stringformat:"05d" }}{% else %}
|
|
{{ object.based_on.pk }}{% endif %}
|
|
{{ object.based_on.name }} {% if object.based_on.mic %}by {{ object.based_on.mic.name }}{% endif %}
|
|
</a>
|
|
{% endif %}
|
|
</dd>
|
|
|
|
{% if event.dry_hire %}
|
|
<dt class="col-sm-6">Checked In By</dt>
|
|
<dd class="col-sm-6">{{ object.checked_in_by.name }}</dd>
|
|
{% endif %}
|
|
|
|
{% if event.is_rig %}
|
|
<dt class="col-sm-6">Collected By</dt>
|
|
<dd class="col-sm-6">{{ object.collector }}</dd>
|
|
{% endif %}
|
|
|
|
{% if event.is_rig and not event.internal and perms.RIGS.view_event %}
|
|
<dd class="col-sm-12"> </dd>
|
|
<dt class="col-sm-6">PO</dt>
|
|
<dd class="col-sm-6">{{ object.purchase_order }}</dd>
|
|
{% endif %}
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if event.is_rig and event.internal and perms.RIGS.view_event %}
|
|
<div class="col-sm-12">
|
|
<div class="card card-default
|
|
{% if object.authorised %}
|
|
card-success
|
|
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
|
card-warning
|
|
{% elif event.auth_request_to %}
|
|
card-info
|
|
{% endif %}
|
|
">
|
|
<div class="card-header">Client Authorisation</div>
|
|
<div class="card-body">
|
|
<dl class="col-sm-6">
|
|
<dt>Authorisation Request</dt>
|
|
<dd>{{ object.auth_request_to|yesno:"Yes,No" }}</dd>
|
|
|
|
<dt>By</dt>
|
|
<dd>{{ object.auth_request_by }}</dd>
|
|
|
|
<dt>At</dt>
|
|
<dd>{{ object.auth_request_at|date:"D d M Y H:i"|default:"" }}</dd>
|
|
|
|
<dt>To</dt>
|
|
<dd>{{ object.auth_request_to }}</dd>
|
|
</dl>
|
|
<dd class="visible-xs"> </dd>
|
|
<dl class="col-sm-6">
|
|
<dt>Authorised</dt>
|
|
<dd>{{ object.authorised|yesno:"Yes,No" }}</dd>
|
|
|
|
<dt>Authorised by</dt>
|
|
<dd>
|
|
{% if object.authorisation %}
|
|
{{ object.authorisation.name }}
|
|
(<a href="mailto:{{ object.authorisation.email }}">{{ object.authorisation.email }}</a>)
|
|
{% endif %}
|
|
</dd>
|
|
|
|
<dt>Authorised at</dt>
|
|
<dd>{{ object.authorisation.last_edited_at|date:"D d M Y H:i" }}</dd>
|
|
|
|
<dt>Authorised amount</dt>
|
|
<dd>
|
|
{% if object.authorisation %}
|
|
£ {{ object.authorisation.amount|floatformat:"2" }}
|
|
{% endif %}
|
|
</dd>
|
|
|
|
<dt>Requested by</dt>
|
|
<dd>{{ object.authorisation.sent_by }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
{% endif %}
|
|
{% if not request.is_ajax and perms.RIGS.view_event %}
|
|
<div class="col-sm-12 text-right">
|
|
{% include 'event_detail_buttons.html' %}
|
|
</div>
|
|
{% endif %}
|
|
{% if event.is_rig %}
|
|
<div class="col-sm-12">
|
|
<div class="card card-default">
|
|
<div class="card-header">Event Details</div>
|
|
<div class="card-body">
|
|
{% if perms.RIGS.view_event %}
|
|
<div class="card bg-secondary">
|
|
<div class="card-header">Notes</div>
|
|
<div class="card-body">
|
|
<p class="dont-break-out">{{ event.notes|linebreaksbr }}</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<br>
|
|
{% include 'item_table.html' %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if not request.is_ajax and perms.RIGS.view_event %}
|
|
<div class="col-sm-12 text-right">
|
|
{% include 'event_detail_buttons.html' %}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if not request.is_ajax and perms.RIGS.view_event %}
|
|
<div class="col-sm-12 text-right">
|
|
{% include 'partials/last_edited.html' with target="event_history" %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% if request.is_ajax %}
|
|
{% block footer %}
|
|
{% if perms.RIGS.view_event %}
|
|
{% include 'partials/last_edited.html' with target="event_history" %}
|
|
{% endif %}
|
|
<a href="{% url 'event_detail' object.pk %}" class="btn btn-primary">Open Event Page <span class="fas fa-eye"></span></a>
|
|
{% endblock %}
|
|
{% endif %}
|