mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 05:52:15 +00:00
110 lines
8.3 KiB
HTML
110 lines
8.3 KiB
HTML
{% extends 'base_rigs.html' %}
|
|
{% load paginator from filters %}
|
|
{% load help_text from filters %}
|
|
{% load verbose_name from filters %}
|
|
|
|
{% block title %}Risk Assessment List{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<h2>Risk Assessment List</h2>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="table-responsive">
|
|
<table class="table mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Event</th>
|
|
{# mmm hax #}
|
|
{% if object_list.0 %}
|
|
<th scope="col" class="">{{ object_list.0|verbose_name:'nonstandard_equipment'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'nonstandard_use'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'contractors'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'other_companies'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'crew_fatigue'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'general_notes'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'big_power'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'power_mic'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'generators'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'other_companies_power'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'nonstandard_equipment_power'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'multiple_electrical_environments'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'power_notes'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'noise_monitoring'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'sound_notes'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'known_venue'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'safe_loading'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'safe_storage'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'area_outside_of_control'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'nonstandard_emergency_procedure'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'barrier_required'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'special_structures'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'persons_responsible_structures'|title }}</th>
|
|
<th scope="col">{{ object_list.0|verbose_name:'suspended_structures'|title }}</th>
|
|
<th scope="col"></th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for object in object_list %}
|
|
<tr>
|
|
{# General #}
|
|
<th scope="row" class="{% if object.reviewed_by %}bg-success{%endif%}"><a href="{% url 'event_detail' object.event.pk %}">N{{ object.event.pk|stringformat:"05d" }} {{ object.event.name }}</a></th>
|
|
<td class="{% if object.nonstandard_equipment%}bg-danger text-white{%endif%}">{{object.nonstandard_equipment|yesno|title}}</td>
|
|
<td class="{% if object.nonstandard_use%}bg-danger text-white{%endif%}">{{object.nonstandard_use|yesno|title}}</td>
|
|
<td class="{% if object.contractors%}bg-danger text-white{%endif%}">{{object.contractors|yesno|title}}</td>
|
|
<td class="{% if object.other_companies%}bg-danger text-white{%endif%}">{{object.other_companies|yesno|title}}</td>
|
|
<td class="{% if object.crew_fatigue%}bg-danger text-white{%endif%}">{{object.crew_fatigue|yesno|title}}</td>
|
|
<td><span class="text-truncate d-inline-block">{{ object.general_notes|default:'N/A'|linebreaks }}</span></td>
|
|
{# Power #}
|
|
<td class="{% if object.big_power%}bg-danger text-white{%endif%}">{{object.big_power|yesno|title}}</td>
|
|
<td>{{ object.power_mic.name|default:'N/A' }}</td>
|
|
<td class="{% if object.generators%}bg-danger text-white{%endif%}">{{object.generators|yesno|title}}</td>
|
|
<td class="{% if object.other_companies_power%}bg-danger text-white{%endif%}">{{object.other_companies_power|yesno|title}}</td>
|
|
<td class="{% if object.nonstandard_equipment_power%}bg-danger text-white{%endif%}">{{object.nonstandard_equipment_power|yesno|title}}</td>
|
|
<td class="{% if object.multiple_electrical_environments%}bg-danger text-white{%endif%}">{{object.multiple_electrical_environments|yesno|title}}</td>
|
|
<td><span class="text-truncate d-inline-block">{{ object.power_notes|default:'N/A'|linebreaks }}</span></td>
|
|
{# Sound #}
|
|
<td class="{% if object.noise_monitoring%}bg-danger text-white{%endif%}">{{object.noise_monitoring|yesno|title}}</td>
|
|
<td><span class="text-truncate d-inline-block">{{ object.sound_notes|default:'N/A'|linebreaks }}</span></td>
|
|
{# Venue #}
|
|
<td class="{% if not object.known_venue%}bg-danger text-white{%endif%}">{{object.known_venue|yesno|title}}</td>
|
|
<td class="{% if not object.safe_loading%}bg-danger text-white{%endif%}">{{object.safe_loading|yesno|title}}</td>
|
|
<td class="{% if object.safe_storage%}bg-danger text-white{%endif%}">{{object.safe_storage|yesno|title}}</td>
|
|
<td class="{% if object.area_outside_of_control%}bg-danger text-white{%endif%}">{{object.area_outside_of_control|yesno|title}}</td>
|
|
<td class="{% if object.nonstandard_emergency_procedure%}bg-danger text-white{%endif%}">{{object.nonstandard_emergency_procedure|yesno|title}}</td>
|
|
<td class="{% if object.barrier_required%}bg-danger text-white{%endif%}">{{object.barrier_required|yesno|title}}</td>
|
|
{# Rigging #}
|
|
<td class="{% if object.special_structures%}bg-danger text-white{%endif%}">{{object.special_structures|yesno|title}}</td>
|
|
<td>{{ object.persons_responsible_structures|default:'N/A'|linebreaks }}</td>
|
|
<td class="{% if object.suspended_structures%}bg-danger text-white{%endif%}">{{object.suspended_structures|yesno|title}}</td>
|
|
{# Buttons #}
|
|
<td>
|
|
<a class="btn btn-primary" href="{% url 'ra_detail' object.pk %}">View</a>
|
|
{% if object.reviewed_by %}
|
|
Reviewed by <a href="{% url 'profile_detail' object.reviewed_by.pk %}">{{ object.reviewed_by }}</a> at {{ object.reviewed_at }}
|
|
{% else %}
|
|
<a class="btn btn-success my-2" href="{% url 'ra_review' object.pk %}">Mark Reviewed</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr class="bg-warning text-dark">
|
|
<td colspan="6">No risk assessments found</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if is_paginated %}
|
|
<div class="row justify-content-center">
|
|
{% paginator %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|