mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-03-12 15:08:25 +00:00
Merge branch 'master' into markdown
# Conflicts: # RIGS/static/scss/screen.scss # RIGS/templates/RIGS/event_detail.html # RIGS/templates/RIGS/event_form.html # RIGS/templates/RIGS/event_table.html # RIGS/templates/RIGS/item_row.html # RIGS/templates/RIGS/item_table.html # RIGS/templates/RIGS/organisation_detail.html # RIGS/templates/RIGS/organisation_form.html # RIGS/templates/RIGS/person_detail.html # RIGS/templates/RIGS/person_form.html # RIGS/templates/RIGS/rigboard.html # RIGS/templates/RIGS/venue_detail.html # RIGS/templates/RIGS/venue_form.html # RIGS/templates/event_print.xml # RIGS/templates/event_print_page.xml # RIGS/templates/item_modal.html # RIGS/tests/test_unit.py # assets/templates/asset_create.html # assets/templates/asset_update.html # assets/templates/partials/asset_detail_form.html # requirements.txt # templates/base.html
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
{% load static %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script src="{% static "js/popover.js" %}"></script>
|
||||
<script src="{% static "js/moment.min.js" %}"></script>
|
||||
<script src="{% static "js/moment-twitter.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover().click(function(){
|
||||
if($(this).attr('href')){
|
||||
window.location.href = $(this).attr('href');
|
||||
}
|
||||
});
|
||||
|
||||
// This keeps timeago values correct, but uses an insane amount of resources
|
||||
// $(function () {
|
||||
// setInterval(function() {
|
||||
// $('.date').each(function (index, dateElem) {
|
||||
// var $dateElem = $(dateElem);
|
||||
// var formatted = moment($dateElem.attr('data-date')).fromNow();
|
||||
// $dateElem.text(formatted);
|
||||
// })
|
||||
// });
|
||||
// }, 10000);
|
||||
moment().twitter();
|
||||
|
||||
})
|
||||
$(document).ready(function() {
|
||||
$(function () {
|
||||
$( "#activity" ).hide();
|
||||
$( "#activity" ).load( "{% url 'activity_feed' %}", function() {
|
||||
$('#activity_loading').slideUp('slow',function(){
|
||||
$('#activity').slideDown('slow');
|
||||
});
|
||||
|
||||
$('#activity [data-toggle="popover"]').popover();
|
||||
|
||||
$('.date').each(function (index, dateElem) {
|
||||
var $dateElem = $(dateElem);
|
||||
var formatted = moment($dateElem.attr('data-date')).twitterLong();
|
||||
$dateElem.text(formatted);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Recent Changes</h4>
|
||||
</div>
|
||||
|
||||
<div class="list-group">
|
||||
<div id="activity_loading" class="list-group-item loading-animation">
|
||||
<div class="circle"></div>
|
||||
<div class="circle1"></div>
|
||||
</div>
|
||||
<div id="activity">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax_nomodal.html,base_rigs.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load paginator from filters %}
|
||||
{% load to_class_name from filters %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="list-group-item">
|
||||
<div class="media">
|
||||
{% for version in object_list %}
|
||||
|
||||
{% if not version.withPrevious %}
|
||||
{% if not forloop.first %}
|
||||
</div> {#/.media-body#}
|
||||
</div> {#/.media#}
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<div class="media">
|
||||
{% endif %}
|
||||
<div class="media-left">
|
||||
{% if version.revision.user %}
|
||||
<a href="{% url 'profile_detail' pk=version.revision.user.pk %}" class="modal-href">
|
||||
<img class="media-object img-rounded" src="{{ version.revision.user.profile_picture}}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h5>{{ version.revision.user.name }}
|
||||
<span class="pull-right"><small><span class="date" data-date="{{version.revision.date_created|date:"c"}}"></span></small></span>
|
||||
</h5>
|
||||
|
||||
{% endif %}
|
||||
<p>
|
||||
<small>
|
||||
{% if version.changes.old == None %}
|
||||
Created
|
||||
{% else %}
|
||||
Changed {% include 'RIGS/version_changes.html' %} in
|
||||
{% endif %}
|
||||
|
||||
{% include 'RIGS/object_button.html' with object=version.changes.new %}
|
||||
{% if version.revision.comment %}
|
||||
({{ version.revision.comment }})
|
||||
{% endif %}
|
||||
</small>
|
||||
</p>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,90 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load static %}
|
||||
{% load paginator from filters %}
|
||||
{% load to_class_name from filters %}
|
||||
|
||||
{% block title %}Rigboard Activity Stream{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script src="{% static "js/popover.js" %}"></script>
|
||||
<script src="{% static "js/moment.min.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover().click(function(){
|
||||
if($(this).attr('href')){
|
||||
window.location.href = $(this).attr('href');
|
||||
}
|
||||
});
|
||||
|
||||
// This keeps timeago values correct, but uses an insane amount of resources
|
||||
// $(function () {
|
||||
// setInterval(function() {
|
||||
// $('.date').each(function (index, dateElem) {
|
||||
// var $dateElem = $(dateElem);
|
||||
// var formatted = moment($dateElem.attr('data-date')).fromNow();
|
||||
// $dateElem.text(formatted);
|
||||
// })
|
||||
// });
|
||||
// }, 10000);
|
||||
|
||||
|
||||
$('.date').each(function (index, dateElem) {
|
||||
var $dateElem = $(dateElem);
|
||||
var formatted = moment($dateElem.attr('data-date')).fromNow();
|
||||
$dateElem.text(formatted);
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h3>Rigboard Activity Stream</h3>
|
||||
</div>
|
||||
<div class="text-right col-sm-12">{% paginator %}</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Object</td>
|
||||
<td>Version ID</td>
|
||||
<td>User</td>
|
||||
<td>Changes</td>
|
||||
<td>Comment</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for version in object_list %}
|
||||
|
||||
<tr>
|
||||
<td>{{ version.revision.date_created }}</td>
|
||||
<td><a href="{{ version.changes.new.get_absolute_url }}">{{version.changes.new|to_class_name}} {{ version.changes.new.pk|stringformat:"05d" }}</a></td>
|
||||
<td>{{ version.pk }}|{{ version.revision.pk }}</td>
|
||||
<td>{{ version.revision.user.name }}</td>
|
||||
<td>
|
||||
{% if version.changes.old == None %}
|
||||
{{version.changes.new|to_class_name}} Created
|
||||
{% else %}
|
||||
{% include 'RIGS/version_changes.html' %}
|
||||
{% endif %} </td>
|
||||
<td>{{ version.changes.revision.comment }}</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,40 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n l10n %}
|
||||
|
||||
{% block content %}
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<p>The following objects will be merged. Please select the 'master' record which you would like to keep. Other records will have associated events moved to the 'master' copy, and then will be deleted.</p>
|
||||
|
||||
<table>
|
||||
{% for form in forms %}
|
||||
{% if forloop.first %}
|
||||
<tr>
|
||||
<th></th>
|
||||
<th> ID </th>
|
||||
{% for field in form %}
|
||||
<th>{{ field.label }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<td><input type="radio" name="master" value="{{form.instance.pk|unlocalize}}"></td>
|
||||
<td>{{form.instance.pk}}</td>
|
||||
{% for field in form %}
|
||||
<td> {{ field.value }} </td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
<div>
|
||||
{% for obj in queryset %}
|
||||
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}" />
|
||||
{% endfor %}
|
||||
<input type="hidden" name="action" value="merge" />
|
||||
<input type="hidden" name="post" value="yes" />
|
||||
<input type="submit" value="Merge them" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,229 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load static %}
|
||||
|
||||
|
||||
{% block title %}Calendar{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="{% static "css/fullcalendar.css" %}" rel='stylesheet' />
|
||||
<link href="{% static "css/fullcalendar.print.css" %}" rel='stylesheet' media='print' />
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{# <script src="//code.jquery.com/jquery-latest.min.js"></script> #}
|
||||
<script src="{% static "js/moment.min.js" %}"></script>
|
||||
<script src="{% static "js/fullcalendar.js" %}"></script>
|
||||
<script>
|
||||
|
||||
function getUrlVars() {
|
||||
var vars = {};
|
||||
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
|
||||
vars[key] = value;
|
||||
});
|
||||
return vars;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
viewToUrl = {
|
||||
'agendaWeek':'week',
|
||||
'agendaDay':'day',
|
||||
'month':'month'
|
||||
}
|
||||
viewFromUrl = {
|
||||
'week':'agendaWeek',
|
||||
'day':'agendaDay',
|
||||
'month':'month'
|
||||
}
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
editable: false,
|
||||
eventLimit: true, // allow "more" link when too many events
|
||||
firstDay: 1,
|
||||
aspectRatio: 1.5,
|
||||
timeFormat: 'HH:mm',
|
||||
views: {
|
||||
basic: {
|
||||
// options apply to basicWeek and basicDay views
|
||||
},
|
||||
agenda: {
|
||||
// options apply to agendaWeek and agendaDay views
|
||||
},
|
||||
week: {
|
||||
columnFormat:'ddd D/M'
|
||||
},
|
||||
day: {
|
||||
// options apply to basicDay and agendaDay views
|
||||
}
|
||||
},
|
||||
header:false,
|
||||
|
||||
events: function(start_moment, end_moment, timezone, callback) {
|
||||
|
||||
$.ajax({
|
||||
url: '/api/event',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
start: moment(start_moment).format("YYYY-MM-DD[T]HH:mm:ss"),
|
||||
end: moment(end_moment).format("YYYY-MM-DD[T]HH:mm:ss")
|
||||
},
|
||||
success: function(doc) {
|
||||
var events = [];
|
||||
colours = {'Provisional': '#f0ad4e',
|
||||
'Confirmed': '#5cb85c' ,
|
||||
'Booked': '#5cb85c' ,
|
||||
'Cancelled': 'grey' ,
|
||||
'non-rig': '#5bc0de'
|
||||
};
|
||||
$(doc).each(function() {
|
||||
end = $(this).attr('latest')
|
||||
if(end.indexOf("T") < 0){ //If latest does not contain a time
|
||||
end = moment(end).add(1, 'days') //End date is non-inclusive, so add a day
|
||||
}
|
||||
|
||||
thisEvent = {
|
||||
'start': $(this).attr('earliest'),
|
||||
'end': end,
|
||||
'className': 'modal-href',
|
||||
'title': $(this).attr('title'),
|
||||
'url': $(this).attr('url')
|
||||
}
|
||||
|
||||
if($(this).attr('is_rig')==true || $(this).attr('status') == "Cancelled"){
|
||||
thisEvent['color'] = colours[$(this).attr('status')];
|
||||
}else{
|
||||
thisEvent['color'] = colours['non-rig'];
|
||||
}
|
||||
|
||||
events.push(thisEvent);
|
||||
});
|
||||
callback(events);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
viewRender: function(view, element){
|
||||
// Set the title of the view
|
||||
$('#calendar-header').text(view.title);
|
||||
|
||||
// Enable/Disable "Today" button as required
|
||||
if(moment().isBetween(view.intervalStart, view.intervalEnd)){
|
||||
//Today is within the current view
|
||||
$('#today-button').prop('disabled', true);
|
||||
}else{
|
||||
$('#today-button').prop('disabled', false);
|
||||
}
|
||||
|
||||
// Set active view select button
|
||||
switch(view.name){
|
||||
case 'month':
|
||||
$('#month-button').addClass('active');
|
||||
$('#week-button').removeClass('active');
|
||||
$('#day-button').removeClass('active');
|
||||
break;
|
||||
|
||||
case 'agendaWeek':
|
||||
$('#month-button').removeClass('active');
|
||||
$('#week-button').addClass('active');
|
||||
$('#day-button').removeClass('active');
|
||||
break;
|
||||
|
||||
case 'agendaDay':
|
||||
$('#month-button').removeClass('active');
|
||||
$('#week-button').removeClass('active');
|
||||
$('#day-button').addClass('active');
|
||||
break;
|
||||
}
|
||||
history.replaceState(null,null,'{% url 'web_calendar' %}'+viewToUrl[view.name]+'/'+view.intervalStart.format('YYYY-MM-DD')+'/');
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
// set some button listeners
|
||||
|
||||
$('#next-button').click(function(){ $('#calendar').fullCalendar('next') });
|
||||
$('#prev-button').click(function(){ $('#calendar').fullCalendar('prev') });
|
||||
$('#today-button').click(function(){ $('#calendar').fullCalendar('today') });
|
||||
|
||||
$('#month-button').click(function(){ $('#calendar').fullCalendar('changeView','month') });
|
||||
$('#week-button').click(function(){ $('#calendar').fullCalendar('changeView','agendaWeek') });
|
||||
$('#day-button').click(function(){ $('#calendar').fullCalendar('changeView','agendaDay') });
|
||||
|
||||
$('#go-to-date-input').change(function(){
|
||||
if( moment($('#go-to-date-input').val()).isValid() ){
|
||||
$('#go-to-date-button').prop('disabled', false);
|
||||
}else{
|
||||
$('#go-to-date-button').prop('disabled', true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#go-to-date-button').click(function(){
|
||||
day = moment($('#go-to-date-input').val()) ;
|
||||
if(day.isValid()){
|
||||
$('#calendar').fullCalendar( 'gotoDate', day);
|
||||
}else{
|
||||
alert('Invalid Date');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Go to the initial settings, if they're valid
|
||||
view = viewFromUrl['{{view}}'];
|
||||
$('#calendar').fullCalendar( 'changeView', view);
|
||||
|
||||
day = moment('{{date}}');
|
||||
if(day.isValid()){
|
||||
$('#calendar').fullCalendar( 'gotoDate', day);
|
||||
}else{
|
||||
console.log('Supplied date is invalid - using default')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-left">
|
||||
<span id="calendar-header" class="h2"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-inline pull-right btn-page">
|
||||
<div class="input-group">
|
||||
<input type="date" class="form-control" id="go-to-date-input" placeholder="Go to date...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" id="go-to-date-button" type="button" disabled>Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" id="today-button">Today</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default" id="prev-button"><span class="glyphicon glyphicon-chevron-left"></span></button>
|
||||
<button type="button" class="btn btn-default" id="next-button"><span class="glyphicon glyphicon-chevron-right"></span></button>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default" id="month-button">Month</button>
|
||||
<button type="button" class="btn btn-default" id="week-button">Week</button>
|
||||
<button type="button" class="btn btn-default" id="day-button">Day</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div id='calendar'>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,78 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6 col-lg-5">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Contact Details</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Person</dt>
|
||||
<dd>
|
||||
{% if event.person %}
|
||||
{{ event.person.name }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd>
|
||||
<span class="overflow-ellipsis">{{ event.person.email }}</span>
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd>{{ event.person.phone }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% if event.organisation %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Organisation</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Organisation</dt>
|
||||
<dd>
|
||||
{{ event.organisation.name }}
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd>{{ object.organisation.phone }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-7">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">Event Info</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Event Venue</dt>
|
||||
<dd>
|
||||
{% if object.venue %}
|
||||
<a href="{% url 'venue_detail' object.venue.pk %}" class="modal-href">
|
||||
{{ object.venue }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Status</dt>
|
||||
<dd>{{ event.get_status_display }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
|
||||
<dt>Access From</dt>
|
||||
<dd>{{ event.access_at|date:"D d M Y H:i"|default:"" }}</dd>
|
||||
|
||||
<dt>Event Starts</dt>
|
||||
<dd>{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
||||
|
||||
<dt>Event Ends</dt>
|
||||
<dd>{{ event.end_date|date:"D d M Y" }} {{ event.end_time|date:"H:i" }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
|
||||
<dt>Event Description</dt>
|
||||
<dd>{{ event.description|linebreaksbr }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,45 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
|
||||
{% block title %}Event Archive{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<h2>Event Archive</h2>
|
||||
|
||||
<div class="col-sm-12 col-md-6 pagination">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="start">Start</label>
|
||||
<input type="date" name="start" id="start" value="{{ request.GET.start }}" placeholder="Start" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="end">End</label>
|
||||
<input type="date" name="end" id="end" value="{% if request.GET.end %}{{ request.GET.end }}{% else %}{% now "Y-m-d" %}{% endif %}" placeholder="End" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if is_paginated %}
|
||||
<div class="col-md-6 text-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
{% with latest as events %}
|
||||
{% include 'RIGS/event_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% if is_paginated %}
|
||||
<div class="row">
|
||||
<div class="text-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,269 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load markdown_tags %}
|
||||
|
||||
{% block title %}{% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %} | {{object.name}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% 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">Dry Hire</span>{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'RIGS/event_detail_buttons.html' %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% if object.is_rig %}
|
||||
{# only need contact details for a rig #}
|
||||
<div class="col-sm-12 col-md-6 col-lg-5">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Contact Details</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Person</dt>
|
||||
<dd>
|
||||
{% if object.person %}
|
||||
<a href="{% url 'person_detail' object.person.pk %}" class="modal-href">
|
||||
{{ object.person }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd>
|
||||
<a href="mailto:{{object.person.email}}" target="_blank">
|
||||
<span class="overflow-ellipsis">{{ object.person.email }}</span>
|
||||
</a>
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd><a href="tel:{{object.person.phone}}">{{ object.person.phone }}</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% if event.organisation %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Organisation</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Organisation</dt>
|
||||
<dd>
|
||||
{% if object.organisation %}
|
||||
<a href="{% url 'organisation_detail' object.organisation.pk %}" class="modal-href">
|
||||
{{ object.organisation }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd>
|
||||
<a href="tel:{{object.person.phone}}">
|
||||
{{ object.organisation.phone }}
|
||||
</a>
|
||||
</dd>
|
||||
|
||||
<dt>Has SU Account</dt>
|
||||
<dd>{{ event.organisation.union_account|yesno|capfirst }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-sm-12 {% if event.is_rig %}col-md-6 col-lg-7{% endif %}">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">Event Info</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Event Venue</dt>
|
||||
<dd>
|
||||
{% if object.venue %}
|
||||
<a href="{% url 'venue_detail' object.venue.pk %}" class="modal-href">
|
||||
{{ object.venue }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
{% if event.is_rig %}
|
||||
<dt>Event MIC</dt>
|
||||
<dd>
|
||||
{% 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>Status</dt>
|
||||
<dd>{{ event.get_status_display }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
|
||||
{% if event.is_rig %}
|
||||
<dt>Crew Meet</dt>
|
||||
<dd>{{ event.meet_at|date:"D d M Y H:i"|default:"" }}</dd>
|
||||
<dd>{{ event.meet_info|default:"" }}</dd>
|
||||
|
||||
<dt>Access From</dt>
|
||||
<dd>{{ event.access_at|date:"D d M Y H:i"|default:"" }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>Event Starts</dt>
|
||||
<dd>{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
||||
|
||||
<dt>Event Ends</dt>
|
||||
<dd>{{ event.end_date|date:"D d M Y" }} {{ event.end_time|date:"H:i" }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
|
||||
<dt>Event Description</dt>
|
||||
<dd class="dont-break-out">{{ event.description|markdown }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
|
||||
<dt>Based On</dt>
|
||||
<dd>
|
||||
{% 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>Checked In By</dt>
|
||||
<dd>{{ object.checked_in_by.name }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if event.is_rig %}
|
||||
<dt>Collected By</dt>
|
||||
<dd>{{ object.collector }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if event.is_rig and not event.internal %}
|
||||
<dd> </dd>
|
||||
<dt>PO</dt>
|
||||
<dd>{{ object.purchase_order }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if event.is_rig and event.internal %}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default
|
||||
{% if object.authorised %}
|
||||
panel-success
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
panel-warning
|
||||
{% elif event.auth_request_to %}
|
||||
panel-info
|
||||
{% endif %}
|
||||
">
|
||||
<div class="panel-heading">Client Authorisation</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal 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="dl-horizontal 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 %}
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'RIGS/event_detail_buttons.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if event.is_rig %}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Event Details</div>
|
||||
<div class="panel-body">
|
||||
<div class="well well-sm">
|
||||
<h4>Notes</h4>
|
||||
<div class="dont-break-out">{{ event.notes|markdown }}</div>
|
||||
</div>
|
||||
{% include 'RIGS/item_table.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'RIGS/event_detail_buttons.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12 text-right">
|
||||
<div>
|
||||
<a href="{% url 'event_history' object.pk %}" title="View Revision History">
|
||||
Last edited at {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% if request.is_ajax %}
|
||||
{% block footer %}
|
||||
<div class="row">
|
||||
<div class="col-sm-10 align-left">
|
||||
<a href="{% url 'event_history' object.pk %}" title="View Revision History">
|
||||
Last edited at {{ object.last_edited_at|default:'never' }} by {{ object.last_edited_by.name|default:'nobody' }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'event_detail' object.pk %}" class="btn btn-primary">Open Event Page <span
|
||||
class="glyphicon glyphicon-eye"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
@@ -1,106 +0,0 @@
|
||||
{% extends 'base_embed.html' %}
|
||||
{% load static from staticfiles %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<a href="/">
|
||||
<span class="source"> R<small>ig</small> I<small>nformation</small> G<small>athering</small> S<small>ystem</small></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<span class="pull-right">
|
||||
{% if object.mic %}
|
||||
<div class="text-center">
|
||||
<img src="{{ object.mic.profile_picture }}" class="event-mic-photo img-rounded"/>
|
||||
</div>
|
||||
{% elif object.is_rig %}
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
<h3>
|
||||
<a {% if perms.RIGS.view_event %}href="{% url 'event_detail' object.pk %}"{% endif %}>
|
||||
{% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %}
|
||||
| {{ object.name }} </a>
|
||||
{% if object.venue %}
|
||||
<small>at {{ object.venue }}</small>
|
||||
{% endif %}
|
||||
<br/><small>
|
||||
{{ object.start_date|date:"D d/m/Y" }}
|
||||
{% if object.has_start_time %}
|
||||
{{ object.start_time|date:"H:i" }}
|
||||
{% endif %}
|
||||
{% if object.end_date or object.has_end_time %}
|
||||
–
|
||||
{% endif %}
|
||||
{% if object.end_date and object.end_date != object.start_date %}
|
||||
{{ object.end_date|date:"D d/m/Y" }}
|
||||
{% endif %}
|
||||
{% if object.has_end_time %}
|
||||
{{ object.end_time|date:"H:i" }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<p>
|
||||
<strong>Status:</strong>
|
||||
{{ object.get_status_display }}
|
||||
</p>
|
||||
<p>
|
||||
{% if object.is_rig %}
|
||||
<strong>Client:</strong> {{ object.person.name }}
|
||||
{% if object.organisation %}
|
||||
for {{ object.organisation.name }}
|
||||
{% endif %}
|
||||
{% if object.dry_hire %}(Dry Hire){% endif %}
|
||||
{% else %}
|
||||
<strong>Non-Rig</strong>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
<strong>MIC:</strong>
|
||||
{% if object.mic %}
|
||||
{{object.mic.name}}
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
|
||||
{% if object.meet_at %}
|
||||
<p>
|
||||
<strong>Crew meet:</strong>
|
||||
{{ object.meet_at|date:"H:i" }} {{ object.meet_at|date:"(Y-m-d)" }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if object.access_at %}
|
||||
<p>
|
||||
<strong>Access at:</strong>
|
||||
{{ object.access_at|date:"H:i" }} {{ object.access_at|date:"(Y-m-d)" }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<strong>Last updated:</strong>
|
||||
{{ object.last_edited_at }} by "{{ object.last_edited_by.initials }}"
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% if object.description %}
|
||||
<p>
|
||||
<strong>Description: </strong>
|
||||
{{ object.description|linebreaksbr }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,458 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
{% load multiply from filters %}
|
||||
{% block title %}{% if object.pk %}Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}
|
||||
{{ object.pk }}{% endif %}{% else %}New Event{% endif %}{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link rel="stylesheet" href="{% static "css/bootstrap-select.min.css" %}"/>
|
||||
<link rel="stylesheet" href="{% static "css/ajax-bootstrap-select.css" %}"/>
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
<script src="{% static "js/bootstrap-select.js" %}"></script>
|
||||
<script src="{% static "js/ajax-bootstrap-select.js" %}"></script>
|
||||
<script src="//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
|
||||
<script src="{% static "js/interaction.js" %}"></script>
|
||||
<script src="{% static "js/modal.js" %}"></script>
|
||||
|
||||
<script src="{% static "js/autocompleter.js" %}"></script>
|
||||
|
||||
<script>
|
||||
function setTime23Hours() {
|
||||
$('#{{ form.end_time.id_for_label }}').val('23:00');
|
||||
}
|
||||
|
||||
function setTime02Hours() {
|
||||
var id_start = "{{ form.start_date.id_for_label }}";
|
||||
var id_end_date = "{{ form.end_date.id_for_label }}";
|
||||
var id_end_time = "{{ form.end_time.id_for_label }}";
|
||||
if ($('#'+id_start).val() == $('#'+id_end_date).val()) {
|
||||
var end_date = new Date($('#'+id_end_date).val());
|
||||
end_date.setDate(end_date.getDate() + 1);
|
||||
$('#'+id_end_date).val(end_date.getISOString());
|
||||
}
|
||||
$('#'+id_end_time).val('02:00');
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
setupMDE('#id_description');
|
||||
setupMDE('#id_notes');
|
||||
setupMDE('#item_description');
|
||||
|
||||
$('#itemModal').on('shown.bs.modal', function (e) {
|
||||
$('#item_description').data('mde_editor').value(
|
||||
$('#item_description').val()
|
||||
);
|
||||
});
|
||||
|
||||
{% if not object.pk and not form.errors %}
|
||||
|
||||
$('.form-hws').slideUp(function () {
|
||||
$('.form-is_rig').slideUp();
|
||||
});
|
||||
|
||||
{% elif not object.pk and form.errors %}
|
||||
if ($('#{{form.is_rig.auto_id}}').attr('checked') != 'checked') {
|
||||
$('.form-is_rig').hide();
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if not object.pk %}
|
||||
$('#is_rig-selector button').on('click', function () {
|
||||
$('.form-non_rig').slideDown();
|
||||
if ($(this).data('is_rig') == 1) {
|
||||
$('#{{form.is_rig.auto_id}}').prop('checked', true);
|
||||
if ($('.form-non_rig').is(':hidden')) {
|
||||
$('.form-is_rig').show();
|
||||
} else {
|
||||
$('.form-is_rig').slideDown();
|
||||
}
|
||||
$('.form-hws, .form-hws .form-is_rig').css('overflow', 'visible');
|
||||
} else {
|
||||
$('#{{form.is_rig.auto_id}}').prop('checked', false);
|
||||
$('.form-is_rig').slideUp();
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
function supportsDate() {
|
||||
//return false; //for development
|
||||
var input = document.createElement('input');
|
||||
input.setAttribute('type','date');
|
||||
var notADateValue = 'not-a-date';
|
||||
input.setAttribute('value', notADateValue);
|
||||
return !(input.value === notADateValue);
|
||||
}
|
||||
if(supportsDate()){
|
||||
//Good, we'll use the browser implementation
|
||||
}else{
|
||||
//Rubbish browser - do JQuery backup
|
||||
$('<link>')
|
||||
.appendTo('head')
|
||||
.attr({type : 'text/css', rel : 'stylesheet'})
|
||||
.attr('href', '{% static "css/bootstrap-datetimepicker.min.css" %}');
|
||||
$.when(
|
||||
$.getScript( "{% static "js/moment.min.js" %}" ),
|
||||
$.getScript( "{% static "js/bootstrap-datetimepicker.min.js" %}" ),
|
||||
$.Deferred(function( deferred ){
|
||||
$( deferred.resolve );
|
||||
})
|
||||
).done(function(){
|
||||
$('input[type=date]').attr('type','text').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
});
|
||||
$('input[type=time]').attr('type','text').datetimepicker({
|
||||
format: 'HH:mm',
|
||||
});
|
||||
$('input[type=datetime-local]').attr('type','text').datetimepicker({
|
||||
format: 'YYYY-MM-DD[T]HH:mm',
|
||||
sideBySide: true,
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
setupItemTable($("#{{ form.items_json.id_for_label }}").val());
|
||||
});
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form class="form-horizontal itemised_form" role="form" method="POST">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-8">
|
||||
<h2>
|
||||
{% if duplicate %}
|
||||
Duplicate of Event N{{ object.pk|stringformat:"05d" }}
|
||||
{% elif object.pk %}
|
||||
Event N{{ object.pk|stringformat:"05d" }}
|
||||
{% else %}
|
||||
New Event
|
||||
{% endif %}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-sm-4 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<button type="submit" class="btn btn-default" title="Save"><span
|
||||
class="glyphicon glyphicon-floppy-disk"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'form_errors.html' %}
|
||||
{% render_field form.is_rig style="display: none" %}
|
||||
<input type="hidden" name="{{ form.items_json.name }}" id="{{ form.items_json.id_for_label }}"
|
||||
value="{{ form.items_json.value }}"/>
|
||||
|
||||
{# New rig buttons #}
|
||||
{% if not object.pk %}
|
||||
<div class="col-md-12 well">
|
||||
<div class="form-group" id="is_rig-selector">
|
||||
<div class="col-sm-12">
|
||||
<span class="col-sm-6" data-toggle="tooltip"
|
||||
title="Anything that involves TEC kit, crew, or otherwise us providing a service to anyone.">
|
||||
<button type="button" class="btn btn-primary col-xs-12" data-is_rig="1">Rig</button>
|
||||
</span>
|
||||
<span class="col-sm-6" data-toggle="tooltip"
|
||||
title="Things that aren't service-based, like training, meetings and site visits.">
|
||||
<button type="button" class="btn btn-info col-xs-12" data-is_rig="0">Non-Rig</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Contact details #}
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="panel panel-default form-hws form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="panel-heading">Contact Details</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group" data-toggle="tooltip" title="The main contact for the event, can be left blank if purely an organisation">
|
||||
<label for="{{ form.person.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.person.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-md-7 col-lg-8">
|
||||
<select id="{{ form.person.id_for_label }}" name="{{ form.person.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='person' %}">
|
||||
{% if person %}
|
||||
<option value="{{form.person.value}}" selected="selected" data-update_url="{% url 'person_update' form.person.value %}">{{ person }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3 col-md-5 col-lg-4 align-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'person_create' %}" class="btn btn-default modal-href"
|
||||
data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<a href="{% if form.person.value %}{% url 'person_update' form.person.value %}{% endif %}" class="btn btn-default modal-href" id="{{ form.person.id_for_label }}-update" data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-toggle="tooltip" title="The client organisation, leave blank if client is an individual">
|
||||
<label for="{{ form.organisation.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.organisation.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-md-7 col-lg-8">
|
||||
<select id="{{ form.organisation.id_for_label }}" name="{{ form.organisation.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='organisation' %}" >
|
||||
{% if organisation %}
|
||||
<option value="{{form.organisation.value}}" selected="selected" data-update_url="{% url 'organisation_update' form.organisation.value %}">{{ organisation }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3 col-md-5 col-lg-4 align-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'organisation_create' %}" class="btn btn-default modal-href"
|
||||
data-target="#{{ form.organisation.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<a href="{% if form.organisation.value %}{% url 'organisation_update' form.organisation.value %}{% endif %}" class="btn btn-default modal-href" id="{{ form.organisation.id_for_label }}-update" data-target="#{{ form.organisation.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default form-hws form-non_rig">
|
||||
<div class="panel-heading">Event Description</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group" data-toggle="tooltip" title="A short description of the event, shown on rigboard and on paperwork. MD enabled.">
|
||||
<div class="col-sm-12">
|
||||
{% render_field form.description class+="form-control md-enabled" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col-sm-12 .col-md-6 -->
|
||||
|
||||
{# Event details #}
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="panel panel-default form-hws form-non_rig">
|
||||
<div class="panel-heading">Event Details</div>
|
||||
<div class="panel-body">
|
||||
<div id="form-hws">
|
||||
<div class="form-group" data-toggle="tooltip" title="Name of the event, displays on rigboard and on paperwork">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.name class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-toggle="tooltip" title="The venue for the rig, leave blank if unknown (e.g. for a dry hire)">
|
||||
<label for="{{ form.venue.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.venue.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-md-7 col-lg-8">
|
||||
<select id="{{ form.venue.id_for_label }}" name="{{ form.venue.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='venue' %}">
|
||||
{% if venue %}
|
||||
<option value="{{form.venue.value}}" selected="selected" data-update_url="{% url 'venue_update' form.venue.value %}">{{ venue }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3 col-md-5 col-lg-4 align-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'venue_create' %}" class="btn btn-default modal-href"
|
||||
data-target="#{{ form.venue.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
<a href="{% if object.venue %}{% url 'venue_update' object.venue.pk %}{% endif %}" class="btn btn-default modal-href" id="{{ form.venue.id_for_label }}-update" data-target="#{{ form.venue.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ form.start_date.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.start_date.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-7" data-toggle="tooltip" title="Start date for event, required">
|
||||
{% render_field form.start_date class+="form-control" %}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-5" data-toggle="tooltip" title="Start time of event, can be left blank">
|
||||
{% render_field form.start_time class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ form.end_date.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.end_date.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-7" data-toggle="tooltip" title="End date of event, leave blank if unknown or same as start date">
|
||||
{% render_field form.end_date class+="form-control" %}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-5" data-toggle="tooltip" title="End time of event, leave blank if unknown">
|
||||
{% render_field form.end_time class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-offset-7 col-md-5">
|
||||
<div class="btn-group btn-group-justified">
|
||||
<btn class="btn btn-default btn-xs" onclick="setTime23Hours()">23:00</btn>
|
||||
<btn class="btn btn-default btn-xs" onclick="setTime02Hours()">02:00</btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Rig only information #}
|
||||
<div class="form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="form-group" data-toggle="tooltip" title="The date/time at which TEC have access to the venue">
|
||||
<label for="{{ form.access_at.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.access_at.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.access_at class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-toggle="tooltip" title="The date/time at which crew should meet for this event">
|
||||
<label for="{{ form.meet_at.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.meet_at.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.meet_at class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<div class="checkbox">
|
||||
<label data-toggle="tooltip" title="Mark this event as a dry-hire, so it needs to be checked in at the end">
|
||||
{% render_field form.dry_hire %}{{ form.dry_hire.label }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Status is needed on all events types and it looks good here in the form #}
|
||||
<div class="form-group" data-toggle="tooltip" title="The current status of the event. Only mark as booked once paperwork is received">
|
||||
<label for="{{ form.status.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.status.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.status class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="form-group" data-toggle="tooltip" title="The Member in Charge of this event">
|
||||
<label for="{{ form.mic.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.mic.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<select id="{{ form.mic.id_for_label }}" name="{{ form.mic.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if mic %}
|
||||
<option value="{{form.mic.value}}" selected="selected" >{{ mic.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if object.dry_hire %}
|
||||
<div class="form-group" data-toggle="tooltip" title="The person who checked-in this dry hire">
|
||||
<label for="{{ form.checked_in_by.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.checked_in_by.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<select id="{{ form.checked_in_by.id_for_label }}" name="{{ form.checked_in_by.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if checked_in_by %}
|
||||
<option value="{{form.checked_in_by.value}}" selected="selected" >{{ checked_in_by.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group" data-toggle="tooltip" title="The student ID of the client who collected the dry-hire">
|
||||
<label for="{{ form.collector.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.collector.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.collector class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" data-toggle="tooltip" title="The purchase order number (for external clients)">
|
||||
<label for="{{ form.purchase_order.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.purchase_order.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.purchase_order class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col-sm-12 .col-md-6 -->
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<button type="submit" class="btn btn-default" title="Save"><span
|
||||
class="glyphicon glyphicon-floppy-disk"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{# Notes and item shit #}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default form-hws form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="panel-body">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group" data-toggle="tooltip" title="Notes on the event. This is only visible to keyholders, and is not displayed on the paperwork. MD enabled.">
|
||||
<label for="{{ form.notes.id_for_label }}">{{ form.notes.label }}</label>
|
||||
{% render_field form.notes class+="form-control md-enabled" %}
|
||||
</div>
|
||||
</div>
|
||||
{% include "RIGS/item_table.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 text-right form-hws form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="btn-group btn-page">
|
||||
<button type="submit" class="btn btn-default" title="Save"><span
|
||||
class="glyphicon glyphicon-floppy-disk"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% include 'RIGS/item_modal.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,100 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Events for Invoice{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<h2>Events for Invoice ({{count}} Events, £ {{ total|floatformat:2 }})</h2>
|
||||
<p>These events have happened, but paperwork has not yet been sent to treasury</p>
|
||||
{% if is_paginated %}
|
||||
<div class="col-md-6 col-md-offset-6 col-sm-12 text-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="table-responsive col-sm-12">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Event #</th>
|
||||
<th>Start Date</th>
|
||||
<th>Event Name</th>
|
||||
<th>Client</th>
|
||||
<th>Cost</th>
|
||||
<th>MIC</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr class="
|
||||
{% if object.cancelled %}
|
||||
active text-muted
|
||||
{% elif not object.is_rig %}
|
||||
info
|
||||
{% elif object.confirmed and object.mic %}
|
||||
{# interpreated as (booked and mic) #}
|
||||
success
|
||||
{% elif object.mic %}
|
||||
warning
|
||||
{% else %}
|
||||
danger
|
||||
{% endif %}
|
||||
">
|
||||
<td><a href="{% url 'event_detail' object.pk %}">N{{ object.pk|stringformat:"05d" }}</a><br>
|
||||
<span class="text-muted">{{ object.get_status_display }}</span></td>
|
||||
<td>{{ object.start_date }}</td>
|
||||
<td>
|
||||
{{ object.name }}
|
||||
{% if object.is_rig and perms.RIGS.view_event and object.authorised %}
|
||||
<span class="glyphicon glyphicon-check"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ object.organisation.name }}
|
||||
<br>
|
||||
<span class="text-muted">{{ object.internal|yesno:'Internal,External' }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ object.sum_total|floatformat:2 }}
|
||||
<br />
|
||||
<span class="text-muted">{% if not object.internal %}{{ object.purchase_order }}{% endif %}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if object.mic %}
|
||||
{{ object.mic.initials }}<br>
|
||||
<img src="{{ object.mic.profile_picture }}" class="event-mic-photo"/>
|
||||
{% else %}
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a href="{% url 'invoice_event' object.pk %}"
|
||||
class="btn btn-default"
|
||||
data-toggle="tooltip"
|
||||
title="'Invoice' this event - click this when paperwork has been sent to treasury">
|
||||
<span class="glyphicon glyphicon-gbp"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if is_paginated %}
|
||||
<div class="col-md-6 col-md-offset-6 col-sm-12 text-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,10 +0,0 @@
|
||||
<blockTable style="signatureTable" colWidths="50,120,60,120,35,110">
|
||||
<tr>
|
||||
<td>Signature</td>
|
||||
<td></td>
|
||||
<td>Print Name</td>
|
||||
<td></td>
|
||||
<td>Date</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -1,109 +0,0 @@
|
||||
{% load markdown_tags %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<td>#</td>
|
||||
<td>Event Date</td>
|
||||
<td>Event Details</td>
|
||||
<td>Event Timings</td>
|
||||
<td>MIC</td>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<tr class="
|
||||
{% if event.cancelled %}
|
||||
active text-muted
|
||||
{% elif not event.is_rig %}
|
||||
info
|
||||
{% elif event.confirmed and event.mic %}
|
||||
{# interpreated as (booked and mic) #}
|
||||
success
|
||||
{% elif event.mic %}
|
||||
warning
|
||||
{% else %}
|
||||
danger
|
||||
{% endif %}
|
||||
">
|
||||
<td>{{ event.pk }}</td>
|
||||
<td>
|
||||
<div><strong>{{ event.start_date|date:"D d/m/Y" }}</strong></div>
|
||||
{% if event.end_date and event.end_date != event.start_date %}
|
||||
<div><strong>{{ event.end_date|date:"D d/m/Y" }}</strong></div>
|
||||
{% endif %}
|
||||
<span class="text-muted">{{ event.get_status_display }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<h4>
|
||||
<a {% if perms.RIGS.view_event %}href="{% url 'event_detail' event.pk %}" {% endif %}>
|
||||
{{ event.name }}
|
||||
</a>
|
||||
{% if event.venue %}
|
||||
<small>at {{ event.venue }}</small>
|
||||
{% endif %}
|
||||
{% if event.dry_hire %}
|
||||
<span class="label label-default">Dry Hire</span>
|
||||
{% endif %}
|
||||
{% if event.is_rig and perms.RIGS.view_event and event.authorised %}
|
||||
<span class="glyphicon glyphicon-check"></span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
{% if event.is_rig and not event.cancelled %}
|
||||
<h5>
|
||||
{{ event.person.name }}
|
||||
{% if event.organisation %}
|
||||
for {{ event.organisation.name }}
|
||||
{% endif %}
|
||||
</h5>
|
||||
{% endif %}
|
||||
{% if not event.cancelled and event.description %}
|
||||
<div>
|
||||
{{ event.description|markdown }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if not event.cancelled %}
|
||||
<dl class="dl-horizontal">
|
||||
{% if event.meet_at %}
|
||||
<dt>Crew meet</dt>
|
||||
<dd>{{ event.meet_at|date:"H:i" }}<br/>{{ event.meet_at|date:"(Y-m-d)" }}</dd>
|
||||
{% endif %}
|
||||
{% if event.has_start_time %}
|
||||
<dt>Event starts</dt>
|
||||
<dd>
|
||||
{{ event.start_time|date:"H:i" }}<br/>
|
||||
{{ event.start_date|date:"(Y-m-d)" }}<br/>
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% if event.has_end_time%}{% if event.start_date != event.end_date or event.start_time != event.end_time %}
|
||||
<dt>Event ends</dt>
|
||||
<dd>
|
||||
{{ event.end_time|date:"H:i" }}<br/>
|
||||
{{ event.end_date|date:"(Y-m-d)" }}
|
||||
</dd>
|
||||
{% endif %}{% endif %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if event.mic %}
|
||||
{{ event.mic.initials }}
|
||||
<div>
|
||||
{% if perms.RIGS.view_profile %}
|
||||
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
|
||||
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
|
||||
</a>
|
||||
{% else %}
|
||||
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elif event.is_rig %}
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,133 +0,0 @@
|
||||
{% extends 'base_client.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
|
||||
$('form').on('submit', function () {
|
||||
$('#loading-modal').modal({
|
||||
backdrop: 'static',
|
||||
show: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% if event.is_rig %}N{{ event.pk|stringformat:"05d" }}{% else %}{{ event.pk }}{% endif %} | {{ event.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h1>
|
||||
{% if event.is_rig %}N{{ event.pk|stringformat:"05d" }}{% else %}{{ event.pk }}{% endif %}
|
||||
| {{ event.name }} {% if event.dry_hire %}<span class="badge">Dry Hire</span>{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% include 'RIGS/client_eventdetails.html' %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{% with object=event %}
|
||||
{% include 'RIGS/item_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" id="eventauth">Event Authorisation</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal itemised_form" role="form" method="POST" action="#eventauth">
|
||||
{% csrf_token %}
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<p>
|
||||
I agree that I am authorised to approve this event. I agree that I am the
|
||||
<strong>President/Treasurer or account holder</strong> of the hirer, or that I
|
||||
have the written permission of the
|
||||
<strong>President/Treasurer or account holder</strong> of the hirer stating that
|
||||
I can authorise this event.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="col-sm-12 form-group" data-toggle="tooltip"
|
||||
title="Your name as the person authorising the event.">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.name class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 form-group" data-toggle="tooltip"
|
||||
title="Your Student ID or Staff username as the person authorising the event.">
|
||||
<label for="{{ form.uni_id.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.uni_id.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.uni_id class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="col-sm-12 form-group" data-toggle="tooltip"
|
||||
title="The Students' Union account code you wish this event to be charged to.">
|
||||
<label for="{{ form.account_code.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.account_code.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.account_code class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 form-group" data-toggle="tooltip"
|
||||
title="The full amount chargable for this event as displayed above, including VAT.">
|
||||
<label for="{{ form.amount.id_for_label }}"
|
||||
class="col-sm-4 control-label">{{ form.amount.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.amount class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 col-md-8 form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8 col-md-offset-3" data-toggle="tooltip"
|
||||
title="In order to book an event you must agree to the TEC Terms of Hire.">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% render_field form.tos %} I have read and agree to the TEC
|
||||
<a href="{{ tos_url }}">Terms of Hire</a>. E&OE.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-4 text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary" type="submit">Authorise</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,59 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Request Authorisation{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-warning">
|
||||
<h1>Send authorisation request email.</h1>
|
||||
<p>Pressing send will email the address provided. Please triple check everything before continuing.</p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Person Email</dt>
|
||||
<dd>{{ object.person.email }}</dd>
|
||||
|
||||
<dt>Organisation Email</dt>
|
||||
<dd>{{ object.organisation.email }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-10 col-md-offset-1">
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal"
|
||||
id="auth-request-form">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row">
|
||||
{% include 'form_errors.html' %}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"
|
||||
for="{{ form.email.id_for_label }}">{{ form.email.label }}</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
{% render_field form.email type="email" class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right col-sm-3 col-sm-offset-9">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="form-control btn btn-primary">
|
||||
<span class="glyphicon glyphicon-send"></span>
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#auth-request-form').on('submit', function () {
|
||||
$('#auth-request-form button').attr('disabled', true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}NottinghamTEC Email Address Required{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-warning">
|
||||
<h1>An error occured.</h1>
|
||||
<p>Your RIGS account must have an @nottinghamtec.co.uk email address before you can send emails to clients.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,64 +0,0 @@
|
||||
{% extends 'base_client.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}
|
||||
{% if event.is_rig %}N{{ event.pk|stringformat:"05d" }}{% else %}{{ event.pk }}{% endif %} | {{ event.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h1>
|
||||
{% if event.is_rig %}N{{ event.pk|stringformat:"05d" }}{% else %}{{ event.pk }}{% endif %}
|
||||
| {{ event.name }} {% if event.dry_hire %}<span class="badge">Dry Hire</span>{% endif %}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'RIGS/client_eventdetails.html' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{% with object=event %}
|
||||
{% include 'RIGS/item_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Event Authorisation</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>{{ object.name }}</dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd>{{ object.email }}</dd>
|
||||
|
||||
{% if internal %}
|
||||
<dt>University ID</dt>
|
||||
<dd>{{ object.uni_id }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Account code</dt>
|
||||
<dd>{{ object.account_code }}</dd>
|
||||
|
||||
<dt>Authorised amount</dt>
|
||||
<dd>£ {{ object.amount|floatformat:2 }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,80 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% block title %}RIGS{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<h1>R<small>ig</small> I<small>nformation</small> G<small>athering</small> S<small>ystem</small></h1>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<p><h4 class="list-group-item-heading" style="margin:0;">Welcome back {{ user.get_full_name }}, there are {{ rig_count }} rigs coming up.</h4>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-{% if perms.RIGS.view_event %}6{% else %}12{% endif %}">
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="list-group-item-heading">Quick Links</h4>
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<a class="list-group-item" href="{% url 'rigboard' %}"><span class="glyphicon glyphicon-list"></span> Rigboard</a>
|
||||
<a class="list-group-item" href="{% url 'web_calendar' %}"><span class="glyphicon glyphicon-calendar"></span> Calendar</a>
|
||||
{% if perms.RIGS.add_event %}<a class="list-group-item" href="{% url 'event_create' %}"><span class="glyphicon glyphicon-plus"></span> New Event</a>{% endif %}
|
||||
<a class="list-group-item" href="{% url 'asset_index' %}"><span class="glyphicon glyphicon-tag"></span> Asset Database </a>
|
||||
|
||||
<div class="list-group-item default"></div>
|
||||
|
||||
<a class="list-group-item" href="https://forum.nottinghamtec.co.uk" target="_blank"><span class="glyphicon glyphicon-link"></span> TEC Forum</a>
|
||||
<a class="list-group-item" href="//members.nottinghamtec.co.uk/wiki" target="_blank"><span class="glyphicon glyphicon-link"></span> TEC Wiki</a>
|
||||
<a class="list-group-item" href="http://members.nottinghamtec.co.uk/wiki/images/2/22/Event_Risk_Assesment.pdf" target="_blank"><span class="glyphicon glyphicon-link"></span> Pre-Event Risk Assessment</a>
|
||||
<a class="list-group-item" href="//members.nottinghamtec.co.uk/price" target="_blank"><span class="glyphicon glyphicon-link"></span> Price List</a>
|
||||
<a class="list-group-item" href="https://goo.gl/forms/jdPWov8PCNPoXtbn2" target="_blank"><span class="glyphicon glyphicon-link"></span> Subhire Insurance Form</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Search Rigboard</h4>
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<div class="list-group-item">
|
||||
<form class="form" role="form" action="{% url 'person_list' %}" method="GET">
|
||||
<div class="input-group">
|
||||
<input type="search" name="q" class="form-control" placeholder="Search People" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<form class="form" role="form" action="{% url 'organisation_list' %}" method="GET">
|
||||
<div class="input-group">
|
||||
<input type="search" name="q" class="form-control" placeholder="Search Organisations" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<form class="form" role="form" action="{% url 'venue_list' %}" method="GET">
|
||||
<div class="input-group">
|
||||
<input type="search" name="q" class="form-control" placeholder="Search Venues" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<div class="col-sm-6">
|
||||
{% include 'RIGS/activity_feed.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,35 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Delete payment on invoice {{ object.invoice.pk }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h2>Delete invoice {{ object.pk }}</h2>
|
||||
|
||||
<p>Are you sure you wish to delete invoice {{ object.pk }}?</p>
|
||||
|
||||
<p class="text-center"><strong>This action cannot be undone!</strong></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form action="{{ action_link }}" method="post">{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{% url 'invoice_list' %}"/>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<input type="submit" value="Yes" class="btn btn-danger col-sm-1"/>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,177 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Invoice {{ object.pk }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h2>Invoice {{ object.pk }} ({{ object.invoice_date|date:"d/m/Y"}})</h2>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'invoice_delete' object.pk %}" class="btn btn-default" title="Delete Invoice">
|
||||
<span class="glyphicon glyphicon-remove"></span> <span
|
||||
class="hidden-xs">Delete</span>
|
||||
</a>
|
||||
<a href="{% url 'invoice_void' object.pk %}" class="btn btn-default" title="Void Invoice">
|
||||
<span class="glyphicon glyphicon-ban-circle"></span> <span
|
||||
class="hidden-xs">Void</span>
|
||||
</a>
|
||||
<a href="{% url 'invoice_print' object.pk %}" target="_blank" title="Print Invoice" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-print"></span> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Invoice Details</div>
|
||||
<div class="panel-body">
|
||||
{% if object.event.organisation %}
|
||||
{{ object.event.organisation.name }}<br/>
|
||||
{{ object.event.organisation.address|linebreaksbr }}
|
||||
{% else %}
|
||||
{{ object.event.person.name }}<br/>
|
||||
{{ object.event.person.address|linebreaksbr }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-{% if object.is_closed %}success{% else %}warning{% endif %}">
|
||||
<div class="panel-heading">Event Details<span class="pull-right">
|
||||
{% if object.void %}(VOID){% elif object.is_closed %}(PAID){% else %}(OUTSTANDING){% endif %}
|
||||
</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Event Number</dt>
|
||||
<dd>N{{ object.event.pk|stringformat:"05d" }}</dd>
|
||||
|
||||
<dt>Event</dt>
|
||||
<dd>{{ object.event.name }}</dd>
|
||||
|
||||
<dt>Event Venue</dt>
|
||||
<dd>{{ object.event.venue }}</dd>
|
||||
|
||||
<dt>Event MIC</dt>
|
||||
<dd>{{ object.event.mic.name }}</dd>
|
||||
|
||||
<dt>Event Starts</dt>
|
||||
<dd>{{ object.event.start_date|date:"d M Y" }} {{ object.event.start_time|date:"H:i" }}</dd>
|
||||
|
||||
<dt>Event Ends</dt>
|
||||
<dd>{{ object.event.end_date|date:"d M Y" }} {{ object.event.end_time|date:"H:i" }}</dd>
|
||||
|
||||
<dt>Status</dt>
|
||||
<dd>{{ object.event.get_status_display }}</dd>
|
||||
|
||||
{% if object.event.dry_hire %}
|
||||
<dd> </dd>
|
||||
<dt>Checked In By</dt>
|
||||
<dd>{{ object.checked_in_by.name }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dd> </dd>
|
||||
|
||||
<dt>Authorised</dt>
|
||||
<dd>{{ object.event.authorised|yesno:"Yes,No" }}</dd>
|
||||
|
||||
<dt>Authorised by</dt>
|
||||
<dd>
|
||||
{% if object.event.authorised %}
|
||||
{{ object.event.authorisation.name }}
|
||||
(<a href="mailto:{{ object.event.authorisation.email }}">{{ object.event.authorisation.email }}</a>)
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
{% if object.event.internal %}
|
||||
{# internal #}
|
||||
<dt>Uni ID</dt>
|
||||
<dd>{{ object.event.authorisation.uni_id }}</dd>
|
||||
|
||||
<dt>Account code</dt>
|
||||
<dd>{{ object.event.authorisation.account_code }}</dd>
|
||||
{% else %}
|
||||
<dt>PO</dt>
|
||||
<dd>{{ object.event.purchase_order }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>Authorised at</dt>
|
||||
<dd>{{ object.event.authorisation.last_edited_at }}</dd>
|
||||
|
||||
<dt>Authorised amount</dt>
|
||||
<dd>
|
||||
{% if object.event.authorised %}
|
||||
£ {{ object.event.authorisation.amount|floatformat:"2" }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Authorsation request sent by</dt>
|
||||
<dd>{{ object.authorisation.sent_by }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'payment_create' %}?invoice={{ object.pk }}"
|
||||
class="btn btn-default modal-href"
|
||||
data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span> Add
|
||||
</a>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Amount</td>
|
||||
<td>Method</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for payment in object.payment_set.all %}
|
||||
<tr>
|
||||
<td>{{ payment.date }}</td>
|
||||
<td>{{ payment.amount|floatformat:2 }}</td>
|
||||
<td>{{ payment.get_method_display }}</td>
|
||||
<td>
|
||||
<a href="{% url 'payment_delete' payment.pk %}"
|
||||
class="btn btn-small btn-danger"><span class="glyphicon glyphicon-remove"</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td class="text-right"><strong>Balance:</strong></td>
|
||||
<td>{{ object.balance|floatformat:2 }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% with object.event as object %}
|
||||
{% include 'RIGS/item_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,83 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
|
||||
{% block title %}Invoices{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<h2>{% block heading %}Invoices{% endblock %}</h2>
|
||||
{% block description %}{% endblock %}
|
||||
{% if is_paginated %}
|
||||
<div class="col-md-6 col-md-offset-6 col-sm-12 text-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="table-responsive col-sm-12">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Invoice #</th>
|
||||
<th>Event</th>
|
||||
<th>Client</th>
|
||||
<th>Event Date</th>
|
||||
<th>Invoice Date</th>
|
||||
<th>Balance</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<td class="{% if object.is_closed %}success{% else %}warning{% endif %}">{{ object.pk }}<br>
|
||||
<span class="text-muted">{% if object.void %}(VOID){% elif object.is_closed %}(PAID){% else %}(O/S){% endif %}</span></td>
|
||||
<td class="
|
||||
{% if object.event.cancelled %}
|
||||
active text-muted
|
||||
{% elif not object.event.is_rig %}
|
||||
info
|
||||
{% elif object.event.confirmed and object.event.mic %}
|
||||
{# interpreated as (booked and mic) #}
|
||||
success
|
||||
{% elif object.event.mic %}
|
||||
warning
|
||||
{% else %}
|
||||
danger
|
||||
{% endif %}
|
||||
"><a href="{% url 'event_detail' object.event.pk %}">N{{ object.event.pk|stringformat:"05d" }}</a>: {{ object.event.name }} <br>
|
||||
<span class="text-muted">{{ object.event.get_status_display }}{% if not object.event.mic %}, No MIC{% endif %}
|
||||
</span></td>
|
||||
</td>
|
||||
<td>{% if object.event.organisation %}
|
||||
{{ object.event.organisation.name }}
|
||||
<br>
|
||||
<span class="text-muted">{{ object.event.internal|yesno:'Internal,External' }}</span>
|
||||
{% else %}
|
||||
{{ object.event.person.name }}
|
||||
<br>
|
||||
<span class="text-muted">External</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ object.event.start_date }}</td>
|
||||
<td>{{ object.invoice_date }}</td>
|
||||
<td>
|
||||
{{ object.balance|floatformat:2 }}
|
||||
<br />
|
||||
<span class="text-muted">{{ object.event.purchase_order }}</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if is_paginated %}
|
||||
<div class="col-md-6 col-md-offset-6 col-sm-12 text-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends 'RIGS/invoice_list.html' %}
|
||||
|
||||
{% block title %}
|
||||
Outstanding Invoices
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
Outstanding Invoices ({{ count }} Events, £ {{ total|floatformat:2 }})
|
||||
{% endblock %}
|
||||
|
||||
{% block description %}
|
||||
<p>Paperwork for these events has been sent to treasury, but the full balance has not yet appeared on a ledger</p>
|
||||
{% endblock %}
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends 'RIGS/invoice_list.html' %}
|
||||
|
||||
{% block title %}
|
||||
Invoice Archive
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
All Invoices
|
||||
{% endblock %}
|
||||
|
||||
{% block description %}
|
||||
<p>This page displays all invoices: outstanding, paid, and void</p>
|
||||
{% endblock %}
|
||||
@@ -1,28 +0,0 @@
|
||||
{% load markdown_tags %}
|
||||
|
||||
<tr id="item-{{ item.pk }}" data-pk="{{ item.pk }}" class="item_row">
|
||||
<td>
|
||||
<span class="name">{{ item.name }}</span>
|
||||
|
||||
<div class="description">
|
||||
{{ item.description|markdown }}
|
||||
</div>
|
||||
</td>
|
||||
<td>£ <span class="cost">{{ item.cost|floatformat:2 }}</span></td>
|
||||
<td class="quantity">{{ item.quantity }}</td>
|
||||
<td>£ <span class="sub-total" data-subtotal="{{ item.total_cost }}">{{ item.total_cost|floatformat:2 }}</span>
|
||||
</td>
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
<button type="button" class="item-edit btn btn-xs btn-default"
|
||||
data-pk="{{ item.pk }}"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</button>
|
||||
<button type="button" class="item-delete btn btn-xs btn-danger"
|
||||
data-pk="{{ item.pk }}">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
@@ -1,73 +0,0 @@
|
||||
<div class="panel table-responsive">
|
||||
<table class="table table-hover" id="item-table" {% if edit %}data-orderurl="{#% url 'item_order' %#}"{% endif %}>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Item</td>
|
||||
<td>Price</td>
|
||||
<td>Quantity</td>
|
||||
<td>Sub-total</td>
|
||||
{% if edit %}
|
||||
<td class="text-right">
|
||||
<button type="button" class="btn btn-default btn-xs item-add"
|
||||
data-url="{#% url eventitem_add object.pk %#}" data-toggle="modal"
|
||||
data-target="#itemModal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="item-table-body">
|
||||
{% for item in object.items.all %}
|
||||
{% include 'RIGS/item_row.html' %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td rowspan="3" colspan="2"></td>
|
||||
<td>Total (ex. VAT)</td>
|
||||
<td colspan="2">£ <span id="sumtotal">{{ object.sum_total|default:0|floatformat:2 }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% if not object.pk %}
|
||||
<td id="vat-rate" data-rate="{{ currentVAT.rate }}">VAT @
|
||||
{{ currentVAT.as_percent|floatformat }}% (TBC)
|
||||
</td>
|
||||
{% else %}
|
||||
<td id="vat-rate" data-rate="{{ object.vat_rate.rate }}">VAT @
|
||||
{{ object.vat_rate.as_percent|floatformat|default:"TBD" }}%
|
||||
</td>
|
||||
{% endif %}
|
||||
<td colspan="2">£ <span id="vat">{{ object.vat|default:0|floatformat:2 }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td colspan="2">£ <span id="total">{{ object.total|default:0|floatformat:2 }}</span></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<table class="hidden invisible">
|
||||
<tr id="new-item-row" class="item_row">
|
||||
<td>
|
||||
<span class="name"></span>
|
||||
|
||||
<div class="description">
|
||||
</div>
|
||||
</td>
|
||||
<td>£ <span class="cost"></span></td>
|
||||
<td class="quantity"></td>
|
||||
<td>£ <span class="sub-total"></span></td>
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
<button type="button" class="item-edit btn btn-xs btn-default"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</button>
|
||||
<button type="button" class="item-delete btn btn-xs btn-danger">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1,4 +0,0 @@
|
||||
{% load to_class_name from filters %}
|
||||
{# pass in variable "object" to this template #}
|
||||
|
||||
<a title="{% if object.is_rig == False %}Non-rig{% elif object.dry_hire %}Dry Hire{% elif object.is_rig %}Rig{%else%}{{object|to_class_name}}{% endif %} | '{{object.name}}'" href="{{ object.get_absolute_url }}">{% if object.is_rig == False %}Non-rig{% elif object.dry_hire %}Dry Hire{% elif object.is_rig %}Rig{%else%}{{object|to_class_name}}{% endif %} | '{{ object.activity_feed_string|default:object.name }}'</a>
|
||||
@@ -1,112 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load widget_tweaks %}
|
||||
{% load markdown_tags %}
|
||||
|
||||
{% block title %}Organisation | {{ object.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12">
|
||||
<h1>Organisation | {{ object.name }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">Organisation Details</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>{{ object.name }}</dd>
|
||||
|
||||
<dt>Phone</dt>
|
||||
<dd><a href="tel:{{ object.phone }}">{{ object.phone }}</a></dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd><a href="mailto:{{ object.email }}"><span class="overflow-ellipsis">{{ object.email }}</span></a></dd>
|
||||
|
||||
<dt>Address</dt>
|
||||
<dd>{{ object.address|linebreaksbr }}</dd>
|
||||
|
||||
<dt>Notes</dt>
|
||||
<dd>{{ object.notes|markdown }}</dd>
|
||||
|
||||
<dt>Union Account</dt>
|
||||
<dd>{{ object.union_account|yesno|capfirst }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Associated People</div>
|
||||
<div class="panel-body">
|
||||
<div class="list-group">
|
||||
{% for person,count in object.persons %}
|
||||
<a class="list-group-item" href="{% url 'person_detail' person.pk %}">{{ person.pk|stringformat:"05d" }} | {{ person.name }} <span class="badge" title="{{count}} events with {{person.name}} for {{object.name}}">{{count}}</span></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Associated Events</div>
|
||||
<div class="panel-body">
|
||||
{% with object.latest_events as events %}
|
||||
{% include 'RIGS/event_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if not request.is_ajax %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'organisation_history' object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% if request.is_ajax %}
|
||||
{% block footer %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'organisation_detail' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-eye-open"></span> Open Page</a>
|
||||
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'organisation_history' object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
@@ -1,78 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}{% if object.pk %}Edit {{ object.name }}{% else %}Add Organisation{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<h3>{{ object.pk|yesno:"Edit,Add" }} Organisation</h3>
|
||||
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.name class+="form-control" placeholder=form.name.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.phone.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.phone.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.email.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.email.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.email class+="form-control" type="email" placeholder=form.email.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.address.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.address.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.address class+="form-control" placeholder=form.address.label %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="{{ form.notes.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.notes.label }}#</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.notes class+="form-control" placeholder=form.notes.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% render_field form.union_account %} {{ form.union_account.label }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary pull-right" type="submit"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,70 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load widget_tweaks %}
|
||||
{% load paginator from filters %}
|
||||
{% load url_replace from filters %}
|
||||
{% load orderby from filters %}
|
||||
|
||||
{% block title %}Organisations{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>Organisations</h3>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'organisation_create' %}" class="btn btn-default pull-right">New <span
|
||||
class="glyphicon glyphicon-plus"></span></a>
|
||||
</div>
|
||||
<div class="col-sm-3 col-sm-offset-9">
|
||||
<form class="form form-horizontal col-sm-12">
|
||||
<div class="form-group">
|
||||
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-right col-sm-12">{% paginator %}</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||
<td>Email</td>
|
||||
<td>Phone</td>
|
||||
<td>Notes</td>
|
||||
<td>Union Account</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<td>{{ object.pk }}</td>
|
||||
<td>{{ object.name }}</td>
|
||||
<td>{{ object.email }}</td>
|
||||
<td><a href="tel:{{ object.phone }}">{{ object.phone }}</a></td>
|
||||
<td>{{ object.notes|yesno|capfirst }}</td>
|
||||
<td>{{ object.union_account|yesno|capfirst }}</td>
|
||||
<td>
|
||||
<a href="{% url 'organisation_detail' object.pk %}" class="btn btn-default modal-href">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">No organisations found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Password Reset Disabled{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Password reset is disabled</h1>
|
||||
<p> We are very sorry for the inconvenience, but due to a security vulnerability, password reset is currently disabled until the vulnerability can be patched.</p>
|
||||
<p> If you are locked out of your account, please contact an administrator and we can manually perform a reset</p>
|
||||
{% endblock %}
|
||||
@@ -1,37 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Delete payment on invoice {{ object.invoice.pk }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h2>Delete payment on invoice {{ object.invoice.pk }}</h2>
|
||||
|
||||
<p>Are you sure you wish to delete a payment for £{{ object.amount|floatformat:2 }}
|
||||
({{ object.get_method_display }})
|
||||
from {{ object.date }} on invoice {{ object.invoice.pk }}.</p>
|
||||
|
||||
<p class="text-center"><strong>This action cannot be undone!</strong></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form action="{{ action_link }}" method="post">{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{% url 'invoice_detail' object.invoice.pk %}"/>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<input type="submit" value="Yes" class="btn btn-danger col-sm-1"/>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-default col-sm-1">No</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,51 +0,0 @@
|
||||
{% extends 'base_ajax.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Add Payment{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-3 col-sm-6">
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<input type="hidden" name="{{ form.invoice.name }}" value="{{ form.invoice.value }}"/>
|
||||
|
||||
<div class="row">
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"
|
||||
for="{{ form.date.id_for_label }}">{{ form.date.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.date class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"
|
||||
for="{{ form.amount.id_for_label }}">{{ form.amount.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">£</div>
|
||||
{% render_field form.amount class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"
|
||||
for="{{ form.method.id_for_label }}">{{ form.method.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.method class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right col-sm-3 col-sm-offset-9">
|
||||
<div class="form-group">
|
||||
<input type="submit" class="form-control btn btn-primary"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,109 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load widget_tweaks %}
|
||||
{% load markdown_tags %}
|
||||
|
||||
{% block title %}Person | {{ object.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12">
|
||||
<h1>Person | {{ object.name }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'person_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">Person Details</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>{{ object.name }}</dd>
|
||||
|
||||
<dt>Phone</dt>
|
||||
<dd><a href="tel:{{ object.phone }}">{{ object.phone }}</a></dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd><a href="mailto:{{ object.email }}"><span class="overflow-ellipsis">{{ object.email }}</span></a></dd>
|
||||
|
||||
<dt>Address</dt>
|
||||
<dd>{{ object.address|linebreaksbr }}</dd>
|
||||
|
||||
<dt>Notes</dt>
|
||||
<dd>{{ object.notes|markdown }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Associated Organisations</div>
|
||||
<div class="panel-body">
|
||||
<div class="list-group">
|
||||
{% for organisation,count in object.organisations %}
|
||||
<a class="list-group-item" href="{% url 'organisation_detail' organisation.pk %}">{{ organisation.pk|stringformat:"05d" }} | {{ organisation.name }} <span class="badge" title="{{count}} events with {{object.name}} for {{organisation.name}}">{{count}}</span></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Associated Events</div>
|
||||
<div class="panel-body">
|
||||
{% with object.latest_events as events %}
|
||||
{% include 'RIGS/event_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if not request.is_ajax %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'person_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'person_history' object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% if request.is_ajax %}
|
||||
{% block footer %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'person_detail' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-eye-open"></span> Open Page</a>
|
||||
<a href="{% url 'person_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'person_history' object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
@@ -1,68 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}{% if object.pk %}Edit {{ object.name }}{% else %}Add Person{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<h3>{{ object.pk|yesno:"Edit,Add" }} Person</h3>
|
||||
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="row">
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.name class+="form-control" placeholder=form.name.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.phone.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.phone.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.email.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.email.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.email class+="form-control" type="email" placeholder=form.email.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.address.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.address.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.address class+="form-control" placeholder=form.address.label %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="{{ form.notes.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.notes.label }}#</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.notes class+="form-control" placeholder=form.notes.label %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary pull-right" type="submit"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,68 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load widget_tweaks %}
|
||||
{% load paginator from filters %}
|
||||
{% load url_replace from filters %}
|
||||
{% load orderby from filters %}
|
||||
|
||||
{% block title %}People{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>People</h3>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'person_create' %}" class="btn btn-default pull-right">New <span
|
||||
class="glyphicon glyphicon-plus"></span></a>
|
||||
</div>
|
||||
<div class="col-sm-3 col-sm-offset-9">
|
||||
<form class="form form-horizontal col-sm-12">
|
||||
<div class="form-group">
|
||||
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-right col-sm-12">{% paginator %}</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||
<td>Email</td>
|
||||
<td>Phone</td>
|
||||
<td>Notes</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in person_list %}
|
||||
<tr>
|
||||
<td>{{ person.pk }}</td>
|
||||
<td>{{ person.name }}</td>
|
||||
<td>{{ person.email }}</td>
|
||||
<td><a href="tel:{{ person.phone }}">{{ person.phone }}</a></td>
|
||||
<td>{{ person.notes|yesno|capfirst }}</td>
|
||||
<td>
|
||||
<a href="{% url 'person_detail' person.pk %}" class="btn btn-default modal-href">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
<a href="{% url 'person_update' person.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">No people stored</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{# pass in variable "profile" to this template #}
|
||||
|
||||
<button title="{{profile.name}}" type="button" class="btn btn-default btn-xs" data-container="body" data-html="true" data-trigger='hover focus' data-toggle="popover" data-content='
|
||||
<img src="{{profile.profile_picture}}" class="img-responsive img-rounded center-block" style="max-width:4em" />
|
||||
<dl class="dl-vertical">
|
||||
<dt>Email</dt>
|
||||
<dd>{{profile.email}}</dd>
|
||||
|
||||
<dt>Phone</dt>
|
||||
<dd>{{profile.phone}}</dd>
|
||||
</dl>
|
||||
'>{{profile.first_name}}</button>
|
||||
@@ -1,157 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
|
||||
{% block title %}RIGS Profile {{object.pk}}{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#urlParamForm').change(function(){
|
||||
url = "?";
|
||||
$('#urlParamForm *').filter(':input').each(function(index, value){
|
||||
defaultVal = $(value).data('default');
|
||||
param = $(value).val();
|
||||
val = $(value).prop('checked');
|
||||
|
||||
if(val != defaultVal){
|
||||
url = url+param+"="+val+"&";
|
||||
}
|
||||
});
|
||||
ics_url = $('#cal-url').data('url') + url.substring(0, url.length - 1);
|
||||
$('#cal-url').text(ics_url);
|
||||
|
||||
gcal_url = $('#gcal-link').data('url') + encodeURIComponent(url.substring(0, url.length - 1));
|
||||
$('#gcal-link').attr('href',gcal_url);
|
||||
});
|
||||
|
||||
$('#urlParamForm').change(); //Do the initial setting
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
|
||||
<div class="col-sm-6">
|
||||
<h3>{{object.name}}</h3>
|
||||
</div>
|
||||
{% if not request.is_ajax %}
|
||||
{% if object.pk == user.pk %}
|
||||
<div class="col-sm-6 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'profile_update_self' %}" class="btn btn-default">
|
||||
Edit Profile <span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
<a href="{% url 'password_change' %}" class="btn btn-default">
|
||||
Change Password <span class="glyphicon glyphicon-lock"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="col-sm-8 ">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>First Name</dt>
|
||||
<dd>{{object.first_name}}</dd>
|
||||
|
||||
<dt>Last Name</dt>
|
||||
<dd>{{object.last_name}}</dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd>{{object.email}}</dd>
|
||||
|
||||
<dt>Last Login</dt>
|
||||
<dd>{{object.last_login|date:"d/m/Y H:i"}}</dd>
|
||||
|
||||
<dt>Date Joined</dt>
|
||||
<dd>{{object.date_joined|date:"d/m/Y H:i"}}</dd>
|
||||
|
||||
<dt>Initials</dt>
|
||||
<dd>{{object.initials}}</dd>
|
||||
|
||||
<dt>Phone</dt>
|
||||
<dd><a href="tel:{{ object.phone }}">{{object.phone}}</a></dd>
|
||||
</dl>
|
||||
{% if not request.is_ajax %}
|
||||
{% if object.pk == user.pk %}
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'reset_api_key' %}" class="btn btn-default">
|
||||
{% if user.api_key %}Reset API Key{% else %}Generate API Key{% endif %}
|
||||
<span class="glyphicon glyphicon-repeat"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h4>Personal iCal Details</h4>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>API Key</dt>
|
||||
<dd>
|
||||
{% if user.api_key %}
|
||||
{{user.api_key}}
|
||||
{% else %}
|
||||
No API Key Generated
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Calendar Options</dt>
|
||||
<dd>
|
||||
<div class="well well-sm text-center">
|
||||
<form class="form-inline" id="urlParamForm">
|
||||
<div class="form-group">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" value="rig" data-default="true" checked> Rigs
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" value="non-rig" data-default="true" checked> Non-Rigs
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" value="dry-hire" data-default="true" checked> Dry-Hires
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" value="cancelled" data-default="false" > Cancelled
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" value="provisional" data-default="true" checked> Provisional
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" value="confirmed" data-default="true" checked> Confirmed/Booked
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</dd>
|
||||
<dt>Calendar URL</dt>
|
||||
<dd>
|
||||
{% if user.api_key %}
|
||||
<pre id="cal-url" data-url="http{{ request.is_secure|yesno:"s,"}}://{{ request.get_host }}{% url 'ics_calendar' api_pk=user.pk api_key=user.api_key %}"></pre>
|
||||
<small><a id="gcal-link" data-url="https://support.google.com/calendar/answer/37100" href="">Click here</a> for instructions on adding to google calendar.<br/>
|
||||
To sync from google calendar to mobile device, visit <a href="https://www.google.com/calendar/syncselect" target="_blank">this page</a> on your device and tick "RIGS Calendar".</small>
|
||||
{% else %}
|
||||
<pre>No API Key Generated</pre>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="center-block">
|
||||
<img src="{{object.profile_picture}}" class="img-responsive img-rounded" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h4>Events</h4>
|
||||
{% with object.latest_events as events %}
|
||||
{% include 'RIGS/event_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,71 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Update Profile {{object.name}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
{% include 'form_errors.html' %}
|
||||
<h3>Update Profile</h3>
|
||||
<div class="col-sm-6">
|
||||
<form action="{{form.action|default:request.path}}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="{{form.first_name.id_for_label}}" class="col-sm-4 control-label">{{form.first_name.label}}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.first_name class+="form-control" placeholder=form.first_name.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{form.last_name.id_for_label}}" class="col-sm-4 control-label">{{form.last_name.label}}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.last_name class+="form-control" placeholder=form.last_name.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{form.email.id_for_label}}" class="col-sm-4 control-label">{{form.email.label}}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.email type="email" class+="form-control" placeholder=form.email.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{form.initials.id_for_label}}" class="col-sm-4 control-label">{{form.initials.label}}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.initials class+="form-control" placeholder=form.initials.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{form.phone.id_for_label}}" class="col-sm-4 control-label">{{form.phone.label}}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.phone type="tel" class+="form-control" placeholder=form.phone.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary pull-right" type="submit"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 col-sm-offset-2">
|
||||
<div class="center-block">
|
||||
<a href="https://gravatar.com/">
|
||||
<img src="{{object.profile_picture}}" class="img-responsive img-rounded" />
|
||||
<div class="text-center">
|
||||
Images hosted by Gravatar
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,36 +0,0 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Rigboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="rigboard" class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>Rigboard</h3>
|
||||
</div>
|
||||
{% if perms.RIGS.add_event %}
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'event_create' %}" class="btn btn-default pull-right">New <span
|
||||
class="glyphicon glyphicon-plus"></span></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% comment %}
|
||||
{# Bring search back at a later date #}
|
||||
<div class="col-sm-3 col-sm-offset-9">
|
||||
<form class="form form-horizontal col-sm-12">
|
||||
<div class="form-group">
|
||||
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endcomment %}
|
||||
</div>
|
||||
{# .row #}
|
||||
|
||||
{% include 'RIGS/event_table.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,99 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load widget_tweaks %}
|
||||
{% load markdown_tags %}
|
||||
|
||||
{% block title %}Venue | {{ object.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% if not request.is_ajax %}
|
||||
<div class="col-sm-12">
|
||||
<h1>Venue | {{ object.name }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'venue_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">Venue Details</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>{{ object.name }}</dd>
|
||||
|
||||
<dt>Phone</dt>
|
||||
<dd><a href="tel:{{ object.phone }}">{{ object.phone }}</a></dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd><a href="mailto:{{ object.email }}"><span class="overflow-ellipsis">{{ object.email }}</span></a></dd>
|
||||
|
||||
<dt>Address</dt>
|
||||
<dd>{{ object.address|linebreaksbr }}</dd>
|
||||
|
||||
<dt>Notes</dt>
|
||||
<dd>{{ object.notes|markdown }}</dd>
|
||||
|
||||
<dt>Three Phase Available</dt>
|
||||
<dd>{{ object.three_phase_available|yesno|capfirst }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Associated Events</div>
|
||||
<div class="panel-body">
|
||||
{% with object.latest_events as events %}
|
||||
{% include 'RIGS/event_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not request.is_ajax %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'venue_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'venue_history' object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% if request.is_ajax %}
|
||||
{% block footer %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'venue_detail' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-eye-open"></span> Open Page</a>
|
||||
<a href="{% url 'venue_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'venue_history' object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
@@ -1,82 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}{{ object.pk|yesno:"Edit,Add" }} Venue{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<h3>{{ object.pk|yesno:"Edit,Add" }} Venue</h3>
|
||||
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.name class+="form-control" placeholder=form.name.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.phone.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.phone.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.email.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.email.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.email class+="form-control" type="email" placeholder=form.email.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.address.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.address.label }}</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.address class+="form-control" placeholder=form.address.label %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="{{ form.notes.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.notes.label }}#</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% render_field form.notes class+="form-control" placeholder=form.notes.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% render_field form.three_phase_available %} {{ form.three_phase_available.label }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary pull-right" type="submit"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,69 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load widget_tweaks %}
|
||||
{% load paginator from filters %}
|
||||
{% load url_replace from filters %}
|
||||
{% load orderby from filters %}
|
||||
|
||||
{% block title %}Venues{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>Venues</h3>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'venue_create' %}" class="btn btn-default pull-right">New <span
|
||||
class="glyphicon glyphicon-plus"></span></a>
|
||||
</div>
|
||||
<div class="col-sm-3 col-sm-offset-9">
|
||||
<form class="form form-horizontal col-sm-12">
|
||||
<div class="form-group">
|
||||
<input type="search" name="q" placeholder="Search" value="{{ request.GET.q }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-right col-sm-12">{% paginator %}</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||
<td>Email</td>
|
||||
<td>Phone</td>
|
||||
<td>Notes</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<td>{{ object.pk }}</td>
|
||||
<td>{{ object.name }}</td>
|
||||
<td>{{ object.email }}</td>
|
||||
<td><a href="tel:{{ object.phone }}">{{ object.phone }}</a></td>
|
||||
<td>{{ object.notes|yesno|capfirst }}</td>
|
||||
<td>
|
||||
<a href="{% url 'venue_detail' object.pk %}" class="btn btn-default modal-href">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
<a href="{% url 'venue_update' object.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-pencil"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">No venues found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,26 +0,0 @@
|
||||
{% if version.changes.item_changes or version.changes.field_changes or version.changes.old == None %}
|
||||
|
||||
{% for change in version.changes.field_changes %}
|
||||
|
||||
<button title="Changes to {{ change.field.verbose_name }}" type="button" class="btn btn-default btn-xs" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}
|
||||
{% include "RIGS/version_changes_change.html" %}
|
||||
{% endspaceless %}'>{{ change.field.verbose_name }}</button>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% for itemChange in version.changes.item_changes %}
|
||||
<button title="Changes to item '{% if itemChange.new %}{{ itemChange.new.name }}{% else %}{{ itemChange.old.name }}{% endif %}'" type="button" class="btn btn-default btn-xs" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='{% spaceless %}
|
||||
<ul class="list-group">
|
||||
{% for change in itemChange.field_changes %}
|
||||
<li class="list-group-item">
|
||||
<h4 class="list-group-item-heading">{{ change.field.verbose_name }}</h4>
|
||||
<div class="dont-break-out">{% include "RIGS/version_changes_change.html" %}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endspaceless %}'>item '{% if itemChange.new %}{{ itemChange.new.name }}{% else %}{{ itemChange.old.name }}{% endif %}'</button>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
nothing useful
|
||||
{% endif %}
|
||||
@@ -1,34 +0,0 @@
|
||||
{# pass in variable "change" to this template #}
|
||||
{% if change.linebreaks and change.new and change.old %}
|
||||
{% for diff in change.diff %}
|
||||
{% if diff.type == "insert" %}
|
||||
<ins class="dont-break-out">{{ diff.text|linebreaksbr }}</ins>
|
||||
{% elif diff.type == "delete" %}
|
||||
<del class="dont-break-out">{{diff.text|linebreaksbr}}</del>
|
||||
{% else %}
|
||||
<span class="dont-break-out">{{diff.text|linebreaksbr}}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% if change.old %}
|
||||
<del {% if change.long %}class="overflow-ellipsis"{% endif %}>
|
||||
{% if change.linebreaks %}
|
||||
{{change.old|linebreaksbr}}
|
||||
{% else %}
|
||||
{{change.old}}
|
||||
{% endif %}
|
||||
</del>
|
||||
{% endif %}
|
||||
{% if change.new and change.old %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% if change.new %}
|
||||
<ins {% if change.long %}class="overflow-ellipsis"{% endif %}>
|
||||
{% if change.linebreaks %}
|
||||
{{change.new|linebreaksbr}}
|
||||
{% else %}
|
||||
{{change.new}}
|
||||
{% endif %}
|
||||
</ins>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -1,68 +0,0 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load to_class_name from filters %}
|
||||
{% load paginator from filters %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{object|to_class_name}} {{ object.pk|stringformat:"05d" }} - Revision History{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script src="{% static "js/popover.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover().click(function(){
|
||||
if($(this).attr('href')){
|
||||
window.location.href = $(this).attr('href');
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h3><a href="{{ object.get_absolute_url }}">{{object|to_class_name}} {{ object.pk|stringformat:"05d" }}</a> - Revision History</h3>
|
||||
</div>
|
||||
<div class="text-right col-sm-12">{% paginator %}</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Version ID</td>
|
||||
<td>User</td>
|
||||
<td>Changes</td>
|
||||
<td>Comment</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for version in object_list %}
|
||||
|
||||
<tr>
|
||||
<td>{{ version.revision.date_created }}</td>
|
||||
<td>{{ version.pk }}|{{ version.revision.pk }}</td>
|
||||
<td>{{ version.revision.user.name }}</td>
|
||||
<td>
|
||||
{% if version.changes.old is None %}
|
||||
{{object|to_class_name}} Created
|
||||
{% else %}
|
||||
{% include 'RIGS/version_changes.html' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ version.revision.comment }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
9
RIGS/templates/admin_awaiting_approval.html
Normal file
9
RIGS/templates/admin_awaiting_approval.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'base_client_email.html' %}
|
||||
|
||||
{% block content %}
|
||||
<p>Hi {{ to_name|default_if_none:"Administrator" }},</p>
|
||||
|
||||
<p>{{ number_of_users|default_if_none:"Some" }} new users are awaiting administrator approval on RIGS. Click <a href="{{ request.scheme }}://{{ request.get_host }}{{ link_suffix }}">here</a> to approve them.</p>
|
||||
|
||||
<p>TEC PA & Lighting</p>
|
||||
{% endblock %}
|
||||
5
RIGS/templates/admin_awaiting_approval.txt
Normal file
5
RIGS/templates/admin_awaiting_approval.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Hi {{ to_name|default_if_none:"Administrator" }},
|
||||
|
||||
{{ number_of_users|default_if_none:"Some" }} new users are awaiting administrator approval on RIGS. Use this link to approve them: {{ request.scheme }}://{{ request.get_host }}/{{ link_suffix }}
|
||||
|
||||
TEC PA & Lighting
|
||||
91
RIGS/templates/base_rigs.html
Normal file
91
RIGS/templates/base_rigs.html
Normal file
@@ -0,0 +1,91 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% load static %}
|
||||
{% load invoices_waiting from filters %}
|
||||
{% load invoices_outstanding from filters %}
|
||||
{% load total_invoices_todo from filters %}
|
||||
|
||||
{% block titleheader %}
|
||||
<a class="navbar-brand" style="margin-left: auto; margin-right: auto;" href="/">RIGS</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block titleelements %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownRigboard" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Rigboard
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownRigboard">
|
||||
<a class="dropdown-item" href="{% url 'rigboard' %}"><span class="fas fa-list"></span>
|
||||
Rigboard</a>
|
||||
<a class="dropdown-item" href="{% url 'event_archive' %}"><span class="fas fa-book"></span>
|
||||
Archive</a>
|
||||
<a class="dropdown-item" href="{% url 'web_calendar' %}"><span class="fas fa-calendar"></span>
|
||||
Calendar</a>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<a class="dropdown-item" href="{% url 'activity_table' %}"><span
|
||||
class="fas fa-random"></span> Recent Changes</a>
|
||||
{% endif %}
|
||||
{% if perms.RIGS.add_event %}
|
||||
<a class="dropdown-item" href="{% url 'event_create' %}"><span class="fas fa-plus"></span>
|
||||
New Event</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% if perms.RIGS.view_riskassessment %}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownHS" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
H&S
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownHS">
|
||||
<a class="dropdown-item" href="{% url 'hs_list' %}"><span class="fas fa-eye"></span> Overview</a>
|
||||
<a class="dropdown-item" href="{% url 'ra_list' %}"><span class="fas fa-file-medical"></span> Risk Assessments</a>
|
||||
<a class="dropdown-item" href="{% url 'ec_list' %}"><span class="fas fa-tasks"></span> Event Checklists</a>
|
||||
</div>
|
||||
</li>
|
||||
{% 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 {% 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 {% 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 <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>
|
||||
{% endif %}
|
||||
{% if perms.RIGS.view_person %}
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'person_list' %}">People</a></li>
|
||||
{% endif %}
|
||||
{% if perms.RIGS.view_organisation %}
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'organisation_list' %}">Organisations</a></li>
|
||||
{% endif %}
|
||||
{% if perms.RIGS.view_venue %}
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'venue_list' %}">Venues</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block titleelements_right %}
|
||||
{% include 'partials/search.html' %}
|
||||
{% include 'partials/navbar_user.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
<script src="{% static 'js/popover.js' %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
197
RIGS/templates/calendar.html
Normal file
197
RIGS/templates/calendar.html
Normal file
@@ -0,0 +1,197 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Calendar{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="{% static 'css/main.css' %}" rel='stylesheet' />
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/moment.js' %}"></script>
|
||||
<script src="{% static 'js/main.js' %}"></script>
|
||||
<script>
|
||||
viewToUrl = {
|
||||
'timeGridWeek':'week',
|
||||
'timeGridDay':'day',
|
||||
'dayGridMonth':'month'
|
||||
}
|
||||
viewFromUrl = {
|
||||
'week':'timeGridWeek',
|
||||
'day':'timeGridDay',
|
||||
'month':'dayGridMonth'
|
||||
}
|
||||
var calendar; //Need to access it from jquery ready
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('calendar');
|
||||
|
||||
calendar = new FullCalendar.Calendar(calendarEl, {
|
||||
themeSystem: 'bootstrap',
|
||||
//defaultView: 'dayGridMonth', This is now default
|
||||
aspectRatio: 1.5,
|
||||
eventTimeFormat: {
|
||||
'hour': '2-digit',
|
||||
'minute': '2-digit',
|
||||
'hour12': false
|
||||
},
|
||||
//nowIndicator: true,
|
||||
//firstDay: 1,
|
||||
headerToolbar: false,
|
||||
editable: false,
|
||||
dayMaxEventRows: true, // allow "more" link when too many events
|
||||
events: function(fetchInfo, successCallback, failureCallback) {
|
||||
$.ajax({
|
||||
url: '/api/event',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
start: moment(fetchInfo.startStr).format("YYYY-MM-DD[T]HH:mm:ss"),
|
||||
end: moment(fetchInfo.endStr).format("YYYY-MM-DD[T]HH:mm:ss")
|
||||
},
|
||||
success: function(doc) {
|
||||
var events = [];
|
||||
colours = {
|
||||
'Provisional': '#FFE89B',
|
||||
'Confirmed': '#3AB54A' ,
|
||||
'Booked': '#3AB54A' ,
|
||||
'Cancelled': 'grey' ,
|
||||
'non-rig': '#25AAE2'
|
||||
};
|
||||
$(doc).each(function() {
|
||||
end = $(this).attr('latest')
|
||||
if(end.indexOf("T") < 0){ //If latest does not contain a time
|
||||
end = moment(end).add(1, 'days') //End date is non-inclusive, so add a day
|
||||
}
|
||||
|
||||
thisEvent = {
|
||||
'start': $(this).attr('earliest'),
|
||||
'end': end,
|
||||
'className': 'modal-href',
|
||||
'title': $(this).attr('title'),
|
||||
'url': $(this).attr('url')
|
||||
}
|
||||
|
||||
if($(this).attr('is_rig')===true || $(this).attr('status') === "Cancelled"){
|
||||
thisEvent['color'] = colours[$(this).attr('status')];
|
||||
}else{
|
||||
thisEvent['color'] = colours['non-rig'];
|
||||
}
|
||||
events.push(thisEvent);
|
||||
});
|
||||
successCallback(events);
|
||||
}
|
||||
});
|
||||
},
|
||||
datesSet: function(info) {
|
||||
var view = info.view;
|
||||
// Set the title of the view
|
||||
$('#calendar-header').text(view.title);
|
||||
|
||||
// Enable/Disable "Today" button as required
|
||||
let $today = $('#today-button');
|
||||
if(moment().isBetween(view.currentStart, view.currentEnd)){
|
||||
//Today is within the current view
|
||||
$today.prop('disabled', true);
|
||||
}else{
|
||||
$today.prop('disabled', false);
|
||||
}
|
||||
|
||||
// Set active view select button
|
||||
let $month = $('#month-button');
|
||||
let $week = $('#week-button');
|
||||
let $day = $('#day-button');
|
||||
switch(view.type){
|
||||
case 'dayGridMonth':
|
||||
$month.addClass('active');
|
||||
$week.removeClass('active');
|
||||
$day.removeClass('active');
|
||||
break;
|
||||
|
||||
case 'timeGridWeek':
|
||||
$month.removeClass('active');
|
||||
$week.addClass('active');
|
||||
$day.removeClass('active');
|
||||
break;
|
||||
|
||||
case 'timeGridDay':
|
||||
$month.removeClass('active');
|
||||
$week.removeClass('active');
|
||||
$day.addClass('active');
|
||||
break;
|
||||
}
|
||||
history.replaceState(null,null,"{% url 'web_calendar' %}"+viewToUrl[view.type]+'/'+moment(view.currentStart).format('YYYY-MM-DD')+'/');
|
||||
}
|
||||
});
|
||||
calendar.render();
|
||||
});
|
||||
$(document).ready(function() {
|
||||
// set some button listeners
|
||||
$('#next-button').click(function(){ calendar.next(); });
|
||||
$('#prev-button').click(function(){ calendar.prev(); });
|
||||
$('#today-button').click(function(){ calendar.today(); });
|
||||
$('#month-button').click(function(){ calendar.changeView('dayGridMonth'); });
|
||||
$('#week-button').click(function(){ calendar.changeView('timeGridWeek'); });
|
||||
$('#day-button').click(function(){ calendar.changeView('timeGridDay'); });
|
||||
$('#go-to-date-input').change(function(){
|
||||
if(moment($('#go-to-date-input').val()).isValid()){
|
||||
$('#go-to-date-button').prop('disabled', false);
|
||||
} else{
|
||||
$('#go-to-date-button').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
$('#go-to-date-button').click(function(){
|
||||
day = moment($('#go-to-date-input').val());
|
||||
if(day.isValid()){
|
||||
calendar.gotoDate(day.format("YYYY-MM-DD"));
|
||||
} else{
|
||||
alert('Invalid Date');
|
||||
}
|
||||
});
|
||||
{% if view and date %}
|
||||
// Go to the initial settings, if they're valid
|
||||
view = viewFromUrl['{{view}}'];
|
||||
calendar.changeView(view);
|
||||
day = moment('{{date}}');
|
||||
if(day.isValid()){
|
||||
calendar.gotoDate(day.format("YYYY-MM-DD"));
|
||||
} else{
|
||||
console.log('Supplied date is invalid - using default')
|
||||
}
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-left">
|
||||
<span id="calendar-header" class="h2"></span>
|
||||
</div>
|
||||
<div class="form-inline float-right btn-page my-3">
|
||||
<div class="input-group mx-2">
|
||||
<input type="date" class="form-control" id="go-to-date-input" placeholder="Go to date...">
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-success" id="go-to-date-button" type="button" disabled>Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="btn-group mx-2">
|
||||
<button type="button" class="btn btn-primary" id="today-button">Today</button>
|
||||
</div>
|
||||
<div class="btn-group mx-2">
|
||||
<button type="button" class="btn btn-secondary" id="prev-button"><span class="fas fa-chevron-left"></span></button>
|
||||
<button type="button" class="btn btn-secondary" id="next-button"><span class="fas fa-chevron-right"></span></button>
|
||||
</div>
|
||||
<div class="btn-group ml-2">
|
||||
<button type="button" class="btn btn-light" id="month-button">Month</button>
|
||||
<button type="button" class="btn btn-light" id="week-button">Week</button>
|
||||
<button type="button" class="btn btn-light" id="day-button">Day</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div id='calendar'></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
58
RIGS/templates/event_archive.html
Normal file
58
RIGS/templates/event_archive.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
{% load get_list from filters %}
|
||||
{% load button from filters %}
|
||||
{% load static %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="{% static 'css/selects.css' %}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}" async></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 py-2">
|
||||
<form class="form-inline" method="GET">
|
||||
<div class="input-group mx-2">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Start</span>
|
||||
</div>
|
||||
<input type="date" name="start" id="start" value="{{ start|default_if_none:'' }}" placeholder="Start" class="form-control" />
|
||||
</div>
|
||||
<div class="input-group mx-2">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">End</span>
|
||||
</div>
|
||||
<input type="date" name="end" id="end" value="{{ end|default_if_none:'' }}" placeholder="End" class="form-control" />
|
||||
</div>
|
||||
<div class="input-group mx-2">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Keyword</span>
|
||||
</div>
|
||||
<input type="search" name="q" placeholder="Keyword" value="{{ request.GET.q }}" class="form-control" />
|
||||
</div>
|
||||
<select class="selectpicker pr-3" multiple data-actions-box="true" data-none-selected-text="Status" data-actions-box="true" id="status" name="status">
|
||||
{% for status in statuses %}
|
||||
<option value="{{status.0}}" {% if status.0|safe in request.GET|get_list:'status' %}selected=""{% endif %}>{{status.1}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% button 'search' %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{% with object_list as events %}
|
||||
{% include 'partials/event_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% paginator %}
|
||||
|
||||
{% endblock %}
|
||||
252
RIGS/templates/event_checklist_detail.html
Normal file
252
RIGS/templates/event_checklist_detail.html
Normal file
@@ -0,0 +1,252 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load help_text from filters %}
|
||||
{% load profile_by_index from filters %}
|
||||
{% load yesnoi from filters %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-12 text-right my-3">
|
||||
{% button 'edit' url='ec_edit' pk=object.pk %}
|
||||
{% button 'view' url='event_detail' pk=object.event.pk text="Event" %}
|
||||
{% include 'partials/review_status.html' with perm=perms.RIGS.review_eventchecklist review='ec_review' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">General</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-6">Date</dt>
|
||||
<dd class="col-6">
|
||||
{{ object.date }}
|
||||
</dd>
|
||||
<dt class="col-6">Venue</dt>
|
||||
<dd class="col-6">
|
||||
{% if object.venue %}
|
||||
<a href="{% url 'venue_detail' object.venue.pk %}" class="modal-href">
|
||||
{{ object.venue }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
<dt class="col-6">{{ object|help_text:'power_mic' }}</dt>
|
||||
<dd class="col-6">
|
||||
{% if object.power_mic %}
|
||||
<a href="{% url 'profile_detail' object.power_mic.pk %}">{{ object.power_mic.name }}</a>
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
<p>List vehicles and their drivers</p>
|
||||
<ul>
|
||||
{% for i in object.vehicles.all %}
|
||||
<li>{{i}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Safety Checks</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'safe_parking'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.safe_parking|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'safe_packing'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.safe_packing|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'exits'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.exits|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'trip_hazard'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.trip_hazard|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'warning_signs'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.warning_signs|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'ear_plugs'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.ear_plugs|yesnoi }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Crew Record</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Crewmember</th>
|
||||
<th scope="col">Start Time</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col">End Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="crewmemberst">
|
||||
{% for crew in object.crew.all %}
|
||||
<tr>
|
||||
<td>{{crew.crewmember}}</td>
|
||||
<td>{{crew.start}}</td>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Power {% include 'partials/event_size.html' with object=object.event.riskassessment %}</div>
|
||||
<div class="card-body">
|
||||
{% if object.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">
|
||||
{{ object.source_rcd|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'labelling'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.labelling|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>
|
||||
<hr>
|
||||
<p>Tests at first distro</p>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Test</th>
|
||||
<th scope="col" colspan="3" class="text-center">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row" rowspan="2">Voltage<br><small>(cube meter)</small></th>
|
||||
<th>{{ object|help_text:'fd_voltage_l1' }}</th>
|
||||
<th>{{ object|help_text:'fd_voltage_l2' }}</th>
|
||||
<th>{{ object|help_text:'fd_voltage_l3' }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ object.fd_voltage_l1 }}</td>
|
||||
<td>{{ object.fd_voltage_l2 }}</td>
|
||||
<td>{{ object.fd_voltage_l3 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'fd_phase_rotation'|safe }}</th>
|
||||
<td colspan="3">{{ object.fd_phase_rotation|yesnoi }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'fd_earth_fault'|safe}}</th>
|
||||
<td colspan="3">{{ object.fd_earth_fault }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'fd_pssc'}}</th>
|
||||
<td colspan="3">{{ object.fd_pssc }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<p>Tests at 'Worst Case' points (at least 1 point required)</p>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Test</th>
|
||||
<th scope="col" class="text-center">Point 1</th>
|
||||
<th scope="col" class="text-center">Point 2</th>
|
||||
<th scope="col" class="text-center">Point 3</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'w1_description'|safe}}</th>
|
||||
<td>{{ object.w1_description }}</td>
|
||||
<td>{{ object.w2_description|default:'' }}</td>
|
||||
<td>{{ object.w3_description|default:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'w1_polarity'|safe}}</th>
|
||||
<td>{{ object.w1_polarity|yesnoi }}</td>
|
||||
<td>{{ object.w2_polarity|default:''|yesnoi }}</td>
|
||||
<td>{{ object.w3_polarity|default:''|yesnoi }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'w1_voltage'|safe}}</th>
|
||||
<td>{{ object.w1_voltage }}</td>
|
||||
<td>{{ object.w2_voltage|default:'' }}</td>
|
||||
<td>{{ object.w3_voltage|default:'' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{ object|help_text:'w1_earth_fault'|safe}}</th>
|
||||
<td>{{ object.w1_earth_fault }}</td>
|
||||
<td>{{ object.w2_earth_fault|default:'' }}</td>
|
||||
<td>{{ object.w3_earth_fault|default:'' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'all_rcds_tested'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.all_rcds_tested|yesnoi }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'public_sockets_tested'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.public_sockets_tested|yesnoi }}
|
||||
</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
{% include 'partials/ec_power_info.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 text-right">
|
||||
{% button 'edit' url='ec_edit' pk=object.pk %}
|
||||
{% button 'view' url='event_detail' pk=object.pk text="Event" %}
|
||||
{% include 'partials/review_status.html' with perm=perms.RIGS.review_eventchecklist review='ec_review' %}
|
||||
</div>
|
||||
<div class="col-12 text-right">
|
||||
{% include 'partials/last_edited.html' with target="eventchecklist_history" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
357
RIGS/templates/event_checklist_form.html
Normal file
357
RIGS/templates/event_checklist_form.html
Normal file
@@ -0,0 +1,357 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
{% load help_text from filters %}
|
||||
{% load profile_by_index from filters %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="{% static 'css/selects.css' %}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/autocompleter.js' %}"></script>
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
|
||||
{% include 'partials/datetime-fix.html' %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('button[data-action=add]').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
let target = $($(this).attr('data-target'));
|
||||
let newID = Number(target.attr('data-pk'));
|
||||
let newRow = $($(this).attr('data-clone'))
|
||||
.clone().attr('style', "")
|
||||
.attr('id', function(i, val){
|
||||
return val.split("_")[0] + '_' + newID;
|
||||
})
|
||||
.appendTo(target);
|
||||
newRow.find('select,input').attr('name', function(i, val){
|
||||
return val.split("_")[0] + '_' + newID;
|
||||
})//Disabled is to prevent the hidden row being sent to the form
|
||||
.removeAttr('disabled');
|
||||
newRow.find('button[data-action=delete]').attr('data-id', newID);
|
||||
newRow.find('select').addClass('selectpicker');
|
||||
newRow.find('.selectpicker').selectpicker('refresh');
|
||||
$(".selectpicker").each(function(){initPicker($(this))});
|
||||
initDatetime();
|
||||
$(target).attr('data-pk', newID - 1);
|
||||
});
|
||||
$(document).on('click', 'button[data-action=delete]', function(event) {
|
||||
event.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
});
|
||||
//Somewhat rudimentary way of ensuring people fill in completely (if it hits the database validation the whole table row disappears when the page reloads...)
|
||||
//the not is to avoid adding it to some of bootstrap-selects extra crap
|
||||
$('#vehiclest,#crewmemberst').on('change', 'select,input', function () {
|
||||
$(this).closest('tr').find("select,input").not(':input[type=search]').attr('required', 'true');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-12">
|
||||
{% include 'form_errors.html' %}
|
||||
{% if edit %}
|
||||
<form role="form" method="POST" action="{% url 'ec_edit' pk=object.pk %}">
|
||||
{% else %}
|
||||
<form role="form" method="POST" action="{% url 'event_ec' pk=event.pk %}">
|
||||
{% endif %}
|
||||
<input type="hidden" name="{{ form.event.name }}" id="{{ form.event.id_for_label }}"
|
||||
value="{{event.pk}}"/>
|
||||
{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Event Information</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-4">Event Date</dt>
|
||||
<dd class="col-8">{{ event.start_date}}{%if event.end_date %}-{{ event.end_date}}{%endif%}</dd>
|
||||
<dt class="col-4">Event Name</dt>
|
||||
<dd class="col-8">{{ event.name }}</dd>
|
||||
<dt class="col-4">Client</dt>
|
||||
<dd class="col-8">{{ event.person }}</dd>
|
||||
<dt class="col-4">Event Size</dt>
|
||||
<dd class="col-8">{% include 'partials/event_size.html' with object=event.riskassessment %}</dd>
|
||||
</dl>
|
||||
<div class="form-group form-row">
|
||||
<label for="{{ form.date.id_for_label }}"
|
||||
class="col-4 col-form-label">{{ form.date.label }}</label>
|
||||
{% if not form.date.value %}
|
||||
{% render_field form.date class+="form-control col-8" value=event.start_date %}
|
||||
{% else %}
|
||||
{% render_field form.date class+="form-control col-8" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-group form-row" id="{{ form.venue.id_for_label }}-group">
|
||||
<label for="{{ form.venue.id_for_label }}"
|
||||
class="col-4 col-form-label">{{ form.venue.label }}</label>
|
||||
<select id="{{ form.venue.id_for_label }}" name="{{ form.venue.name }}" class="form-control selectpicker col-8" data-live-search="true" data-sourceurl="{% url 'api_secure' model='venue' %}">
|
||||
{% if venue %}
|
||||
<option value="{{venue.pk}}" selected="selected">{{ venue.name }}</option>
|
||||
{% elif event.venue %}
|
||||
<option value="{{event.venue.pk}}" selected="selected">{{ event.venue.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group form-row" id="{{ form.power_mic.id_for_label }}-group">
|
||||
<label for="{{ form.power_mic.id_for_label }}"
|
||||
class="col-4 col-form-label">{{ form.power_mic.help_text }}</label>
|
||||
<select id="{{ form.power_mic.id_for_label }}" name="{{ form.power_mic.name }}" class="form-control selectpicker col-8" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials" required="true">
|
||||
{% if power_mic %}
|
||||
<option value="{{power_mic.pk}}" selected="selected">{{ power_mic.name }}</option>
|
||||
{% elif event.riskassessment.power_mic %}
|
||||
<option value="{{event.riskassessment.power_mic.pk}}" selected="selected">{{ event.riskassessment.power_mic.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<p class="pt-3 font-weight-bold">List vehicles and their drivers</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Vehicle</th>
|
||||
<th scope="col">Driver</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="vehiclest" data-pk="-1">
|
||||
<tr id="vehicles_new" style="display: none;">
|
||||
<td><input type="text" class="form-control" name="vehicle_new" disabled="true"/></td>
|
||||
<td><select data-container="body" class="form-control" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials" name="driver_new" disabled="true"></select></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm mt-1" data-action='delete' data-target='#vehicle'><span class="fas fa-times"></span></button></td>
|
||||
</tr>
|
||||
{% for i in object.vehicles.all %}
|
||||
<tr id="vehicles_{{i.pk}}">
|
||||
<td><input name="vehicle_{{i.pk}}" type="text" class="form-control" value="{{ i.vehicle }}"/></td>
|
||||
<td>
|
||||
<select data-container="body" name="driver_{{i.pk}}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if i.driver != '' %}
|
||||
<option value="{{i.driver.pk}}" selected="selected">{{ i.driver.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm mt-1" data-id='{{i.pk}}' data-action='delete' data-target='#vehicle'><span class="fas fa-times"></span></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="button" class="btn btn-secondary" id="vehicle-add" data-action='add' data-target='#vehiclest' data-clone='#vehicles_new'><span class="fas fa-plus"></span> Add Vehicle</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Safety Checks</div>
|
||||
<div class="card-body">
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.safe_parking %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.safe_packing %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.exits %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.trip_hazard %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.warning_signs %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.ear_plugs %}
|
||||
<div class="row pt-3">
|
||||
<label class="col-5" for="{{ form.hs_location.id_for_label }}">{{ form.hs_location.help_text }}</label>
|
||||
{% render_field form.hs_location class+="form-control col-7 col-md-4" %}
|
||||
</div>
|
||||
<div class="row pt-1">
|
||||
<label class="col-5" for="{{ form.extinguishers_location.id_for_label }}">{{ form.extinguishers_location.help_text }}</label>
|
||||
{% render_field form.extinguishers_location class+="form-control col-7 col-md-4" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Crew Record</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Person</th>
|
||||
<th scope="col">Start Time</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col">End Time</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="crewmemberst" data-pk="-1">
|
||||
<tr id="crew_new" style="display: none;">
|
||||
<td>
|
||||
<select name="crewmember_new" class="form-control" data-container="body" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials" disabled="true"></select>
|
||||
</td>
|
||||
<td style="min-width: 15ch"><input name="start_new" type="datetime-local" class="form-control" value="{{ i.start }}" disabled=""/></td>
|
||||
<td style="min-width: 15ch"><input name="role_new" type="text" class="form-control" value="{{ i.role }}" disabled="true"/></td>
|
||||
<td style="min-width: 15ch"><input name="end_new" type="datetime-local" class="form-control" value="{{ i.end }}" disabled="true" /></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm mt-1" data-id='{{crew.pk}}' data-action='delete' data-target='#crewmember'><span class="fas fa-times"></span></button></td>
|
||||
</tr>
|
||||
{% for crew in object.crew.all %}
|
||||
<tr id="crew_{{crew.pk}}">
|
||||
<td>
|
||||
<select data-container="body" name="crewmember_{{crew.pk}}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if crew.crewmember != '' %}
|
||||
<option value="{{crew.crewmember.pk}}" selected="selected">{{ crew.crewmember.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</td>
|
||||
<td><input name="start_{{crew.pk}}" type="datetime-local" class="form-control" value="{{ crew.start|date:'Y-m-d' }}T{{ crew.start|date:'H:i:s' }}"/></td>
|
||||
<td><input name="role_{{crew.pk}}" type="text" class="form-control" value="{{ crew.role }}"/></td>
|
||||
<td><input name="end_{{crew.pk}}" type="datetime-local" class="form-control" value="{{ crew.end|date:'Y-m-d' }}T{{ crew.end|date:'H:i:s' }}"/></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm mt-1" data-id='{{crew.pk}}' data-action='delete' data-target='#crewmember'><span class="fas fa-times"></span></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="text-right">
|
||||
<button type="button" class="btn btn-secondary" data-action='add' data-target='#crewmemberst' data-clone='#crew_new'><span class="fas fa-plus"></span> Add Crewmember</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if event.riskassessment.event_size == 0 %}
|
||||
<div class="row my-3" id="size-0">
|
||||
<div class="col-12">
|
||||
<div class="card border-success">
|
||||
<div class="card-header">Electrical Checks <small>for ‘Small’ TEC Events <6kVA (approx. 26A)</small></div>
|
||||
<div class="card-body">
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.rcds %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.supply_test %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.earthing %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.pat %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% 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 %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.pat %}
|
||||
<hr>
|
||||
<p>Tests at first distro</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Test</th>
|
||||
<th scope="col" colspan="3" class="text-center">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row" rowspan="2">Voltage<br><small>(cube meter)</small></th>
|
||||
<th class="text-center">{{ form.fd_voltage_l1.help_text }}</th>
|
||||
<th class="text-center">{{ form.fd_voltage_l2.help_text }}</th>
|
||||
<th class="text-center">{{ form.fd_voltage_l3.help_text }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% render_field form.fd_voltage_l1 class+="form-control" style="min-width: 5rem;" %}</td>
|
||||
<td>{% render_field form.fd_voltage_l2 class+="form-control" style="min-width: 5rem;" %}</td>
|
||||
<td>{% render_field form.fd_voltage_l3 class+="form-control" style="min-width: 5rem;" %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{form.fd_phase_rotation.help_text|safe}}</th>
|
||||
<td colspan="3">{% include 'partials/checklist_checkbox.html' with formitem=form.fd_phase_rotation %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{form.fd_earth_fault.help_text|safe}}</th>
|
||||
<td colspan="3">{% render_field form.fd_earth_fault class+="form-control" %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{form.fd_pssc.help_text|safe}}</th>
|
||||
<td colspan="3">{% render_field form.fd_pssc class+="form-control" %}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
<p>Tests at 'Worst Case' points (at least 1 point required)</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">Test</th>
|
||||
<th scope="col" class="text-center">Point 1</th>
|
||||
<th scope="col" class="text-center">Point 2</th>
|
||||
<th scope="col" class="text-center">Point 3</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">{{form.w1_description.help_text|safe}}</th>
|
||||
<td>{% render_field form.w1_description class+="form-control" style="min-width: 5rem;" %}</td>
|
||||
<td>{% render_field form.w2_description class+="form-control" style="min-width: 5rem;" %}</td>
|
||||
<td>{% render_field form.w3_description class+="form-control" style="min-width: 5rem;" %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{form.w1_polarity.help_text|safe}}</th>
|
||||
<td>{% render_field form.w1_polarity %}</td>
|
||||
<td>{% render_field form.w2_polarity %}</td>
|
||||
<td>{% render_field form.w3_polarity %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{form.w1_voltage.help_text|safe}}</th>
|
||||
<td>{% render_field form.w1_voltage class+="form-control" %}</td>
|
||||
<td>{% render_field form.w2_voltage class+="form-control" %}</td>
|
||||
<td>{% render_field form.w3_voltage class+="form-control" %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{{form.w1_earth_fault.help_text|safe}}</th>
|
||||
<td>{% render_field form.w1_earth_fault class+="form-control" %}</td>
|
||||
<td>{% render_field form.w2_earth_fault class+="form-control" %}</td>
|
||||
<td>{% render_field form.w3_earth_fault class+="form-control" %}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr/>
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.all_rcds_tested %}
|
||||
{% include 'partials/checklist_checkbox.html' with formitem=form.public_sockets_tested %}
|
||||
{% include 'partials/ec_power_info.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm-12 text-right">
|
||||
{% button 'submit' %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
74
RIGS/templates/event_detail.html
Normal file
74
RIGS/templates/event_detail.html
Normal file
@@ -0,0 +1,74 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row my-3 py-3">
|
||||
{% if not request.is_ajax %}
|
||||
{% if perms.RIGS.view_event %}
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'partials/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-md-6">
|
||||
{% include 'partials/contact_details.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-md-6">
|
||||
{% include 'partials/event_details.html' %}
|
||||
</div>
|
||||
{% if not event.dry_hire %}
|
||||
<div class="col {% if event.is_rig %}py-3{%endif %}">
|
||||
{% include 'partials/hs_details.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if event.is_rig %}
|
||||
{% if event.is_rig and event.internal and perms.RIGS.view_event %}
|
||||
<div class="col-md-8 py-3">
|
||||
{% include 'partials/auth_details.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not request.is_ajax and perms.RIGS.view_event %}
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'partials/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 %}
|
||||
<h4>Notes</h4>
|
||||
<hr>
|
||||
<p class="dont-break-out">{{ event.notes|linebreaksbr }}</p>
|
||||
{% endif %}
|
||||
<br>
|
||||
{% include 'partials/item_table.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not request.is_ajax and perms.RIGS.view_event %}
|
||||
<div class="col-sm-12 text-right">
|
||||
{% include 'partials/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 %}
|
||||
89
RIGS/templates/event_embed.html
Normal file
89
RIGS/templates/event_embed.html
Normal file
@@ -0,0 +1,89 @@
|
||||
{% extends 'base_embed.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra-head %}
|
||||
<link href="{% static 'fontawesome_free/css/fontawesome.css' %}" rel="stylesheet" type="text/css">
|
||||
<link href="{% static 'fontawesome_free/css/solid.css' %}" rel="stylesheet" type="text/css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<span class="float-right">
|
||||
{% if object.mic %}
|
||||
<div class="text-center">
|
||||
<img src="{{ object.mic.profile_picture }}" class="event-mic-photo rounded"/>
|
||||
</div>
|
||||
{% elif object.is_rig %}
|
||||
<span class="fas fa-exclamation-sign"></span>
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
<h3>
|
||||
<a href="{% url 'event_detail' object.pk %}">{{ object.display_id }} | {{ object.name }}</a>
|
||||
{% if object.venue %}
|
||||
<small>at {{ object.venue }}</small>
|
||||
{% endif %}
|
||||
<br/><small>
|
||||
{{ object.start_date|date:"D d/m/Y" }}
|
||||
{% if object.has_start_time %}
|
||||
{{ object.start_time|date:"H:i" }}
|
||||
{% endif %}
|
||||
{% if object.end_date or object.has_end_time %}
|
||||
–
|
||||
{% endif %}
|
||||
{% if object.end_date and object.end_date != object.start_date %}
|
||||
{{ object.end_date|date:"D d/m/Y" }}
|
||||
{% endif %}
|
||||
{% if object.has_end_time %}
|
||||
{{ object.end_time|date:"H:i" }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</h3>
|
||||
{% include 'partials/event_status.html' %}
|
||||
<div class="row ml-2">
|
||||
<div class="col-xs-6 pr-2">
|
||||
<p>
|
||||
{% if object.is_rig %}
|
||||
<strong>Client:</strong> {{ object.person.name }}
|
||||
{% if object.organisation %}
|
||||
for {{ object.organisation.name }}
|
||||
{% endif %}
|
||||
{% if object.dry_hire %}(Dry Hire){% endif %}
|
||||
{% else %}
|
||||
<strong>Non-Rig</strong>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
<strong>MIC:</strong>
|
||||
{% if object.mic %}
|
||||
{{object.mic.name}}
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-6 px-2">
|
||||
{% if object.meet_at %}
|
||||
<p>
|
||||
<strong>Crew meet:</strong>
|
||||
{{ object.meet_at|date:"H:i" }} {{ object.meet_at|date:"(Y-m-d)" }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if object.access_at %}
|
||||
<p>
|
||||
<strong>Access at:</strong>
|
||||
{{ object.access_at|date:"H:i" }} {{ object.access_at|date:"(Y-m-d)" }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<strong>Last updated:</strong>
|
||||
{{ object.last_edited_at }} by "{{ object.last_edited_by.initials }}"
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% if object.description %}
|
||||
<p>
|
||||
<strong>Description: </strong>
|
||||
{{ object.description|linebreaksbr }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
360
RIGS/templates/event_form.html
Normal file
360
RIGS/templates/event_form.html
Normal file
@@ -0,0 +1,360 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
{% load multiply from filters %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/selects.css' %}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/autocompleter.js' %}"></script>
|
||||
<script src="{% static 'js/interaction.js' %}"></script>
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
|
||||
{% include 'partials/datetime-fix.html' %}
|
||||
|
||||
<script>
|
||||
const matches = window.matchMedia("(prefers-reduced-motion: reduce)").matches || window.matchMedia("(update: slow)").matches;
|
||||
$(document).ready(function () {
|
||||
dur = matches ? 0 : 500;
|
||||
{% if object.pk %}
|
||||
// Editing
|
||||
{% if not object.is_rig %}
|
||||
$('.form-is_rig').hide();
|
||||
{% endif %}
|
||||
//Creation
|
||||
{% else %}
|
||||
// If there were errors, apply the previous Rig/not-Rig selection
|
||||
{% if form.errors %}
|
||||
$('.form-hws').show();
|
||||
if ($('#{{form.is_rig.auto_id}}').attr('checked') !== 'checked') {
|
||||
$('.form-is_rig').hide();
|
||||
}
|
||||
{% else %}
|
||||
//Initial hide
|
||||
$('.form-hws').slideUp(dur);
|
||||
{% endif %}
|
||||
//Button handling
|
||||
$('#is_rig-selector button').on('click', function () {
|
||||
$('.form-non_rig').slideDown(dur); //Non rig stuff also needed for rig, so always slide down
|
||||
if ($(this).data('is_rig') === 1) {
|
||||
$('#{{form.is_rig.auto_id}}').prop('checked', true);
|
||||
if ($('.form-non_rig').is(':hidden')) {
|
||||
$('.form-is_rig').show();
|
||||
} else {
|
||||
$('.form-is_rig').slideDown(dur);
|
||||
}
|
||||
$('.form-hws, .form-hws .form-is_rig').css('overflow', 'visible');
|
||||
} else {
|
||||
$('#{{form.is_rig.auto_id}}').prop('checked', false);
|
||||
$('.form-is_rig').slideUp(dur);
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
setupItemTable($("#{{ form.items_json.id_for_label }}").val());
|
||||
});
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'item_modal.html' %}
|
||||
<form class="itemised_form" role="form" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{% include 'form_errors.html' %}
|
||||
</div>
|
||||
{% render_field form.is_rig style="display: none" %}
|
||||
<input type="hidden" name="{{ form.items_json.name }}" id="{{ form.items_json.id_for_label }}"
|
||||
value="{{ form.items_json.value }}"/>
|
||||
|
||||
{# New rig buttons #}
|
||||
{% if not object.pk %}
|
||||
<div class="col-sm-12">
|
||||
<div class="card text-center" id="is_rig-selector">
|
||||
<div class="card-body">
|
||||
<span data-toggle="tooltip"
|
||||
title="Anything that involves TEC kit, crew, or otherwise us providing a service to anyone.">
|
||||
<button type="button" class="btn btn-primary w-25" data-is_rig="1">Rig</button>
|
||||
</span>
|
||||
<span data-toggle="tooltip"
|
||||
title="Things that aren't service-based, like training, meetings and site visits.">
|
||||
<button type="button" class="btn btn-info w-25" data-is_rig="0">Non-Rig</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Contact details #}
|
||||
<div class="col-md-6 mt-3">
|
||||
<div class="card form-hws form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %} mb-3" {% if not object.pk and not form.errors %}style="display: none;"{% endif%}>
|
||||
<div class="card-header">Contact Details</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group" data-toggle="tooltip" title="The main contact for the event, can be left blank if purely an organisation">
|
||||
<label for="{{ form.person.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.person.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-md-7 col-lg-8">
|
||||
<select id="{{ form.person.id_for_label }}" name="{{ form.person.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='person' %}">
|
||||
{% if person %}
|
||||
<option value="{{form.person.value}}" selected="selected" data-update_url="{% url 'person_update' form.person.value %}">{{ person }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3 col-md-5 col-lg-4 align-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'person_create' %}" class="btn btn-success modal-href"
|
||||
data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="fas fa-plus"></span>
|
||||
</a>
|
||||
<a {% if form.person.value %}href="{% url 'person_update' form.person.value %}"{% endif %} class="btn btn-warning modal-href" id="{{ form.person.id_for_label }}-update" data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="fas fa-user-edit"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-toggle="tooltip" title="The client organisation, leave blank if client is an individual">
|
||||
<label for="{{ form.organisation.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.organisation.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-md-7 col-lg-8">
|
||||
<select id="{{ form.organisation.id_for_label }}" name="{{ form.organisation.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='organisation' %}" >
|
||||
{% if organisation %}
|
||||
<option value="{{form.organisation.value}}" selected="selected" data-update_url="{% url 'organisation_update' form.organisation.value %}">{{ organisation }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3 col-md-5 col-lg-4 align-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'organisation_create' %}" class="btn btn-success modal-href"
|
||||
data-target="#{{ form.organisation.id_for_label }}">
|
||||
<span class="fas fa-plus"></span>
|
||||
</a>
|
||||
<a {% if form.organisation.value %}href="{% url 'organisation_update' form.organisation.value %}"{% endif %} class="btn btn-warning modal-href" id="{{ form.organisation.id_for_label }}-update" data-target="#{{ form.organisation.id_for_label }}">
|
||||
<span class="fas fa-edit"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card form-hws form-non_rig mb-3" {% if not object.pk and not form.errors %}style="display: none;"{% endif%}>
|
||||
<div class="card-header">Event Description</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group" data-toggle="tooltip" title="A short description of the event, shown on rigboard and on paperwork">
|
||||
<label for="{{ form.description.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.description.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.description class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Event details #}
|
||||
<div class="col-md-6 my-3">
|
||||
<div class="card card-default form-hws form-non_rig" {% if not object.pk and not form.errors %}style="display: none;"{% endif%}>
|
||||
<div class="card-header">Event Details</div>
|
||||
<div class="card-body">
|
||||
<div id="form-hws">
|
||||
<div class="form-group" data-toggle="tooltip" title="Name of the event, displays on rigboard and on paperwork">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.name class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-toggle="tooltip" title="The venue for the rig, leave blank if unknown (e.g. for a dry hire)">
|
||||
<label for="{{ form.venue.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.venue.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-9 col-md-7 col-lg-8">
|
||||
<select id="{{ form.venue.id_for_label }}" name="{{ form.venue.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='venue' %}">
|
||||
{% if venue %}
|
||||
<option value="{{form.venue.value}}" selected="selected" data-update_url="{% url 'venue_update' form.venue.value %}">{{ venue }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3 col-md-5 col-lg-4 align-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'venue_create' %}" class="btn btn-success modal-href"
|
||||
data-target="#{{ form.venue.id_for_label }}">
|
||||
<span class="fas fa-plus"></span>
|
||||
</a>
|
||||
<a href="{% if object.venue %}{% url 'venue_update' object.venue.pk %}{% endif %}" class="btn btn-warning modal-href" id="{{ form.venue.id_for_label }}-update" data-target="#{{ form.venue.id_for_label }}">
|
||||
<span class="fas fa-edit"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ form.start_date.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.start_date.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-7" data-toggle="tooltip" title="Start date for event, required">
|
||||
{% render_field form.start_date class+="form-control" %}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-5" data-toggle="tooltip" title="Start time of event, can be left blank">
|
||||
{% render_field form.start_time class+="form-control" step="60" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ form.end_date.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.end_date.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-7" data-toggle="tooltip" title="End date of event, leave blank if unknown or same as start date">
|
||||
{% render_field form.end_date class+="form-control" %}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-5" data-toggle="tooltip" title="End time of event, leave blank if unknown">
|
||||
{% render_field form.end_time class+="form-control" step="60" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Rig only information #}
|
||||
<div class="form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="form-group" data-toggle="tooltip" title="The date/time at which TEC have access to the venue">
|
||||
<label for="{{ form.access_at.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.access_at.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.access_at class+="form-control" step="60" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-toggle="tooltip" title="The date/time at which crew should meet for this event">
|
||||
<label for="{{ form.meet_at.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.meet_at.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.meet_at class+="form-control" step="60" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<div class="checkbox">
|
||||
<label data-toggle="tooltip" title="Mark this event as a dry-hire, so it needs to be checked in at the end">
|
||||
{% render_field form.dry_hire %}{{ form.dry_hire.label }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Status is needed on all events types and it looks good here in the form #}
|
||||
<div class="form-group" data-toggle="tooltip" title="The current status of the event. Only mark as booked once paperwork is received">
|
||||
<label for="{{ form.status.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.status.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.status class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}">
|
||||
<div class="form-group" data-toggle="tooltip" title="The Member in Charge of this event">
|
||||
<label for="{{ form.mic.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.mic.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<select id="{{ form.mic.id_for_label }}" name="{{ form.mic.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if mic %}
|
||||
<option value="{{form.mic.value}}" selected="selected" >{{ mic.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if object.dry_hire %}
|
||||
<div class="form-group" data-toggle="tooltip" title="The person who checked-in this dry hire">
|
||||
<label for="{{ form.checked_in_by.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.checked_in_by.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<select id="{{ form.checked_in_by.id_for_label }}" name="{{ form.checked_in_by.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if checked_in_by %}
|
||||
<option value="{{form.checked_in_by.value}}" selected="selected" >{{ checked_in_by.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group" data-toggle="tooltip" title="The student ID of the client who collected the dry-hire">
|
||||
<label for="{{ form.collector.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.collector.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.collector class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" data-toggle="tooltip" title="The purchase order number (for external clients)">
|
||||
<label for="{{ form.purchase_order.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.purchase_order.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.purchase_order class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Notes and item shit #}
|
||||
<div class="col-sm-12">
|
||||
<div class="card card-default form-hws form-is_rig {% if object.pk and not object.is_rig %}hidden{% endif %}" {% if not object.pk and not form.errors %}style="display: none;"{% endif%}>
|
||||
<div class="card-body">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group" data-toggle="tooltip" title="Notes on the event. This is only visible to keyholders, and is not displayed on the paperwork">
|
||||
<label for="{{ form.notes.id_for_label }}">{{ form.notes.label }}</label>
|
||||
{% render_field form.notes class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'partials/item_table.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 text-right form-hws form-non_rig my-3" {% if not object.pk and not form.errors %}style="display: none;"{% endif%}>
|
||||
{% button 'submit' %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,12 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
{% load multiply from filters %}
|
||||
{% load static %}
|
||||
<!DOCTYPE document SYSTEM "rml.dtd">
|
||||
|
||||
<document filename="Event {{ object.id }} - {{ object.name }} - {{ object.start_date }}.pdf">
|
||||
<document filename="{{filename}}">
|
||||
<docinit>
|
||||
<registerTTFont faceName="OpenSans" fileName="{{ fonts.opensans.regular }}"/>
|
||||
<registerTTFont faceName="OpenSans-Bold" fileName="{{ fonts.opensans.bold }}"/>
|
||||
<registerTTFont faceName="OpenSans" fileName="static/fonts/OpenSans-Regular.tff"/>
|
||||
<registerTTFont faceName="OpenSans-Bold" fileName="static/fonts/OpenSans-Bold.tff"/>
|
||||
<registerFontFamily name="OpenSans" bold="OpenSans-Bold" boldItalic="OpenSans-Bold"/>
|
||||
</docinit>
|
||||
|
||||
@@ -77,24 +74,16 @@
|
||||
<lineStyle kind="linebelow" start="3,0" stop="3,0" colorName="black"/>
|
||||
<lineStyle kind="linebelow" start="5,0" stop="5,0" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<listStyle name="ol"
|
||||
bulletFormat="%s."
|
||||
bulletFontSize="10" />
|
||||
|
||||
<listStyle name="ul"
|
||||
start="bulletchar"
|
||||
bulletFontSize="10"/>
|
||||
</stylesheet>
|
||||
|
||||
<template > {# Note: page is 595x842 points (1 point=1/72in) #}
|
||||
<pageTemplate id="Headed" >
|
||||
<pageGraphics>
|
||||
<image file="RIGS/static/imgs/paperwork/corner-tr-su.jpg" x="395" y="642" height="200" width="200"/>
|
||||
<image file="RIGS/static/imgs/paperwork/corner-bl.jpg" x="0" y="0" height="200" width="200"/>
|
||||
<image file="static/imgs/paperwork/corner-tr-su.jpg" x="395" y="642" height="200" width="200"/>
|
||||
<image file="static/imgs/paperwork/corner-bl.jpg" x="0" y="0" height="200" width="200"/>
|
||||
|
||||
{# logo positioned 42 from left, 33 from top #}
|
||||
<image file="RIGS/static/imgs/paperwork/tec-logo.jpg" x="42" y="719" height="90" width="84"/>
|
||||
<image file="static/imgs/paperwork/tec-logo.jpg" x="42" y="719" height="90" width="84"/>
|
||||
|
||||
<setFont name="OpenSans-Bold" size="22.5" leading="10"/>
|
||||
<drawString x="137" y="780">TEC PA & Lighting</drawString>
|
||||
@@ -105,8 +94,6 @@
|
||||
<drawString x="265" y="746">info@nottinghamtec.co.uk</drawString>
|
||||
<drawString x="137" y="732">Phone: (0115) 846 8720</drawString>
|
||||
|
||||
|
||||
|
||||
<setFont name="OpenSans" size="10" />
|
||||
<drawCenteredString x="302.5" y="38">[Page <pageNumber/> of <getName id="lastPage" default="0" />]</drawCenteredString>
|
||||
<setFont name="OpenSans" size="7" />
|
||||
@@ -120,8 +107,8 @@
|
||||
|
||||
<pageTemplate id="Main">
|
||||
<pageGraphics>
|
||||
<image file="RIGS/static/imgs/paperwork/corner-tr.jpg" x="395" y="642" height="200" width="200"/>
|
||||
<image file="RIGS/static/imgs/paperwork/corner-bl.jpg" x="0" y="0" height="200" width="200"/>
|
||||
<image file="static/imgs/paperwork/corner-tr.jpg" x="395" y="642" height="200" width="200"/>
|
||||
<image file="static/imgs/paperwork/corner-bl.jpg" x="0" y="0" height="200" width="200"/>
|
||||
|
||||
<setFont name="OpenSans" size="10"/>
|
||||
<drawCenteredString x="302.5" y="38">[Page <pageNumber/> of <getName id="lastPage" default="0" />]</drawCenteredString>
|
||||
@@ -135,7 +122,7 @@
|
||||
</template>
|
||||
|
||||
<story firstPageTemplate="Headed">
|
||||
{% include "RIGS/event_print_page.xml" %}
|
||||
{% include "event_print_page.xml" %}
|
||||
</story>
|
||||
|
||||
</document>
|
||||
@@ -1,8 +1,8 @@
|
||||
{% load markdown_tags %}
|
||||
{% load filters %}
|
||||
|
||||
<setNextFrame name="main"/>
|
||||
<nextFrame/>
|
||||
|
||||
<blockTable style="headLayout" colWidths="330,165">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -13,7 +13,9 @@
|
||||
</para>
|
||||
|
||||
<keepInFrame>
|
||||
{{ object.description|default_if_none:""|markdown:"rml" }}
|
||||
<para style="style.event_description">
|
||||
{{ object.description|default_if_none:""|markdown:"rml"|linebreaksxml }}
|
||||
</para>
|
||||
</keepInFrame>
|
||||
</td>
|
||||
<td>
|
||||
@@ -74,9 +76,9 @@
|
||||
{% if invoice %}
|
||||
<keepInFrame>
|
||||
{% if object.organisation.address %}
|
||||
<para style="specific_description">{{ object.organisation.address|default_if_none:""|linebreaksbr }}</para>
|
||||
<para style="specific_description">{{ object.organisation.address|default_if_none:""|linebreaksxml }}</para>
|
||||
{% elif object.person.address %}
|
||||
<para style="specific_description">{{ object.person.address|default_if_none:""|linebreaksbr }}</para>
|
||||
<para style="specific_description">{{ object.person.address|default_if_none:""|linebreaksxml }}</para>
|
||||
{% endif %}
|
||||
</keepInFrame>
|
||||
{% endif %}
|
||||
@@ -108,7 +110,7 @@
|
||||
<h3>{{ object.venue.name }}</h3>
|
||||
{% if not invoice %}
|
||||
<keepInFrame>
|
||||
<para style="specific_description">{{ object.venue.address|default_if_none:""|linebreaksbr }}</para>
|
||||
<para style="specific_description">{{ object.venue.address|default_if_none:""|linebreaksxml }}</para>
|
||||
</keepInFrame>
|
||||
{% endif %}
|
||||
</td>
|
||||
@@ -183,26 +185,28 @@
|
||||
<para>{{ item.name }}
|
||||
{% if item.description %}
|
||||
</para>
|
||||
<indent left="0.6cm">
|
||||
{{ item.description|markdown:"rml" }}
|
||||
</indent>
|
||||
<para style="item_description">
|
||||
<em>{{ item.description|markdown:"rml"|linebreaksxml }}</em>
|
||||
</para>
|
||||
<para>
|
||||
{% endif %}
|
||||
</para>
|
||||
</td>
|
||||
<td>£ {{ item.cost|floatformat:2 }}</td>
|
||||
<td>£{{ item.cost|floatformat:2 }}</td>
|
||||
<td>{{ item.quantity }}</td>
|
||||
<td>£ {{ item.total_cost|floatformat:2 }}</td>
|
||||
<td>£{{ item.total_cost|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</blockTable>
|
||||
<keepTogether>
|
||||
<blockTable style="totalTable" colWidths="300,115,80">
|
||||
{% if object.vat > 0 %}
|
||||
<tr>
|
||||
<td>{% if quote %}VAT Registration Number: 170734807{% endif %}</td>
|
||||
<td>Total (ex. VAT)</td>
|
||||
<td>{% if quote %}VAT Registration Number: 170734807</td>
|
||||
<td>Total (ex. VAT){% endif %}</td>
|
||||
<td>£ {{ object.sum_total|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if quote %}
|
||||
@@ -211,8 +215,10 @@
|
||||
</para>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if object.vat > 0 %}
|
||||
<td>VAT @ {{ object.vat_rate.as_percent|floatformat:2 }}%</td>
|
||||
<td>£ {{ object.vat|floatformat:2 }}</td>
|
||||
<td>£{{ object.vat|floatformat:2 }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -224,7 +230,7 @@
|
||||
</td>
|
||||
{% if invoice %}
|
||||
<td>Total</td>
|
||||
<td>£ {{ object.total|floatformat:2 }}</td>
|
||||
<td>£{{ object.total|floatformat:2 }}</td>
|
||||
{% else %}
|
||||
<td>
|
||||
<para>
|
||||
@@ -233,7 +239,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
<b>£ {{ object.total|floatformat:2 }}</b>
|
||||
<b>£{{ object.total|floatformat:2 }}</b>
|
||||
</para>
|
||||
</td>
|
||||
{% endif %}
|
||||
@@ -267,7 +273,7 @@
|
||||
<tr>
|
||||
<td>{{ payment.get_method_display }}</td>
|
||||
<td>{{ payment.date }}</td>
|
||||
<td>£ {{ payment.amount|floatformat:2 }}</td>
|
||||
<td>£{{ payment.amount|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</blockTable>
|
||||
@@ -275,18 +281,18 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Payment Total</td>
|
||||
<td>£ {{ object.invoice.payment_total|floatformat:2 }}</td>
|
||||
<td>£{{ object.invoice.payment_total|floatformat:2 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<para>
|
||||
<b>Balance</b> (ex. VAT)
|
||||
<b>Balance</b> {% if object.vat > 0 %}(ex. VAT){% endif %}
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para>
|
||||
<b>£ {{ object.invoice.balance|floatformat:2 }}</b>
|
||||
<b>£{{ object.invoice.balance|floatformat:2 }}</b>
|
||||
</para>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -314,9 +320,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>24 Hour Emergency Contacts: 07825 065681 and 07825 065678</td>
|
||||
<td>General Enquires and 24 Hour Emergency Contact: 0115 84 68720</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{% elif object.vat > 0 %}
|
||||
<tr>
|
||||
<td>
|
||||
<para>VAT Registration Number: 170734807</para>
|
||||
37
RIGS/templates/eventauthorisation.html
Normal file
37
RIGS/templates/eventauthorisation.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends 'base_client.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
$('form').on('submit', function () {
|
||||
$('#loading-modal').modal({
|
||||
backdrop: 'static',
|
||||
show: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row my-3">
|
||||
{% include 'partials/client_eventdetails.html' %}
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
{% with object=event auth=True %}
|
||||
{% include 'partials/item_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block authorisation %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -1,19 +1,17 @@
|
||||
{% extends 'base_client_email.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<p>Hi {{ to_name|default:"there" }},</p>
|
||||
|
||||
<p><b>{{ request.user.get_full_name }}</b> has requested that you authorise <b>N{{ object.pk|stringformat:"05d" }}
|
||||
| {{ object.name }}</b>{% if not to_name %} on behalf of <b>{{ object.person.name }}</b>{% endif %}.</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>{% 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>
|
||||
|
||||
|
||||
@@ -23,7 +21,7 @@
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="button" align="center">
|
||||
<a href="{{ request.scheme }}://{{ request.get_host }}{% url 'event_authorise' object.pk hmac %}">
|
||||
<a href="{{ request.scheme }}://{{ request.get_host }}{% url target|default:'event_authorise' object.pk hmac %}">
|
||||
Complete Authorisation Form
|
||||
</a>
|
||||
</td>
|
||||
@@ -36,6 +34,7 @@
|
||||
|
||||
<p>Your event will not be booked until you complete this form.</p>
|
||||
|
||||
<p>TEC PA & Lighting<br/>
|
||||
<p>TEC PA & Lighting</p>
|
||||
<br/>
|
||||
|
||||
{% endblock %}
|
||||
@@ -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 #}
|
||||
@@ -9,13 +9,7 @@
|
||||
by <b>{{ object.name }}</b> as of <b>{{ object.event.last_edited_at }}</b>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
|
||||
Your event is now fully booked and payment will be processed by the finance department automatically.
|
||||
{% else %}{# external #}
|
||||
Your event is now fully booked and our finance department will be contact to arrange payment.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>Your event is now fully booked and payment will be processed by the finance department automatically.</p>
|
||||
|
||||
<p>TEC PA & Lighting</p>
|
||||
{% endblock %}
|
||||
@@ -2,10 +2,6 @@ Hi {{ to_name|default_if_none:"there" }},
|
||||
|
||||
Your event N{{object.event.pk|stringformat:"05d"}} has been successfully authorised for £{{object.amount}} by {{object.name}} as of {{object.event.last_edited_at}}.
|
||||
|
||||
{% if object.event.organisation and object.event.organisation.union_account %}{# internal #}
|
||||
Your event is now fully booked and payment will be processed by the finance department automatically.
|
||||
{% else %}{# external #}
|
||||
Your event is now fully booked and our finance department will be contact to arrange payment.
|
||||
{% endif %}
|
||||
|
||||
TEC PA & Lighting
|
||||
96
RIGS/templates/eventauthorisation_form.html
Normal file
96
RIGS/templates/eventauthorisation_form.html
Normal file
@@ -0,0 +1,96 @@
|
||||
{% extends 'eventauthorisation.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block authorisation %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card border-primary">
|
||||
<div class="card-header" id="eventauth">Event Authorisation</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form class=" itemised_form" role="form" method="POST" action="#eventauth">
|
||||
{% csrf_token %}
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<p>
|
||||
I agree that I am authorised to approve this event. I agree that I am the
|
||||
<strong>President/Treasurer or account holder</strong> of the hirer, or that I
|
||||
have the written permission of the
|
||||
<strong>President/Treasurer or account holder</strong> of the hirer stating that
|
||||
I can authorise this event.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="col-sm-12 form-group form-row" data-toggle="tooltip"
|
||||
title="Your name as the person authorising the event.">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.name.label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.name class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 form-group form-row" data-toggle="tooltip"
|
||||
title="Your Student ID or Staff username as the person authorising the event.">
|
||||
<label for="{{ form.uni_id.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.uni_id.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.uni_id class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<div class="col-sm-12 form-group form-row" data-toggle="tooltip"
|
||||
title="The Students' Union account code you wish this event to be charged to.">
|
||||
<label for="{{ form.account_code.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.account_code.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.account_code class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 form-group form-row" data-toggle="tooltip"
|
||||
title="The full amount chargable for this event as displayed above, including VAT.">
|
||||
<label for="{{ form.amount.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.amount.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">£</span>
|
||||
</div>
|
||||
{% render_field form.amount class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 col-md-8 form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8 col-md-offset-3" data-toggle="tooltip"
|
||||
title="In order to book an event you must agree to the TEC Terms of Hire.">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% render_field form.tos %} I have read and agree to the TEC
|
||||
<a href="{{ tos_url }}">Terms of Hire</a>. E&OE.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary btn-lg" type="submit" {% if preview %}disabled="" data-toggle="tooltip" title="This is only a preview!"{%endif%}>Authorise</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
77
RIGS/templates/eventauthorisation_request.html
Normal file
77
RIGS/templates/eventauthorisation_request.html
Normal file
@@ -0,0 +1,77 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block title %}Request Authorisation{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
<script src="{% static 'js/popover.js' %}"></script>
|
||||
<script src="{% static 'js/clipboard.min.js' %}"></script>
|
||||
<script>
|
||||
var clipboard = new ClipboardJS('.btn');
|
||||
|
||||
clipboard.on('success', function(e) {
|
||||
$(e.trigger).popover('show');
|
||||
window.setTimeout(function () {$(e.trigger).popover('hide')}, 3000);
|
||||
e.clearSelection();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-warning pb-0">
|
||||
<h1>Send authorisation request email.</h1>
|
||||
<p>Pressing send will email the address provided. <strong>Please triple check everything before continuing.</strong></p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info pb-0">
|
||||
{% if object.person.email or object.organisation.email %}
|
||||
<dl class="dl-horizontal">
|
||||
{% if object.person.email %}
|
||||
<dt>Person Email</dt>
|
||||
<dd><span id="person-email">{{ object.person.email }}</span>{% button 'copy' id='#person-email' %}</dd>
|
||||
{% endif %}
|
||||
{% if object.organisation.email %}
|
||||
<dt>Organisation Email</dt>
|
||||
<dd><span id="org-email">{{ object.organisation.email }}</span>{% button 'copy' id='#org-email' %}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{% else %}
|
||||
<p>No email addresses saved to the client ಠ_ಠ</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<form action="{{ form.action|default:request.path }}" method="POST" id="auth-request-form">
|
||||
{% csrf_token %}
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label"
|
||||
for="{{ form.email.id_for_label }}">{{ form.email.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.email type="email" class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#auth-request-form').on('submit', function () {
|
||||
$('#auth-request-form button').attr('disabled', true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<div class="form-row">
|
||||
<div class="btn-group" role="group">
|
||||
<a type="button" target="_blank" href="{% url 'event_authorise_preview' object.pk %}" class="btn btn-info text-nowrap"><span class="fas fa-drafting-compass"></span> Preview</a>
|
||||
<button type="submit" class="form-control btn btn-primary" form="auth-request-form">
|
||||
<span class="fas fa-paper-plane"></span> Send
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
11
RIGS/templates/eventauthorisation_request_error.html
Normal file
11
RIGS/templates/eventauthorisation_request_error.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}TEC Email Address Required{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-warning">
|
||||
<h1>An error occured.</h1>
|
||||
<p>Your RIGS account must have an @nottinghamtec.co.uk email address before you can send emails to clients.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
42
RIGS/templates/eventauthorisation_success.html
Normal file
42
RIGS/templates/eventauthorisation_success.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends 'eventauthorisation.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
||||
|
||||
{% block authorisation %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Event Authorisation</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<dl class="dl row">
|
||||
<dt class="col-6">Name</dt>
|
||||
<dd class="col-6">{{ object.name }}</dd>
|
||||
|
||||
<dt class="col-6">Email</dt>
|
||||
<dd class="col-6">{{ object.email }}</dd>
|
||||
|
||||
<dt class="col-6">University ID</dt>
|
||||
<dd class="col-6">{{ object.uni_id }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<dl class="dl row">
|
||||
<dt class="col-6">Account code</dt>
|
||||
<dd class="col-6">{{ object.account_code }}</dd>
|
||||
|
||||
<dt class="col-6">Authorised amount</dt>
|
||||
<dd class="col-6">£ {{ object.amount|floatformat:2 }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
52
RIGS/templates/hs_list.html
Normal file
52
RIGS/templates/hs_list.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block content %}
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0 table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Event</th>
|
||||
<th scope="col">MIC</th>
|
||||
<th scope="col">Dates</th>
|
||||
<th scope="col">RA</th>
|
||||
<th scope="col">Checklists</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in object_list %}
|
||||
<tr id="event_row">
|
||||
<th scope="row" id="event_number"><a href="{% url 'event_detail' event.pk %}">{{ event }}</a><br><small>{{ event.get_status_display }}</small></th>
|
||||
<td>{% if event.mic is not None %}<a href="{% url 'profile_detail' event.mic.pk %}">{% else %}<span class="text-danger">{% endif %}{{ event.mic }}{% if event.mic is not None %}</a>{% else %}</span>{%endif%}</td>
|
||||
<!--Dates-->
|
||||
<td id="event_dates">
|
||||
<span><strong>{{ event.start_date|date:"D d/m/Y" }}</strong></span>
|
||||
{% if event.end_date and event.end_date != event.start_date %}
|
||||
<br><span><strong>{{ event.end_date|date:"D d/m/Y" }}</strong></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{% include 'partials/hs_status.html' with event=event object=event.riskassessment view='ra_detail' edit='ra_edit' create='event_ra' review='ra_review' perm=perms.RIGS.review_riskassessment %}</td>
|
||||
<td>
|
||||
{% for checklist in event.checklists.all %}
|
||||
{% include 'partials/hs_status.html' with event=event object=checklist view='ec_detail' edit='ec_edit' create='event_ec' review='ec_review' perm=perms.RIGS.review_eventchecklist %}
|
||||
<br>
|
||||
{% endfor %}
|
||||
<a href="{% url 'event_ec' event.pk %}" class="btn btn-info"><span class="fas fa-paperclip"></span> <span
|
||||
class="d-none d-sm-inline">Create</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr class="bg-warning text-dark">
|
||||
<td colspan="6">No events found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if is_paginated %}
|
||||
<div class="row justify-content-center">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
59
RIGS/templates/hs_object_list.html
Normal file
59
RIGS/templates/hs_object_list.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
{% load help_text from filters %}
|
||||
{% load verbose_name from filters %}
|
||||
{% load get_field from filters %}
|
||||
|
||||
{% block title %}{{ title }} List{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>{{title}} List</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0 table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Event</th>
|
||||
{# mmm hax #}
|
||||
{% if object_list.0 != None %}
|
||||
{% for field in object_list.0.fieldz %}
|
||||
<th scope="col">{{ object_list.0|verbose_name:field|title }}</th>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr class="{% if object.reviewed_by %}table-success{%endif%}">
|
||||
{# General #}
|
||||
<th scope="row"><a href="{% url 'event_detail' object.event.pk %}">{{ object.event }}</a><br><small>{{ object.event.get_status_display }}</small></th>
|
||||
{% for field in object_list.0.fieldz %}
|
||||
<td>{{ object|get_field:field }}</td>
|
||||
{% endfor %}
|
||||
{# Buttons #}
|
||||
<td>
|
||||
{% include 'partials/hs_status.html' %}
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr class="bg-warning">
|
||||
<td colspan="6">Nothing found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if is_paginated %}
|
||||
<div class="row justify-content-center">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
20
RIGS/templates/invoice_confirm_delete.html
Normal file
20
RIGS/templates/invoice_confirm_delete.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Delete Invoice {{ object.invoice.pk }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h2>Delete Invoice {{ object.pk }}</h2>
|
||||
|
||||
<p>Are you sure you wish to delete invoice {{ object.pk }}?</p>
|
||||
|
||||
<div class="text-right">
|
||||
<form action="{{ action_link }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{% url 'invoice_list' %}"/>
|
||||
<input type="submit" value="Yes" class="btn btn-danger col-sm-1"/>
|
||||
<a href="{% url 'invoice_detail' object.pk %}" class="btn btn-success col-sm-1">No</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
89
RIGS/templates/invoice_detail.html
Normal file
89
RIGS/templates/invoice_detail.html
Normal file
@@ -0,0 +1,89 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row py-4">
|
||||
<div class="col-sm-12 text-right px-0">
|
||||
<div class="btn-group">
|
||||
<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>
|
||||
</a>
|
||||
<a href="{% url 'invoice_void' object.pk %}" class="btn btn-warning" title="Void Invoice">
|
||||
<span class="fas fa-ban"></span> <span
|
||||
class="d-none d-sm-inline">Void</span>
|
||||
</a>
|
||||
{% button 'print' url='invoice_print' pk=object.pk %}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="row py-4">
|
||||
{% with object.event as object %}
|
||||
<div class="col-sm-6">
|
||||
{% include 'partials/contact_details.html' %}
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{% include 'partials/event_details.html' %}
|
||||
</div>
|
||||
{% if object.event.internal %}
|
||||
<div class="col-sm-6">
|
||||
{% include 'partials/auth_details.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="row py-4">
|
||||
<div class="col-sm-6">
|
||||
<div class="card card-default">
|
||||
<div class="card-body">
|
||||
<div class="text-right py-3">
|
||||
<a href="{% url 'payment_create' %}?invoice={{ object.pk }}"
|
||||
class="btn btn-success modal-href"
|
||||
data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="fas fa-plus"></span> Add
|
||||
</a>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Date</th>
|
||||
<th scope="col">Amount</th>
|
||||
<th scope="col">Method</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for payment in object.payment_set.all %}
|
||||
<tr>
|
||||
<th scope="row">{{ payment.date }}</th>
|
||||
<td>{{ payment.amount|floatformat:2 }}</td>
|
||||
<td>{{ payment.get_method_display }}</td>
|
||||
<td>
|
||||
<a href="{% url 'payment_delete' payment.pk %}" class="btn btn-small btn-danger"><span class="fas fa-times"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td class="text-right"><strong>Balance:</strong></td>
|
||||
<td>{{ object.balance|floatformat:2 }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
{% with object.event as object %}
|
||||
{% include 'partials/item_table.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 text-right">
|
||||
{% include 'partials/last_edited.html' with target="invoice_history" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
65
RIGS/templates/invoice_list.html
Normal file
65
RIGS/templates/invoice_list.html
Normal file
@@ -0,0 +1,65 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
{% load button from filters %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
{{ description }}
|
||||
{% block search %}{% endblock %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Invoice #</th>
|
||||
<th scope="col">Event</th>
|
||||
<th scope="col">Client</th>
|
||||
<th scope="col">Event Date</th>
|
||||
<th scope="col">Invoice Date</th>
|
||||
<th scope="col">Balance</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for invoice in invoice_list %}
|
||||
<tr class="table-{% if invoice.is_closed %}success{% else %}warning{% endif %}">
|
||||
<th scope="row">{{ invoice.display_id }}<br>
|
||||
<span class="text-muted">{% if invoice.void %}(VOID){% elif invoice.is_closed %}(PAID){% else %}(O/S){% endif %}</span></th>
|
||||
<td><a href="{% url 'event_detail' invoice.event.pk %}">N{{ invoice.event.pk|stringformat:"05d" }}</a>: {{ invoice.event.name }} <br>
|
||||
<span class="text-muted">{{ invoice.event.get_status_display }}{% if not invoice.event.mic %}, No MIC{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
<td>{% if invoice.event.organisation %}
|
||||
{{ invoice.event.organisation.name }}
|
||||
<br>
|
||||
<span class="text-muted">{{ invoice.event.internal|yesno:'Internal,External' }}</span>
|
||||
{% elif invoice.event.person %}
|
||||
{{ invoice.event.person.name }}
|
||||
<br>
|
||||
<span class="text-muted">Individual</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ invoice.event.start_date }}</td>
|
||||
<td>{{ invoice.invoice_date }}</td>
|
||||
<td>
|
||||
£{{ invoice.balance|floatformat:2 }}
|
||||
{% if not invoice.event.internal %}
|
||||
<br />
|
||||
<span class="text-muted">{{ invoice.event.purchase_order }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% button 'view' url='invoice_detail' pk=invoice.pk %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if is_paginated %}
|
||||
<div class="row justify-content-center">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
7
RIGS/templates/invoice_list_archive.html
Normal file
7
RIGS/templates/invoice_list_archive.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends 'invoice_list.html' %}
|
||||
|
||||
{% block search %}
|
||||
<div class="py-3">
|
||||
{% include 'partials/list_search.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
90
RIGS/templates/invoice_list_waiting.html
Normal file
90
RIGS/templates/invoice_list_waiting.html
Normal file
@@ -0,0 +1,90 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load paginator from filters %}
|
||||
{% load static %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static "js/tooltip.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-12">
|
||||
<p>These events have happened, but paperwork has not yet been sent to treasury</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Event #</th>
|
||||
<th scope="col">Start Date</th>
|
||||
<th scope="col">Event Name</th>
|
||||
<th scope="col">Client</th>
|
||||
<th scope="col">Cost</th>
|
||||
<th scope="col">MIC</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in object_list %}
|
||||
<tr class="{{event.status_color}}">
|
||||
<th scope="row"><a href="{% url 'event_detail' event.pk %}">{{ event.display_id }}</a><br>
|
||||
<span class="text-muted">{{ event.get_status_display }}</span></th>
|
||||
<td>{{ event.start_date }}</td>
|
||||
<td>
|
||||
{{ event.name }}
|
||||
{% if event.is_rig and perms.RIGS.view_event and event.authorised %}
|
||||
<span class="fas fa-check"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if event.organisation %}
|
||||
{{ event.organisation.name }}
|
||||
<br>
|
||||
<span class="text-muted">{{ event.internal|yesno:'Internal,External' }}</span>
|
||||
{% elif event.person %}
|
||||
{{ event.person.name }}
|
||||
<br>
|
||||
<span class="text-muted">Individual</span>
|
||||
{% else %}
|
||||
<i class="fas fa-exclamation"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
£{{ event.sum_total|floatformat:2 }}
|
||||
<br />
|
||||
<span class="text-muted">{% if not event.internal %}{{ event.purchase_order }}{% endif %}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if event.mic %}
|
||||
{{ event.mic.initials }}<br>
|
||||
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
|
||||
{% else %}
|
||||
<span class="fas fa-exclamation"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'invoice_event' event.pk %}"
|
||||
class="btn btn-primary">
|
||||
<span class="fas fa-pound-sign"></span> Create Invoice
|
||||
</a>
|
||||
<a href="{% url 'invoice_event_void' event.pk %}"
|
||||
class="btn btn-warning">& Void
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% if is_paginated %}
|
||||
<div class="row justify-content-center">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,57 +1,45 @@
|
||||
<div class="modal fade" id="itemModal" role="dialog" aria-labelledby="itemModal" aria-hidded="true">
|
||||
<div class="modal fade" id="itemModal" role="dialog" aria-labelledby="itemModal" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h4>{{ object.name|default:"New Event" }}</h4>
|
||||
</div>
|
||||
<div class="col-sm-4 text-right">
|
||||
<button type="button" class="close" data-dismiss="modal"><span
|
||||
aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<h4>{{ object.name|default:"New Event" }}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form class="form-horizontal" id="item-form">
|
||||
<form id="item-form">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="item_name" class="col-sm-2 control-label">Item Name</label>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="item_name" class="col-sm-2 col-form-label">Item Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" placeholder="Item Name" class="form-control" required maxlength="255"
|
||||
id="item_name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" data-toggle="tooltip" title="A detailed description of the kit. MD enabled.">
|
||||
<label for="item_description" class="col-sm-2 control-label">Description</label>
|
||||
|
||||
<div class="form-group form-row" data-toggle="tooltip" title="A detailed description of the kit. MD enabled.">
|
||||
<label for="item_description" class="col-sm-2 col-form-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" placeholder="Description" class="form-control md-enabled"
|
||||
id="item_description" rows="8"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="item_quantity" class="col-sm-4 control-label">Quantity</label>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="item_quantity" class="col-sm-4 col-form-label">Quantity</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="number" placeholder="Quantity" class="form-control" required
|
||||
min="1" id="item_quantity"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label for="item_cost" class="col-sm-4 control-label">Cost</label>
|
||||
<div class="form-group form-row">
|
||||
<label for="item_cost" class="col-sm-4 col-form-label">Cost</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">£</div>
|
||||
<div class="input-group-prepend"><span class="input-group-text">£</span></div>
|
||||
<input type="number" placeholder="Cost" class="form-control" required
|
||||
min="-99999999.99" max="99999999.99" step="0.01"
|
||||
id="item_cost"/>
|
||||
@@ -62,11 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-right">
|
||||
<input type="submit" class="btn btn-primary">
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-primary">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
8
RIGS/templates/partials/associated_events.html
Normal file
8
RIGS/templates/partials/associated_events.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12 py-3">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated Events</div>
|
||||
{% include 'partials/event_table.html' with events=object.latest_events %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
10
RIGS/templates/partials/associated_organisations.html
Normal file
10
RIGS/templates/partials/associated_organisations.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="col-sm">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated Organisations</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for organisation,count in object.organisations %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'organisation_detail' organisation.pk %}">{{ organisation.pk|stringformat:"05d" }} | {{ organisation.name }} <span class="badge badge-secondary" title="{{count}} events with {{object.name}} for {{organisation.name}}">{{count}}</span></a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
12
RIGS/templates/partials/associated_people.html
Normal file
12
RIGS/templates/partials/associated_people.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="col-sm">
|
||||
<div class="card">
|
||||
<div class="card-header">Associated People</div>
|
||||
<div class="list-group list-group-flush">
|
||||
{% for person,count in object.persons %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'person_detail' person.pk %}">{{ person.pk|stringformat:"05d" }} | {{ person.name }} <span class="badge badge-secondary" title="{{count}} events with {{person.name}} for {{object.name}}">{{count}}</span></a>
|
||||
{% empty %}
|
||||
<div class="card-body">None</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
52
RIGS/templates/partials/auth_details.html
Normal file
52
RIGS/templates/partials/auth_details.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="card card-default
|
||||
{% if event.authorised %}
|
||||
border-success
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
border-warning
|
||||
{% elif event.auth_request_to %}
|
||||
border-info
|
||||
{% endif %}
|
||||
">
|
||||
<div class="card-header">Client Authorisation</div>
|
||||
<div class="card-body row">
|
||||
<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>
|
||||
<dl class="col-sm-6">
|
||||
<hr class="d-block d-sm-none">
|
||||
<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>
|
||||
6
RIGS/templates/partials/checklist_checkbox.html
Normal file
6
RIGS/templates/partials/checklist_checkbox.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% load widget_tweaks %}
|
||||
{% load help_text from filters %}
|
||||
<div class="form-check">
|
||||
{% render_field formitem class+="form-check-input" %}
|
||||
<label class="form-check-label" for="{{ formitem.id_for_label }}">{{formitem.help_text|safe}}</label>
|
||||
</div>
|
||||
76
RIGS/templates/partials/client_eventdetails.html
Normal file
76
RIGS/templates/partials/client_eventdetails.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<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">
|
||||
{{ 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">
|
||||
<div class="card-header">Organisation Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-5">Organisation</dt>
|
||||
<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">{{ event.organisation.phone }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card border-info">
|
||||
<div class="card-header">Event Info</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
{% if event.venue %}
|
||||
<dt class="col-sm-5">Event Venue</dt>
|
||||
<dd class="col-sm-7">
|
||||
{{ event.venue }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
<dt class="col-sm-5">Status</dt>
|
||||
<dd class="col-sm-7">{{ event.get_status_display }}</dd>
|
||||
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
<dt class="col-sm-5">Access From</dt>
|
||||
<dd class="col-sm-7">{{ event.access_at|date:"D d M Y H:i"|default:"" }}</dd>
|
||||
|
||||
<dt class="col-sm-5">Event Starts</dt>
|
||||
<dd class="col-sm-7">{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
||||
|
||||
<dt class="col-sm-5">Event Ends</dt>
|
||||
<dd class="col-sm-7">{{ 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-5">Event Description</dt>
|
||||
<dd class="col-sm-12">{{ event.description|linebreaksbr }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
47
RIGS/templates/partials/contact_details.html
Normal file
47
RIGS/templates/partials/contact_details.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{% load linkornone from filters %}
|
||||
{% load namewithnotes from filters %}
|
||||
|
||||
{% if object.person %}
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Person 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|namewithnotes:'person_detail' }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
<dt class="col-sm-6">Email</dt>
|
||||
<dd class="col-sm-6">{{ object.person.email|linkornone:'mailto' }}</dd>
|
||||
<dt class="col-sm-6">Phone Number</dt>
|
||||
<dd class="col-sm-6">{{ object.person.phone|linkornone:'tel' }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object.organisation %}
|
||||
<div class="card card-default">
|
||||
<div class="card-header">Organisation Details</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|namewithnotes:'organisation_detail' }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
<dt class="col-sm-6">Email</dt>
|
||||
<dd class="col-sm-6">{{ object.organisation.email|linkornone:'mailto' }}</dd>
|
||||
<dt class="col-sm-6">Phone Number</dt>
|
||||
<dd class="col-sm-6">{{ object.organisation.phone|linkornone:'tel' }}</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 %}
|
||||
52
RIGS/templates/partials/ec_power_info.html
Normal file
52
RIGS/templates/partials/ec_power_info.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<h5 class="py-3"><a class="btn btn-info" data-toggle="collapse" href="#values" aria-expanded="false" aria-controls="values">View Threshold Values</a></h5>
|
||||
<div class="row collapse" id="values">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="row">RCD Value (mA)</th>
|
||||
<th scope="row">Max Z<small>S</small> (Ohms)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>30</td>
|
||||
<td>1667</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>100</td>
|
||||
<td>500</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>300</td>
|
||||
<td>167</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>100</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="row">Distro</th>
|
||||
<th scope="row">Max PSSC (kA)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Intel & Toblerone distros</td>
|
||||
<td>6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>All other distros</td>
|
||||
<td>10</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Voltage Drop on Circuit:</strong> 5% (approx. 12v)</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,40 +1,26 @@
|
||||
<div class="btn-group btn-page">
|
||||
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-edit"></span> <span
|
||||
class="hidden-xs">Edit</span></a>
|
||||
{% load button from filters %}
|
||||
<div class="btn-group py-3">
|
||||
{% button 'edit' 'event_update' event.pk %}
|
||||
{% if event.is_rig %}
|
||||
{% if not event.dry_hire %}
|
||||
<a href="{% url 'event_ra' event.pk %}" class="btn btn-default
|
||||
{% if event.risk_assessment_edit_url %}
|
||||
btn-success
|
||||
{% else %}
|
||||
btn-warning
|
||||
{% endif %}
|
||||
"><span
|
||||
class="glyphicon glyphicon-paperclip"></span> <span
|
||||
class="hidden-xs">RA</span></a>
|
||||
{% endif %}
|
||||
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
|
||||
class="glyphicon glyphicon-print"></span> <span
|
||||
class="hidden-xs">Print</span></a>
|
||||
{% button 'print' 'event_print' event.pk %}
|
||||
{% endif %}
|
||||
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
|
||||
class="glyphicon glyphicon-duplicate"></span> <span
|
||||
class="hidden-xs">Duplicate</span></a>
|
||||
{% button 'duplicate' 'event_duplicate' event.pk %}
|
||||
{% if event.is_rig %}
|
||||
{% if event.internal %}
|
||||
<a class="btn btn-default item-add modal-href event-authorise-request
|
||||
<a class="btn item-add modal-href event-authorise-request
|
||||
{% if event.authorised %}
|
||||
btn-success
|
||||
btn-success active
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
btn-warning
|
||||
{% elif event.auth_request_to %}
|
||||
btn-info
|
||||
{% else %}
|
||||
btn-secondary
|
||||
{% endif %}
|
||||
"
|
||||
href="{% url 'event_authorise_request' object.pk %}">
|
||||
<span class="glyphicon glyphicon-send"></span>
|
||||
<span class="hidden-xs">
|
||||
<span class="fas fa-paper-plane"></span>
|
||||
<span class="d-none d-sm-inline">
|
||||
{% if event.authorised %}
|
||||
Authorised
|
||||
{% elif event.authorisation and event.authorisation.amount != event.total and event.authorisation.last_edited_at > event.auth_request_at %}
|
||||
@@ -58,8 +44,10 @@
|
||||
btn-danger
|
||||
{% endif %}
|
||||
" title="Invoice Rig"><span
|
||||
class="glyphicon glyphicon-gbp"></span>
|
||||
<span class="hidden-xs">Invoice</span></a>
|
||||
class="fas fa-pound-sign"></span>
|
||||
<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> <span class="d-none d-sm-inline">Subhire Insurance Form</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
81
RIGS/templates/partials/event_details.html
Normal file
81
RIGS/templates/partials/event_details.html
Normal file
@@ -0,0 +1,81 @@
|
||||
{% load namewithnotes from filters %}
|
||||
<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|namewithnotes:'venue_detail' }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% if object.venue %}
|
||||
<dt class="col-sm-6">Venue Notes</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.venue.notes }}{% if object.venue.three_phase_available %}<br>(Three phase available){%endif%}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if event.is_rig %}
|
||||
<dt class="col-sm-6">Event MIC</dt>
|
||||
<dd class="col-sm-6">{% include 'partials/linked_name.html' with profile=event.mic %}</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">{% include 'partials/linked_name.html' with profile=event.checked_in_by %}</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>
|
||||
7
RIGS/templates/partials/event_size.html
Normal file
7
RIGS/templates/partials/event_size.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if object.event_size == 2 %}
|
||||
<span class="badge badge-danger p-2 my-3">Large Event</span>
|
||||
{% elif object.event_size == 1 %}
|
||||
<span class="badge badge-warning p-2 my-3">Medium Event</span>
|
||||
{%else%}
|
||||
<span class="badge badge-success p-2 my-3">Small Event</span>
|
||||
{%endif%}
|
||||
46
RIGS/templates/partials/event_status.html
Normal file
46
RIGS/templates/partials/event_status.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<div>
|
||||
<span class="badge badge-{% if event.confirmed %}success{% elif event.cancelled %}dark{% else %}warning{% endif %}">Status: {{ event.get_status_display }}</span>
|
||||
{% if event.is_rig %}
|
||||
{% if event.sum_total > 0 %}
|
||||
{% if event.purchase_order %}
|
||||
<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 %}
|
||||
{% endif %}
|
||||
{% if not event.dry_hire %}
|
||||
{% if event.riskassessment %}
|
||||
<span class="badge badge-success">RA: <span class="fas fa-check"></span>{%if event.riskassessment.reviewed_by%}<span class="fas fa-check"></span>{%endif%}</span>
|
||||
{% else %}
|
||||
<span class="badge badge-danger">RA: <span class="fas fa-times"></span></span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not event.dry_hire %}
|
||||
{% if event.hs_done %}
|
||||
{# TODO Display status of all checklists #}
|
||||
<span class="badge badge-success">Checklist: <span class="fas fa-check"></span></span>
|
||||
{% else %}
|
||||
<span class="badge badge-danger">Checklist: <span class="fas fa-times"></span></span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if perms.RIGS.view_invoice %}
|
||||
{% if event.invoice %}
|
||||
{% if event.invoice.void %}
|
||||
<span class="badge badge-secondary">Invoice: Void</span>
|
||||
{% elif event.invoice.is_closed %}
|
||||
<span class="badge badge-success">Invoice: Paid</span>
|
||||
{% else %}
|
||||
<span class="badge badge-warning">Invoice: Outstanding</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="badge badge-info">Invoice: Not Generated</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
104
RIGS/templates/partials/event_table.html
Normal file
104
RIGS/templates/partials/event_table.html
Normal file
@@ -0,0 +1,104 @@
|
||||
{% load namewithnotes from filters %}
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0" id="event_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Dates & Times</th>
|
||||
<th scope="col">Event Details</th>
|
||||
<th scope="col">MIC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in events %}
|
||||
<tr class="{% if event.cancelled %}
|
||||
table-secondary
|
||||
{% elif not event.is_rig %}
|
||||
table-info
|
||||
{% elif not event.mic %}
|
||||
table-danger
|
||||
{% elif event.confirmed and event.authorised %}
|
||||
{% if event.dry_hire or event.riskassessment %}
|
||||
table-success
|
||||
{% else %}
|
||||
table-warning
|
||||
{% endif %}
|
||||
{% else %}
|
||||
table-warning
|
||||
{% endif %}" {% if event.cancelled %}style="opacity: 50% !important;"{% endif %} id="event_row">
|
||||
<!---Number-->
|
||||
<th scope="row" id="event_number">{{ event.display_id }}</th>
|
||||
<!--Dates & Times-->
|
||||
<td id="event_dates">
|
||||
<span class="text-nowrap">Start: <strong>{{ event.start_date|date:"D d/m/Y" }}
|
||||
{% if event.has_start_time %}
|
||||
{{ event.start_time|date:"H:i" }}
|
||||
{% endif %}</strong>
|
||||
</span>
|
||||
{% if event.end_date %}
|
||||
<br>
|
||||
<span class="text-nowrap">End: {% if event.end_date != event.start_date %}<strong>{{ event.end_date|date:"D d/m/Y" }}{% endif %}
|
||||
{% if event.has_end_time %}
|
||||
{{ event.end_time|date:"H:i" }}
|
||||
{% endif %}</strong>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not event.cancelled %}
|
||||
{% if event.meet_at %}
|
||||
<br><span class="text-nowrap">Meet: <strong>{{ event.meet_at|date:"D d/m/Y H:i" }}</strong></span>
|
||||
{% endif %}
|
||||
{% if event.access_at %}
|
||||
<br><span class="text-nowrap">Access: <strong>{{ event.access_at|date:" D d/m/Y H:i" }}</strong></span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<!---Details-->
|
||||
<td id="event_details" class="w-100">
|
||||
<h4>
|
||||
<a href="{% url 'event_detail' event.pk %}">
|
||||
{{ event.name }}
|
||||
</a>
|
||||
{% if event.venue %}
|
||||
<small>at {{ event.venue|namewithnotes:'venue_detail' }}</small>
|
||||
{% endif %}
|
||||
{% if event.dry_hire %}
|
||||
<span class="badge badge-secondary">Dry Hire</span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
{% if event.is_rig and not event.cancelled %}
|
||||
<h5>
|
||||
<a href="{{ event.person.get_absolute_url }}">{{ event.person.name }}</a>
|
||||
{% if event.organisation %}
|
||||
for <a href="{{ event.organisation.get_absolute_url }}">{{ event.organisation.name }}</a>
|
||||
{% endif %}
|
||||
</h5>
|
||||
{% endif %}
|
||||
{% if not event.cancelled and event.description %}
|
||||
<p>{{ event.description|linebreaksbr }}</p>
|
||||
{% endif %}
|
||||
{% include 'partials/event_status.html' %}
|
||||
</td>
|
||||
<!---MIC-->
|
||||
<td id="event_mic" class="text-nowrap">
|
||||
{% if event.mic %}
|
||||
{% if perms.RIGS.view_profile %}
|
||||
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
|
||||
{% endif %}
|
||||
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
|
||||
{{ event.mic }}
|
||||
{% if perms.RIGS.view_profile %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% elif event.is_rig %}
|
||||
<span class="fas fa-user-slash"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr class="bg-warning">
|
||||
<td colspan="4">No events found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
19
RIGS/templates/partials/hs_details.html
Normal file
19
RIGS/templates/partials/hs_details.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="card {% if event.hs_done %}
|
||||
border-success
|
||||
{% else %}
|
||||
border-warning
|
||||
{% endif %}">
|
||||
<div class="card-header">Health & Safety Details</div>
|
||||
<div class="card-body">
|
||||
<h5>Risk Assessment:</h5>
|
||||
{% include 'partials/hs_status.html' with event=event object=event.riskassessment view='ra_detail' edit='ra_edit' create='event_ra' review='ra_review' perm=perms.RIGS.review_riskassessment %}
|
||||
<hr>
|
||||
<h5>Event Checklists:</h5>
|
||||
{% for checklist in event.checklists.all %}
|
||||
{% include 'partials/hs_status.html' with event=event object=checklist view='ec_detail' edit='ec_edit' create='event_ec' review='ec_review' perm=perms.RIGS.review_eventchecklist %}
|
||||
<br/>
|
||||
{% endfor %}
|
||||
<a href="{% url 'event_ec' event.pk %}" class="btn btn-info mt-2"><span class="fas fa-paperclip"></span> <span
|
||||
class="hidden-xs">Create</span></a>
|
||||
</div>
|
||||
</div>
|
||||
11
RIGS/templates/partials/hs_status.html
Normal file
11
RIGS/templates/partials/hs_status.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% load button from filters %}
|
||||
{% if object.pk != None %}
|
||||
<div class="btn-group">
|
||||
{% button 'view' view object.pk %}
|
||||
{% button 'edit' edit object.pk %}
|
||||
</div>
|
||||
{% include 'partials/review_status.html' %}
|
||||
{% elif event != None %}
|
||||
<a href="{% url create event.pk %}" class="btn btn-info"><span class="fas fa-paperclip"></span> <span
|
||||
class="hidden-xs">Create</span></a>
|
||||
{% endif %}
|
||||
30
RIGS/templates/partials/item_row.html
Normal file
30
RIGS/templates/partials/item_row.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<tr id="item-{{item.pk}}" data-pk="{{item.pk}}" class="item_row">
|
||||
<th scope="row">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<div class="item-description">
|
||||
<em class="description">{{item.description|linebreaksbr}}</em>
|
||||
</div>
|
||||
</th>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<td>£<span class="cost">{{item.cost|floatformat:2}}</span></td>
|
||||
{% endif %}
|
||||
<td class="quantity">{{item.quantity}}</td>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<td>£<span class="sub-total" data-subtotal="{{item.total_cost}}">{{item.total_cost|floatformat:2}}</span></td>
|
||||
{% endif %}
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
<div class="btn-group" role="group" aria-label="Action buttons">
|
||||
<button type="button" class="item-edit btn btn-sm btn-warning"
|
||||
data-pk="{{item.pk}}"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<span class="fas fa-edit"></span>
|
||||
</button>
|
||||
<button type="button" class="item-delete btn btn-sm btn-danger"
|
||||
data-pk="{{item.pk}}">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
83
RIGS/templates/partials/item_table.html
Normal file
83
RIGS/templates/partials/item_table.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover" id="item-table" {% if edit %}data-orderurl="{#% url 'item_order' %#}"{% endif %}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Item</th>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<th scope="col">Price</th>
|
||||
{% endif %}
|
||||
<th scope="col">Quantity</th>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<th scope="col">Sub-total</th>
|
||||
{% endif %}
|
||||
{% if edit %}
|
||||
<th scope="col" class="text-right align-self-start">
|
||||
<button type="button" class="btn btn-success btn-sm item-add"
|
||||
data-toggle="modal"
|
||||
data-target="#itemModal">
|
||||
<i class="fas fa-plus"></i> Add Item
|
||||
</button>
|
||||
</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="item-table-body">
|
||||
{% for item in object.items.all %}
|
||||
{% include 'partials/item_row.html' %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% if auth or perms.RIGS.view_event %}
|
||||
<tfoot style="font-weight: bold">
|
||||
<tr>
|
||||
<td rowspan="3" colspan="2"></td>
|
||||
<td>Total {% if object.vat > 0 or not object.pk %}(ex. VAT){% endif %}</td>
|
||||
<td colspan="2">£<span id="sumtotal">{{object.sum_total|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
{% if object.vat > 0 or not object.pk %}
|
||||
<tr>
|
||||
{% if not object.pk %}
|
||||
<td id="vat-rate" data-rate="{{currentVAT.rate}}">VAT @
|
||||
{{currentVAT.as_percent|floatformat}}% (TBC)</td>
|
||||
{% else %}
|
||||
<td id="vat-rate" data-rate="{{object.vat_rate.rate}}">VAT @
|
||||
{{object.vat_rate.as_percent|floatformat|default:"TBD"}}%</td>
|
||||
{% endif %}
|
||||
<td colspan="2">£<span id="vat">{{object.vat|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td colspan="2">£<span id="total">{{object.total|default:0|floatformat:2}}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tfoot>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
<table class="hidden invisible">
|
||||
<tr id="new-item-row" class="item_row">
|
||||
<td>
|
||||
<span class="name"></span>
|
||||
<div class="item-description">
|
||||
<em class="description"></em>
|
||||
</div>
|
||||
</td>
|
||||
<td>£<span class="cost"></span></td>
|
||||
<td class="quantity"></td>
|
||||
<td>£<span class="sub-total"></span></td>
|
||||
{% if edit %}
|
||||
<td class="vert-align text-right">
|
||||
<div class="btn-group" role="group" aria-label="Action buttons">
|
||||
<button type="button" class="item-edit btn btn-sm btn-warning"
|
||||
data-pk="{{item.pk}}"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<span class="fas fa-edit"></span>
|
||||
</button>
|
||||
<button type="button" class="item-delete btn btn-sm btn-danger"
|
||||
data-pk="{{item.pk}}">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
7
RIGS/templates/partials/linked_name.html
Normal file
7
RIGS/templates/partials/linked_name.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if profile and perms.RIGS.view_profile %}
|
||||
<a href="{% url 'profile_detail' profile.pk %}" class="modal-href">
|
||||
{{ profile.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ profile.name }}
|
||||
{% endif %}
|
||||
7
RIGS/templates/partials/review_status.html
Normal file
7
RIGS/templates/partials/review_status.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if object.reviewed_by %}
|
||||
<span class="badge badge-success py-2">Reviewed by <a href="{% url 'profile_detail' object.reviewed_by.pk %}">{{object.reviewed_by}}</a> at {{object.reviewed_at}}</span>
|
||||
{% elif perm %}
|
||||
<a class="btn btn-success my-2" href="{% url review object.pk %}">Mark Reviewed</a>
|
||||
{% else %}
|
||||
<span class="badge badge-danger py-2">Not reviewed</span>
|
||||
{% endif %}
|
||||
12
RIGS/templates/partials/yes_no_radio.html
Normal file
12
RIGS/templates/partials/yes_no_radio.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="row">
|
||||
<label for="{{ formitem.id_for_label }}"
|
||||
class="col-8 control-label">{{ formitem.help_text|safe }}</label>
|
||||
<div class="col-4 pb-3" id="{{ formitem.id_for_label|slice:'-2' }}">
|
||||
{% for radio in formitem %}
|
||||
<div class="custom-control custom-radio">
|
||||
{{ radio.tag }}
|
||||
<label class="custom-control-label" for="{{ radio.id_for_label }}">{{ radio.choice_label }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
21
RIGS/templates/payment_confirm_delete.html
Normal file
21
RIGS/templates/payment_confirm_delete.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
|
||||
{% block title %}Delete payment on invoice {{ object.invoice.pk }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<h2>Delete payment on invoice {{ object.invoice.pk }}</h2>
|
||||
|
||||
<p>Are you sure you wish to delete a payment for £{{ object.amount|floatformat:2 }}
|
||||
({{ object.get_method_display }})
|
||||
from {{ object.date }} on invoice {{ object.invoice.pk }}?</p>
|
||||
<hr>
|
||||
<div class="text-right">
|
||||
<form action="{{ action_link }}" method="post">{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{% url 'invoice_detail' object.invoice.pk %}"/>
|
||||
<input type="submit" value="Yes" class="btn btn-danger col-sm-1"/>
|
||||
<a href="{% url 'invoice_detail' object.invoice.pk %}" class="btn btn-success col-sm-1">No</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
43
RIGS/templates/payment_form.html
Normal file
43
RIGS/templates/payment_form.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends 'base_ajax.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Add Payment{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ form.action|default:request.path }}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="{{ form.invoice.name }}" value="{{ form.invoice.value }}"/>
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="row pt-3">
|
||||
<label class="col-sm-4 col-form-label"
|
||||
for="{{ form.date.id_for_label }}">{{ form.date.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.date class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-3">
|
||||
<label class="col-sm-4 col-form-label"
|
||||
for="{{ form.amount.id_for_label }}">{{ form.amount.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">£</span>
|
||||
</div>
|
||||
{% render_field form.amount class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-3">
|
||||
<label class="col-sm-4 col-form-label"
|
||||
for="{{ form.method.id_for_label }}">{{ form.method.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
{% render_field form.method class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-3">
|
||||
<div class="col-sm-12 text-right">
|
||||
<input type="submit" class="form-control btn btn-primary"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
18
RIGS/templates/rigboard.html
Normal file
18
RIGS/templates/rigboard.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row align-items-center justify-content-between py-2 align-middle">
|
||||
<div class="col-sm-12 col-md align-middle">
|
||||
Key: <span class="table-success mr-1 px-2 rounded">Ready</span><span class="table-warning mr-1 px-2 rounded">Action Required</span><span class="table-danger mr-1 px-2 rounded">Needs MIC</span><span class="table-secondary mr-1 px-2 rounded">Cancelled</span><span class="table-info px-2 rounded">Non-Rig</span>
|
||||
</div>
|
||||
{% if perms.RIGS.add_event %}
|
||||
<div class="col text-right">
|
||||
{% button 'new' 'event_create' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'partials/event_table.html' %}
|
||||
|
||||
{% endblock %}
|
||||
167
RIGS/templates/risk_assessment_detail.html
Normal file
167
RIGS/templates/risk_assessment_detail.html
Normal file
@@ -0,0 +1,167 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% load help_text from filters %}
|
||||
{% load yesnoi from filters %}
|
||||
{% load linkornone from filters %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row py-3">
|
||||
<div class="col-12">
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">General</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-10">{{ object|help_text:'nonstandard_equipment'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.nonstandard_equipment|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'nonstandard_use'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.nonstandard_use|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'contractors'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.contractors|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'other_companies'|safe }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.other_companies|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-10">{{ object|help_text:'crew_fatigue' }}</dt>
|
||||
<dd class="col-2">
|
||||
{{ object.crew_fatigue|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-12">{{ object|help_text:'general_notes' }}</dt>
|
||||
<dd class="col-12">
|
||||
{{ object.general_notes|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Power {% include 'partials/event_size.html' %}</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6">{{ object|help_text:'big_power' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.big_power|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'power_mic'|safe }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.power_mic.name|default:'None' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'outside' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.outside|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'generators' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.generators|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'other_companies_power' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.other_companies_power|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'nonstandard_equipment_power' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.nonstandard_equipment_power|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-sm-6">{{ object|help_text:'multiple_electrical_environments' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.multiple_electrical_environments|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-12">{{ object|help_text:'power_notes' }}</dt>
|
||||
<dd class="col-12">
|
||||
{{ object.power_notes|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
<dt class="col-6">{{ object|help_text:'power_plan'|safe }}</dt>
|
||||
<dd class="col-6">
|
||||
{{ object.power_plan|linkornone }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Sound</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-sm-6">{{ object|help_text:'noise_monitoring' }}</dt>
|
||||
<dd class="col-sm-6">
|
||||
{{ object.noise_monitoring|yesnoi:'invert' }}
|
||||
</dd>
|
||||
<dt class="col-12">{{ object|help_text:'sound_notes' }}</dt>
|
||||
<dd class="col-12">
|
||||
{{ object.sound_notes|default:'N/A'|linebreaks }}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<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 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>
|
||||
<div class="col-12 text-right">
|
||||
<a href="{% url 'ra_edit' object.pk %}" class="btn btn-warning my-3"><span class="fas fa-edit"></span> <span
|
||||
class="d-none d-sm-inline">Edit</span></a>
|
||||
<a href="{% url 'event_detail' object.event.pk %}" class="btn btn-primary"><span class="fas fa-eye"></span> View Event</a>
|
||||
{{ object.review_string|safe }}
|
||||
{% include 'partials/last_edited.html' with target="riskassessment_history" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
178
RIGS/templates/risk_assessment_form.html
Normal file
178
RIGS/templates/risk_assessment_form.html
Normal file
@@ -0,0 +1,178 @@
|
||||
{% extends request.is_ajax|yesno:'base_ajax.html,base_rigs.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load static %}
|
||||
{% load help_text from filters %}
|
||||
{% load nice_errors from filters %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="{% static 'css/selects.css' %}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/autocompleter.js' %}"></script>
|
||||
|
||||
<script>
|
||||
function parseBool(str) {
|
||||
return str.toLowerCase() == 'true';
|
||||
}
|
||||
$('input[type=radio][name=big_power]').change(function() {
|
||||
$('#{{ form.power_mic.id_for_label }}').prop('required', parseBool(this.value));
|
||||
});
|
||||
$('input[type=radio][name=outside], input[type=radio][name=generators], input[type=radio][name=other_companies_power], input[type=radio][name=nonstandard_equipment_power], input[type=radio][name=multiple_electrical_environments]').change(function() {
|
||||
$('#{{ form.power_notes.id_for_label }}').prop('required', parseBool(this.value));
|
||||
$('#{{ form.power_plan.id_for_label }}').prop('required', parseBool(this.value));
|
||||
});
|
||||
$('input[type=radio][name=special_structures]').change(function() {
|
||||
$('#{{ form.persons_responsible_structures.id_for_label }}').prop('hidden', !parseBool(this.value)).prop('required', parseBool(this.value));
|
||||
$('label[for={{ form.persons_responsible_structures.id_for_label }}]').prop('hidden', !parseBool(this.value));
|
||||
});
|
||||
$('input[type=radio][name=suspended_structures]').change(function() {
|
||||
$('#{{ form.rigging_plan.id_for_label }}').prop('hidden', !parseBool(this.value)).prop('required', parseBool(this.value));
|
||||
$('label[for={{ form.rigging_plan.id_for_label }}]').prop('hidden', !parseBool(this.value));
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col">
|
||||
{% if form.errors %}
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<dl>
|
||||
{% with form|nice_errors as qq %}
|
||||
{% for error_name,desc in qq.items %}
|
||||
{% if error_name == 'General form errors' %}
|
||||
{{ form.non_field_errors.0|safe }}
|
||||
<div class="text-right">
|
||||
{% render_field form.supervisor_consulted class+="form-check-input" form="form" %}<label class="form-check-label" for="{{ form.supervisor_consulted.id_for_label}}">Please confirm you've done so.</label><br>
|
||||
<button class="btn btn-primary mt-2" type="submit" form="form"><span class="fas fa-thumbs-up"></span> Confirm</button>
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="row">
|
||||
<dt class="col-4">{{error_name}}</dt>
|
||||
<dd class="col-8">{{desc}}</dd>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</dl>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if edit %}
|
||||
<form role="form" method="POST" action="{% url 'ra_edit' pk=object.pk %}" id="form">
|
||||
{% else %}
|
||||
<form role="form" method="POST" action="{% url 'event_ra' pk=event.pk %}" id="form">
|
||||
{% endif %}
|
||||
<input type="hidden" name="{{ form.event.name }}" id="{{ form.event.id_for_label }}"
|
||||
value="{{event.pk}}"/>
|
||||
{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">General</div>
|
||||
<div class="card-body">
|
||||
<p><strong>If the answer is yes to any of the below, you must consult a supervisor and make sure all activities planned to be undertaken are sufficiently covered by health and safety documentation</strong></p>
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.nonstandard_equipment %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.nonstandard_use %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.contractors %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.other_companies %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.crew_fatigue %}
|
||||
|
||||
<label for="{{ form.general_notes.id_for_label }}">{{ form.general_notes.help_text }}</label>
|
||||
{% render_field form.general_notes class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Power</div>
|
||||
<div class="card-body">
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.big_power %}
|
||||
<label for="{{ form.power_mic.id_for_label }}"
|
||||
class="col col-form-label">{{ form.power_mic.help_text|safe }}</label>
|
||||
<div class="col-6">
|
||||
<select id="{{ form.power_mic.id_for_label }}" name="{{ form.power_mic.name }}" class="form-control selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if object.power_mic %}
|
||||
<option value="{{object.power_mic.pk}}" selected="selected">{{ object.power_mic.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<p class="pt-4"><strong>If the answer is yes to ANY of the below questions this is a Large Event and you <em>must</em> consult a power supervisor</strong></p>
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.outside %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.generators label="Will generators be used?" %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.other_companies_power %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.nonstandard_equipment_power %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.multiple_electrical_environments %}
|
||||
<label for="{{ form.power_notes.id_for_label }}">{{ form.power_notes.help_text }}</label>
|
||||
{% render_field form.power_notes class+="form-control" %}
|
||||
<label for="{{ form.power_plan.id_for_label }}" class="mt-2">{{ form.power_plan.help_text|safe }}</label>
|
||||
{% render_field form.power_plan class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Sound</div>
|
||||
<div class="card-body">
|
||||
<p><strong>If yes, consult a supervisor of sound</strong></p>
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.noise_monitoring %}
|
||||
<label for="{{ form.sound_notes.id_for_label }}">{{ form.sound_notes.help_text }}</label>
|
||||
{% render_field form.sound_notes class+="form-control" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Site Details</div>
|
||||
<div class="card-body">
|
||||
<p><strong>If yes to any of the below, a site visit must be conducted, and an assessment of the venue completed and added to TEC’s records</strong></p>
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.known_venue %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.safe_loading %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.safe_storage %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.area_outside_of_control %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.barrier_required %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.nonstandard_emergency_procedure %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Structures</div>
|
||||
<div class="card-body">
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.special_structures %}
|
||||
<label for="{{ form.persons_responsible_structures.id_for_label }}" class="mt-3" hidden="true">{{ form.persons_responsible_structures.help_text }}</label>
|
||||
{% render_field form.persons_responsible_structures class+="form-control mb-3" hidden="true" %}
|
||||
{% include 'partials/yes_no_radio.html' with formitem=form.suspended_structures %}
|
||||
<label for="{{ form.rigging_plan.id_for_label }}" class="mt-2" hidden="true">{{ form.rigging_plan.help_text|safe }}</label>
|
||||
{% render_field form.rigging_plan class+="form-control" hidden="true" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm-12 text-right">
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn btn-primary" title="Save"><i
|
||||
class="fas fa-save"></i> Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user