mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-31 04:12:15 +00:00
Merge branch 'master' into training
# Conflicts: # RIGS/templates/risk_assessment_form.html # templates/base.html
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
{% load static %}
|
||||
{% load invoices_waiting from filters %}
|
||||
{% load invoices_outstanding from filters %}
|
||||
{% load total_invoices_todo from filters %}
|
||||
|
||||
{% block titleheader %}
|
||||
<a class="navbar-brand" href="/">RIGS</a>
|
||||
<a class="navbar-brand" style="margin-left: auto; margin-right: auto;" href="/">RIGS</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block titleelements %}
|
||||
@@ -45,14 +47,17 @@
|
||||
{% endif %}
|
||||
{% if perms.RIGS.view_invoice %}
|
||||
<li class="nav-item dropdown">
|
||||
{% total_invoices_todo as todo %}
|
||||
{% invoices_waiting as waiting %}
|
||||
{% invoices_outstanding as outstanding %}
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownInvoices" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Invoices <span class="badge badge-danger badge-pill">{% invoices_waiting %}</span>
|
||||
Invoices <span class="badge {% if todo == 0 %}badge-success{% else %}badge-danger{% endif %} badge-pill">{{ todo }}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownInvoices">
|
||||
{% if perms.RIGS.add_invoice %}
|
||||
<a class="dropdown-item text-nowrap" href="{% url 'invoice_waiting' %}"><span class="fas fa-briefcase text-danger"></span> Waiting <span class="badge badge-danger badge-pill">{% invoices_waiting %}</span></a>
|
||||
<a class="dropdown-item text-nowrap" href="{% url 'invoice_waiting' %}"><span class="fas fa-briefcase text-danger"></span> Waiting <span class="badge {% if waiting == 0 %}badge-success{% else %}badge-danger{% endif %} badge-pill">{{ waiting }}</span></a>
|
||||
{% endif %}
|
||||
<a class="dropdown-item" href="{% url 'invoice_list' %}"><span class="fas fa-pound-sign text-warning"></span> Outstanding</a>
|
||||
<a class="dropdown-item" href="{% url 'invoice_list' %}"><span class="fas fa-pound-sign text-warning"></span> Outstanding <span class="badge {% if outstanding == 0 %}badge-success{% else %}badge-danger{% endif %} badge-pill">{{ outstanding }}</span></a>
|
||||
<a class="dropdown-item" href="{% url 'invoice_archive' %}"><span class="fas fa-book"></span> Archive</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -102,6 +102,10 @@
|
||||
<td>{{crew.role}}</td>
|
||||
<td>{{crew.end}}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="4" class="text-center bg-warning">Apparently this event happened by magic...</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -109,9 +113,27 @@
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Power {% include 'partials/event_size.html' with object=object.event.riskassessment %}</div>
|
||||
{% if object.event.riskassessment.event_size != 2 %}
|
||||
<div class="card-body">
|
||||
{% if object.event.riskassessment.event_size == 1 %}
|
||||
{% if event.riskassessment.event_size == 0 %}
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'rcds'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.rcds|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'supply_test'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.supply_test|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'earthing'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.earthing|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'pat'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.pat|yesnoi }}
|
||||
</dd>
|
||||
</dl>
|
||||
{% else %}
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'source_rcd'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
@@ -216,28 +238,8 @@
|
||||
</dl>
|
||||
<hr>
|
||||
{% include 'partials/ec_power_info.html' %}
|
||||
{% else %}
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'rcds'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.rcds|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'supply_test'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.supply_test|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'earthing'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.earthing|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'pat'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.pat|yesnoi }}
|
||||
</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-12 text-right">
|
||||
{% button 'edit' url='ec_edit' pk=object.pk %}
|
||||
|
||||
@@ -244,12 +244,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% elif event.riskassessment.event_size == 1 %}
|
||||
{% else %}
|
||||
<div class="row my-3" id="size-1">
|
||||
<div class="col-12">
|
||||
{% if event.riskassessment.event_size == 1 %}
|
||||
<div class="card border-warning">
|
||||
<div class="card-header">Electrical Checks <small>for ‘Medium’ TEC Events </small></div>
|
||||
<div class="card-body">
|
||||
{% else %}
|
||||
<div class="card border-danger">
|
||||
<div class="card-header">Electrical Checks <small>for ‘Large’ TEC Events</small></div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-danger"><strong>Here be dragons. Ensure you have appeased the Power Gods before continuing... (If you didn't check with a Supervisor, <em>you cannot continue your event!</em>)</strong></div>
|
||||
{% endif %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.source_rcd %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.labelling %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.earthing %}
|
||||
@@ -339,17 +346,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="row my-3" id="size-2">
|
||||
<div class="col-12">
|
||||
<div class="card border-danger">
|
||||
<div class="card-header">Electrical Checks <small>for ‘Large’ TEC Events</small></div>
|
||||
<div class="card-body">
|
||||
<p>Outside the scope of this assessment. <strong>I really hope you checked with a supervisor...</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm-12 text-right">
|
||||
|
||||
@@ -5,15 +5,13 @@
|
||||
<p>Hi {{ to_name|default:"there" }},</p>
|
||||
|
||||
<p><b>{{ request.user.get_full_name }}</b> has requested that you authorise <b>{{ object.display_id }}
|
||||
| {{ object.name }}</b>{% if not to_name %} on behalf of <b>{{ object.person.name }}</b>{% endif %}.</p>
|
||||
| {{ object.name }}</b>{% if not to_name %} on behalf of <b>{% if object.person %}{{ object.person.name }}{% else %}{{ object.organisation.name }}{% endif %}</b>{% endif %}.</p>
|
||||
|
||||
<p>
|
||||
Please find the link below to complete the event booking process.
|
||||
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
|
||||
Remember that only Presidents or Treasurers are allowed to sign off payments. You may need to forward
|
||||
this
|
||||
email on.
|
||||
{% endif %}
|
||||
Remember that only Presidents or Treasurers are allowed to sign off payments. You may need to forward
|
||||
this
|
||||
email on.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Hi {{ to_name|default:"there" }},
|
||||
|
||||
{{ request.user.get_full_name }} has requested that you authorise N{{ object.pk|stringformat:"05d" }}| {{ object.name }}{% if not to_name %} on behalf of {{ object.person.name }}{% endif %}.
|
||||
{{ request.user.get_full_name }} has requested that you authorise N{{ object.pk|stringformat:"05d" }}| {{ object.name }}{% if not to_name %} on behalf of {% if object.person %}{{ object.person.name }}{% else %}{{ object.organisation.name }}{% endif %}{% endif %}.
|
||||
|
||||
Please find the link below to complete the event booking process.
|
||||
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row py-4">
|
||||
<div class="col-sm-12 text-right px-0">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'event_detail' object.pk %}" class="btn btn-primary">Open Event Page <span class="fas fa-eye"></span></a>
|
||||
<a href="{% url 'event_detail' object.event.pk %}" class="btn btn-primary">Open Event Page <span class="fas fa-eye"></span></a>
|
||||
<a href="{% url 'invoice_delete' object.pk %}" class="btn btn-danger" title="Delete Invoice">
|
||||
<span class="fas fa-times"></span> <span
|
||||
class="d-none d-sm-inline">Delete</span>
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
<div class="col-sm-6">
|
||||
{% if event.person %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Contact Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-5">Person</dt>
|
||||
<dd class="col-sm-7">
|
||||
{% if event.person %}
|
||||
{{ event.person.name }}
|
||||
{% endif %}
|
||||
{{ event.person.name }}
|
||||
</dd>
|
||||
|
||||
{% if event.person.email %}
|
||||
<dt class="col-sm-5">Email</dt>
|
||||
<dd class="col-sm-7">
|
||||
<span class="overflow-ellipsis">{{ event.person.email }}</span>
|
||||
</dd>
|
||||
|
||||
{% endif %}
|
||||
{% if event.person.phone %}
|
||||
<dt class="col-sm-5">Phone Number</dt>
|
||||
<dd class="col-sm-7">{{ event.person.phone }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if event.organisation %}
|
||||
<div class="card mt-3">
|
||||
<div class="card">
|
||||
<div class="card-header">Organisation Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
@@ -29,9 +31,10 @@
|
||||
<dd class="col-sm-7">
|
||||
{{ event.organisation.name }}
|
||||
</dd>
|
||||
|
||||
{% if event.organisation.phone %}
|
||||
<dt class="col-sm-5">Phone Number</dt>
|
||||
<dd class="col-sm-7">{{ object.organisation.phone }}</dd>
|
||||
<dd class="col-sm-7">{{ event.organisation.phone }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,6 +48,6 @@
|
||||
<span class="d-none d-sm-inline">Invoice</span></a>
|
||||
{% endif %}
|
||||
|
||||
<a href="https://docs.google.com/forms/d/e/1FAIpQLSf-TBOuJZCTYc2L8DWdAaC3_Werq0ulsUs8-6G85I6pA9WVsg/viewform" class="btn btn-danger"><span class="fas fa-file-invoice-dollar"></span> Subhire Insurance Form</a>
|
||||
<a href="https://docs.google.com/forms/d/e/1FAIpQLSf-TBOuJZCTYc2L8DWdAaC3_Werq0ulsUs8-6G85I6pA9WVsg/viewform" class="btn btn-danger"><span class="fas fa-file-invoice-dollar"></span> <span class="d-none d-sm-inline">Subhire Insurance Form</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
<span class="badge badge-success">PO: {{ event.purchase_order }}</span>
|
||||
{% elif event.authorised %}
|
||||
<span class="badge badge-success">Authorisation: Complete <span class="fas fa-check"></span></span>
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
<span class="badge badge-warning"> Authorisation: Issue <span class="fas fa-exclamation-circle"></span></span>
|
||||
{% elif event.auth_request_to %}
|
||||
<span class="badge badge-info"> Authorisation: Sent <span class="fas fa-paper-plane"></span></span>
|
||||
{% else %}
|
||||
<span class="badge badge-danger">Authorisation: <span class="fas fa-times"></span></span>
|
||||
{% endif %}
|
||||
|
||||
@@ -67,9 +67,9 @@
|
||||
</h4>
|
||||
{% if event.is_rig and not event.cancelled %}
|
||||
<h5>
|
||||
{{ event.person.name }}
|
||||
<a href="{{ event.person.get_absolute_url }}">{{ event.person.name }}</a>
|
||||
{% if event.organisation %}
|
||||
for {{ event.organisation.name }}
|
||||
for <a href="{{ event.organisation.get_absolute_url }}">{{ event.organisation.name }}</a>
|
||||
{% endif %}
|
||||
</h5>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% block title %}Risk Assessment for Event N{{ object.event.pk|stringformat:"05d" }} {{ object.event.name }}{% endblock %}
|
||||
{% load help_text from filters %}
|
||||
{% load yesnoi from filters %}
|
||||
{% load linkornone from filters %}
|
||||
@@ -7,7 +6,6 @@
|
||||
{% block content %}
|
||||
<div class="row py-3">
|
||||
<div class="col-12">
|
||||
<h3>Risk Assessment for Event N{{ object.event.pk|stringformat:"05d" }} {{ object.event.name }}</h3>
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">General</div>
|
||||
<div class="card-body">
|
||||
@@ -97,58 +95,64 @@
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Site Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6">{{ object|help_text:'known_venue' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.known_venue|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'safe_loading'|safe }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.safe_loading|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'safe_storage' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.safe_storage|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'area_outside_of_control' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.area_outside_of_control|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'barrier_required' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.barrier_required|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'nonstandard_emergency_procedure' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.nonstandard_emergency_procedure|yesnoi:'invert' }}
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-12">
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Site Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'known_venue' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.known_venue|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'safe_loading'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.safe_loading|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'safe_storage' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.safe_storage|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'area_outside_of_control' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.area_outside_of_control|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'barrier_required' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.barrier_required|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'nonstandard_emergency_procedure' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.nonstandard_emergency_procedure|yesnoi:'invert' }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Structures</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6">{{ object|help_text:'special_structures' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.special_structures|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'suspended_structures' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.suspended_structures|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'persons_responsible_structures' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.persons_responsible_structures.name|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
<dt class="col-6">{{ object|help_text:'rigging_plan'|safe }}</dt>
|
||||
<dd class="col-6">
|
||||
{{ object.rigging_plan|linkornone }}
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="col-lg-6 col-12">
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Structures</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'special_structures' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.special_structures|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'suspended_structures' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.suspended_structures|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-12">{{ object|help_text:'persons_responsible_structures' }}</dt>
|
||||
<dd class="col-12">
|
||||
{{ object.persons_responsible_structures.name|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
<dt class="col-12">{{ object|help_text:'rigging_plan'|safe }}</dt>
|
||||
<dd class="col-12">
|
||||
{{ object.rigging_plan|linkornone|default:'N/A' }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user