Merge branch 'master' into revision-view

This commit is contained in:
David Taylor
2015-04-22 21:08:15 +01:00
9 changed files with 213 additions and 188 deletions

View File

@@ -9,19 +9,21 @@ This document is intended to get you up and running, but if don't care about wha
### What is this repository for? ### ### What is this repository for? ###
For the rapid development of the application for medium term deployment, the main branch is being used. For the rapid development of the application for medium term deployment, the main branch is being used.
Once the application is deployed in a production environment, other branches should be used to properly stage edits and pushes of new features. Once the application is deployed in a production environment, other branches should be used to properly stage edits and pushes of new features. When a significant feature is developed on a branch, raise a pull request and it can be reviewed before being put into production.
Most of the documents here assume a basic knowledge of how Python and Django work (hint, if I don't say something, Google it, you will find 10000's of answers). The documentation is purely to be specific to TEC's application of the framework. Most of the documents here assume a basic knowledge of how Python and Django work (hint, if I don't say something, Google it, you will find 10000's of answers). The documentation is purely to be specific to TEC's application of the framework.
### Editing ### ### Editing ###
It is recommended that you use the PyCharm IDE by JetBrains. Whilst other editors are available, this is the best for integration with Django as it can automatically manage all the pesky admin commands that frequently need running, as well as nice integration with git. It is recommended that you use the PyCharm IDE by JetBrains. Whilst other editors are available, this is the best for integration with Django as it can automatically manage all the pesky admin commands that frequently need running, as well as nice integration with git.
Please contact TJP for details on how to acquire this. For the more experienced developer/somebody who doesn't want a full IDE and wants it to open in less than the age of the universe, I can strongly recommend [Sublime Text](http://www.sublimetext.com/). It has a bit of a steaper learning curve, and won't manage anything Django/git related out of the box, but once you get the hang of it is by far the fastest and most powerful editor I have used (for any type of project).
Please contact TJP for details on how to acquire these.
### Python Environment ### ### Python Environment ###
Whilst it is not critical to the success of the application, it has be written with **Python 3** in mind. It might have been tested with Python 2, but it is not guaranteed to work with it. Whilst the Python version used is not critical to the running of the application, using the same version usually helps avoid a lot of issues. Mainly the C implementation of Python 2 (CPython 2) has been used (specifically the Python 2.7 standard). Most of the application has been written with Python 3 in mind however, and should run without issue. Some level of testing on Python 3 has been done, but there is no guarantee it will work (for more information on this please see [[Python Version]] on the wiki)
Once you have Python 3 installed, please follow steps to set up a virtualenv, which will isolate the project from your system environment. Once you have your Python distribution installed, go ahead an follow the steps to set up a virtualenv, which will isolate the project from the system environment.
#### PyCharm #### #### PyCharm ####
If you are using the prefered PyCharm IDE, then this should be quite easy. If you are using the prefered PyCharm IDE, then this should be quite easy.
@@ -43,11 +45,12 @@ To run the Django application follow these steps
5. Run the application 5. Run the application
#### Console Based #### #### Console Based ####
If you aren't using PyCharm, or want to use a console for some reason, this is really easy. Simply run If you aren't using PyCharm, or want to use a console for some reason, this is really easy, there is even [virtualenvwrapper](https://virtualenvwrapper.readthedocs.org/en/latest/) to help things along. Simply run
``` ```
virtualenv <dir> virtualenv <dir>
``` ```
Where dir is the directory you wish to create the virtualenv in. Watch this doesn't do something dumb like call the Python 2 version of it, else you will have that ballache to deal with later. Where dir is the directory you wish to create the virtualenv in.
Next activate the virtualenv. Next activate the virtualenv.
``` ```
Windows Windows
@@ -70,4 +73,4 @@ python manage.py runserver
Please refer to Django documentation for a full list of options available here. Please refer to Django documentation for a full list of options available here.
### Committing, pushing and testing ### ### Committing, pushing and testing ###
Feel free to commit as you wish, on your own branch. On my branch (master for development) do not commit code that you either know doesn't work or don't know works. If you must commit this code, please make sure you say in the commit message that it isn't work, and if you can why it isn't working. If and only if you absolutely must push, then please don't leave it as the HEAD for too long, it's not much to ask but when you are done just make sure you haven't broken the HEAD for the next person. Feel free to commit as you wish, on your own branch. On my branch (master for development) do not commit code that you either know doesn't work or don't know works. If you must commit this code, please make sure you say in the commit message that it isn't working, and if you can why it isn't working. If and only if you absolutely must push, then please don't leave it as the HEAD for too long, it's not much to ask but when you are done just make sure you haven't broken the HEAD for the next person.

View File

@@ -9029,3 +9029,8 @@ textarea {
.event-mic-photo { .event-mic-photo {
max-width: 2em; max-width: 2em;
} }
/* line 52, ../scss/screen.scss */
.item-description {
margin-left: 1em;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -48,3 +48,7 @@ textarea {
.event-mic-photo { .event-mic-photo {
max-width: 2em; max-width: 2em;
} }
.item-description {
margin-left: 1em;
}

View File

@@ -2,13 +2,6 @@
{% block title %}Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }} {% block title %}Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}
{% endif %}{% endblock %} {% endif %}{% endblock %}
{% block buttons %}
{% if not request.is_ajax %}
{% endif %}
{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
{% if not request.is_ajax %} {% if not request.is_ajax %}
@@ -16,25 +9,30 @@
<div class="col-sm-8"> <div class="col-sm-8">
<h1>Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %}</h1> <h1>Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %}</h1>
</div> </div>
</div>
<div class="col-sm-12 text-right"> <div class="col-sm-12 text-right">
<div class="btn-group btn-page"> <div class="btn-group btn-page">
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span <a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
class="glyphicon glyphicon-edit"></span></a> class="glyphicon glyphicon-edit"></span> <span
class="hidden-xs">Edit</span></a>
{% if event.is_rig %} {% if event.is_rig %}
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span <a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
class="glyphicon glyphicon-print"></span></a> class="glyphicon glyphicon-print"></span> <span
class="hidden-xs">Print</span></a>
{% endif %} {% endif %}
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span <a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
class="glyphicon glyphicon-duplicate"></span></a> class="glyphicon glyphicon-duplicate"></span> <span
class="hidden-xs">Duplicate</span></a>
{% if event.is_rig %} {% if event.is_rig %}
{% if perms.RIGS.add_invoice %} {% if perms.RIGS.add_invoice %}
<a href="{% url 'invoice_event' event.pk %}" class="btn btn-default" title="Invoice Rig"><span <a href="{% url 'invoice_event' event.pk %}" class="btn btn-default" title="Invoice Rig"><span
class="glyphicon glyphicon-gbp"></span></a> class="glyphicon glyphicon-gbp"></span> <span
class="hidden-xs">Invoice</span></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div>
{% endif %} {% endif %}
{% if object.is_rig %} {% if object.is_rig %}
{# only need contact details for a rig #} {# only need contact details for a rig #}
@@ -167,17 +165,21 @@
<div class="col-sm-12 text-right"> <div class="col-sm-12 text-right">
<div class="btn-group btn-page"> <div class="btn-group btn-page">
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span <a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
class="glyphicon glyphicon-edit"></span></a> class="glyphicon glyphicon-edit"></span> <span
class="hidden-xs">Edit</span></a>
{% if event.is_rig %} {% if event.is_rig %}
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span <a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
class="glyphicon glyphicon-print"></span></a> class="glyphicon glyphicon-print"></span> <span
class="hidden-xs">Print</span></a>
{% endif %} {% endif %}
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span <a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
class="glyphicon glyphicon-duplicate"></span></a> class="glyphicon glyphicon-duplicate"></span> <span
class="hidden-xs">Duplicate</span></a>
{% if event.is_rig %} {% if event.is_rig %}
{% if perms.RIGS.add_invoice %} {% if perms.RIGS.add_invoice %}
<a href="{% url 'invoice_event' event.pk %}" class="btn btn-default" title="Invoice Rig"><span <a href="{% url 'invoice_event' event.pk %}" class="btn btn-default" title="Invoice Rig"><span
class="glyphicon glyphicon-gbp"></span></a> class="glyphicon glyphicon-gbp"></span> <span
class="hidden-xs">Invoice</span></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
@@ -200,22 +202,21 @@
<div class="col-sm-12 text-right"> <div class="col-sm-12 text-right">
<div class="btn-group btn-page"> <div class="btn-group btn-page">
<a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span <a href="{% url 'event_update' event.pk %}" class="btn btn-default"><span
class="glyphicon glyphicon-edit"></span></a> class="glyphicon glyphicon-edit"></span> <span
<<<<<<< HEAD class="hidden-xs">Edit</span></a>
{% if event.is_rig %} {% if event.is_rig %}
<a href="{% url 'event_print' event.pk %}" class="btn btn-default"><span
class="glyphicon glyphicon-print"></span></a>
{% endif %}
=======
<a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span <a href="{% url 'event_print' event.pk %}" target="_blank" class="btn btn-default"><span
class="glyphicon glyphicon-print"></span></a> class="glyphicon glyphicon-print"></span> <span
>>>>>>> master class="hidden-xs">Print</span></a>
{% endif %}
<a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span <a href="{% url 'event_duplicate' event.pk %}" class="btn btn-default" title="Duplicate Rig"><span
class="glyphicon glyphicon-duplicate"></span></a> class="glyphicon glyphicon-duplicate"></span> <span
class="hidden-xs">Duplicate</span></a>
{% if event.is_rig %} {% if event.is_rig %}
{% if perms.RIGS.add_invoice %} {% if perms.RIGS.add_invoice %}
<a href="{% url 'invoice_event' event.pk %}" class="btn btn-default" title="Invoice Rig"><span <a href="{% url 'invoice_event' event.pk %}" class="btn btn-default" title="Invoice Rig"><span
class="glyphicon glyphicon-gbp"></span></a> class="glyphicon glyphicon-gbp"></span> <span
class="hidden-xs">Invoice</span></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>

View File

@@ -1,48 +1,54 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
{% load multiply from filters %} {% load multiply from filters %}
{% load static %}
<!DOCTYPE document SYSTEM "rml.dtd"> <!DOCTYPE document SYSTEM "rml.dtd">
<document filename="Event {{ object.id }} - {{ object.name }} - {{ object.start_date }}.pdf"> <document filename="Event {{ object.id }} - {{ object.name }} - {{ object.start_date }}.pdf">
<docinit> <docinit>
<registerTTFont faceName="OpenSans" fileName="{{ fonts.opensans.regular }}"/> <registerTTFont faceName="OpenSans" fileName="{{ fonts.opensans.regular }}"/>
<registerTTFont faceName="OpenSans-Bold" fileName="{{ fonts.opensans.bold }}"/> <registerTTFont faceName="OpenSans-Bold" fileName="{{ fonts.opensans.bold }}"/>
<registerFontFamily name="OpenSans" bold="OpenSans-Bold" boldItalic="OpenSans-BoldItalic"/> <registerFontFamily name="OpenSans" bold="OpenSans-Bold" boldItalic="OpenSans-Bold"/>
</docinit> </docinit>
<stylesheet> <stylesheet>
<initialize> <initialize>
<color id="LightGray" RGB="#D3D3D3"/> <color id="LightGray" RGB="#D3D3D3"/>
<color id="DarkGray" RGB="#707070"/>
</initialize> </initialize>
<paraStyle name="style.para" fontName="OpenSans" /> <paraStyle name="style.para" fontName="OpenSans" />
<paraStyle name="blockPara" spaceAfter="5" spaceBefore="5"/> <paraStyle name="blockPara" spaceAfter="5" spaceBefore="5"/>
<paraStyle name="style.Heading1" fontName="OpenSans" fontSize="14" leading="10" spaceAfter="10"/> <paraStyle name="style.Heading1" fontName="OpenSans" fontSize="16" leading="18" spaceAfter="0"/>
<paraStyle name="style.Heading2" fontName="OpenSans-Bold" fontSize="12" spaceAfter="5"/> <paraStyle name="style.Heading2" fontName="OpenSans-Bold" fontSize="10" spaceAfter="2"/>
<paraStyle name="style.Heading3" fontName="OpenSans" fontSize="11" spaceAfter="5"/> <paraStyle name="style.Heading3" fontName="OpenSans" fontSize="10" spaceAfter="0"/>
<paraStyle name="center" alignment="center"/> <paraStyle name="center" alignment="center"/>
<blockTableStyle id="headerTable"> <paraStyle name="style.event_description" fontName="OpenSans" textColor="DarkGray" />
<blockFont name="OpenSans-Bold"/> <paraStyle name="style.item_description" fontName="OpenSans" textColor="DarkGray" leftIndent="10" />
<blockAlignment value="left"/> <paraStyle name="style.specific_description" fontName="OpenSans" textColor="DarkGray" fontSize="10" />
<blockLeftPadding start="0,0" stop="0,0" length="0"/> <paraStyle name="style.times" fontName="OpenSans" fontSize="10" />
<blockBackground start="1,0" stop="1,0" colorName="LightGray"/>
<blockBackground start="3,0" stop="3,0" colorName="LightGray"/> <blockTableStyle id="eventSpecifics">
<lineStyle kind="box" start="1,0" stop="1,0" colorName="black"/> <blockValign value="top"/>
<lineStyle kind="box" start="3,0" stop="3,0" colorName="black"/> <lineStyle kind="LINEAFTER" colorName="LightGrey" start="0,0" stop="1,0" thickness="1"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="eventDetails"> <blockTableStyle id="eventDetails">
<blockValign value="top"/> <blockValign value="top"/>
<blockTopPadding start="0,0" stop="-1,0" length="0"/>
<blockLeftPadding start="0,0" stop="0,-1" length="0"/>
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="itemTable"> <blockTableStyle id="itemTable">
<blockValign value="top"/> <blockValign value="top"/>
<lineStyle kind="grid" colorName="black" thickness="1" start="0,0" stop="-1,-1"/> <lineStyle kind="LINEBELOW" colorName="LightGrey" start="0,0" stop="-1,-1" thickness="1"/>
{#<lineStyle kind="box" colorName="black" thickness="1" start="0,0" stop="-1,-1"/>#}
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="totalTable"> <blockTableStyle id="totalTable">
<blockLeftPadding start="0,0" stop="0,-1" length="0"/> <blockLeftPadding start="0,0" stop="0,-1" length="0"/>
<lineStyle cap="default" kind="grid" colorName="black" thickness="1" start="1,0" stop="-1,-1"/> <lineStyle kind="LINEBELOW" colorName="LightGrey" start="-2,0" stop="-1,-1" thickness="1"/>
{# <lineStyle cap="default" kind="grid" colorName="black" thickness="1" start="1,0" stop="-1,-1"/> #}
</blockTableStyle> </blockTableStyle>
<blockTableStyle id="infoTable" keepWithNext="true"> <blockTableStyle id="infoTable" keepWithNext="true">
@@ -65,39 +71,38 @@
</blockTableStyle> </blockTableStyle>
</stylesheet> </stylesheet>
<template> <template > {# Note: page is 595x842 points (1 point=1/72in) #}
<pageTemplate id="Headed" > <pageTemplate id="Headed" >
<pageGraphics> <pageGraphics>
<image file="http://images.nottinghamtec.co.uk/rigs_logo.jpg" x="50" y="702"/> <image file="RIGS/static/imgs/paperwork/corner.jpg" x="395" y="642" height="200" width="200"/>
<setFont name="OpenSans-Bold" size="14" leading="10"/>
<drawString x="140" y="775">TEC PA &amp; Lighting</drawString> {# 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"/>
<setFont name="OpenSans-Bold" size="22.5" leading="10"/>
<drawString x="137" y="780">TEC PA &amp; Lighting</drawString>
<setFont name="OpenSans" size="9"/>
<drawString x="137" y="760">Portland Building, University Park, Nottingham, NG7 2RD</drawString>
<drawString x="137" y="746">Phone: (0115) 846 8720</drawString>
<drawString x="137" y="732">www.nottinghamtec.co.uk</drawString>
<drawString x="265" y="732">info@nottinghamtec.co.uk</drawString>
<setFont name="OpenSans" size="10" /> <setFont name="OpenSans" size="10" />
<drawString x="140" y="762">Portland Building</drawString>
<drawString x="140" y="751">University Park</drawString>
<drawString x="140" y="740">Nottingham</drawString>
<drawString x="140" y="729">NG7 2RD</drawString>
<drawString x="140" y="718">0115 846 8720</drawString>
<drawString x="140" y="707">info@nottinghamtec.co.uk</drawString>
<image file="http://images.nottinghamtec.co.uk/rigs_union_logo.jpg" x="365" y="746"/>
<drawCenteredString x="302.5" y="50">[{{ copy }} Copy]</drawCenteredString> <drawCenteredString x="302.5" y="50">[{{ copy }} Copy]</drawCenteredString>
<drawCenteredString x="302.5" y="38">[Page <pageNumber/> of <getName id="lastPage" default="0" />]</drawCenteredString>
</pageGraphics> </pageGraphics>
<frame id="jobDetails" x1="50" y1="682" width="495" height="20"/>
<frame id="client" x1="50" y1="560" width="150" height="120" topPadding="5" <frame id="main" x1="50" y1="65" width="495" height="645"/>
rightPadding="5" bottomPadding="5" leftPadding="5"/>
<frame id="venue" x1="221" y1="560" width="150" height="120" topPadding="5"
rightPadding="5" bottomPadding="5" leftPadding="5"/>
<frame id="event" x1="395" y1="560" width="150" height="120" topPadding="5"
rightPadding="5" bottomPadding="5" leftPadding="5"/>
<frame id="main" x1="50" y1="65" width="495" height="502"/>
</pageTemplate> </pageTemplate>
<pageTemplate id="Main"> <pageTemplate id="Main">
<pageGraphics> <pageGraphics>
<setFont name="OpenSans" size="10"/> <setFont name="OpenSans" size="10"/>
<drawCenteredString x="302.5" y="50">[{{ copy }} Copy]</drawCenteredString> <drawCenteredString x="302.5" y="50">[{{ copy }} Copy]</drawCenteredString>
<drawCenteredString x="302.5" y="38">[Page <pageNumber/> of <getName id="lastPage" default="0" />]</drawCenteredString>
</pageGraphics> </pageGraphics>
<frame id="main" x1="50" y1="65" width="495" height="727"/> <frame id="main" x1="50" y1="65" width="495" height="727"/>
</pageTemplate> </pageTemplate>

View File

@@ -1,85 +1,93 @@
<setNextFrame name="jobDetails"/> <setNextFrame name="main"/>
<nextFrame/> <nextFrame/>
<blockTable style="headerTable" colWidths="123,124,123,123">
<tr>
<td>Event Date:</td>
<td>{{ object.start_date }}</td>
<td>JOB NUMBER:</td>
<td>N{{ object.pk|stringformat:"05d" }}</td>
</tr>
</blockTable>
<setNextFrame name="client"/> <h1><b>N{{ object.pk|stringformat:"05d" }}:</b> '{{ object.name }}'<small></small></h1>
<nextFrame/>
<keepInFrame> <para style="style.event_description">
<b>{{object.start_date|date:"D jS N Y"}}</b>
</para>
<keepInFrame maxHeight="30">
<para style="style.event_description">
{{ object.description|default_if_none:""|linebreaks }}
</para>
</keepInFrame>
<spacer length="15"/>
<blockTable style="eventSpecifics" colWidths="165,165,165">
<tr>
<td leftPadding="0">
<h2>Hirer</h2> <h2>Hirer</h2>
<h3>{{ object.person.name }}</h3> <h3>{{ object.person.name }}</h3>
<h3>{{ object.organisation.name|default_if_none:"" }}</h3> <h3>{{ object.organisation.name|default_if_none:"" }}</h3>
<keepInFrame>
{% if object.person.phone %} {% if object.person.phone %}
<para>Tel: {{ object.person.phone }}</para> <para style="specific_description">{{ object.person.phone }}</para>
{% elif object.organisation.phone %} {% elif object.organisation.phone %}
<para>Tel: {{ object.organisation.phone }}</para> <para style="specific_description">{{ object.organisation.phone }}</para>
{% endif %}
{% if object.person.email %}
<para>Email: {{ object.person.email }}</para>
{% elif object.organisation.email %}
<para>Email: {{ object.organisation.email }}</para>
{% endif %} {% endif %}
</keepInFrame> </keepInFrame>
<setNextFrame name="venue"/>
<nextFrame/>
<keepInFrame> <keepInFrame>
{% if object.person.email %}
<para style="specific_description">{{ object.person.email }}</para>
{% elif object.organisation.email %}
<para style="specific_description">{{ object.organisation.email }}</para>
{% endif %}
</keepInFrame>
</td>
<td>
<h2>Venue</h2> <h2>Venue</h2>
<h3>{{ object.venue.name }}</h3> <h3>{{ object.venue.name }}</h3>
<para>{{ object.venue.address|default_if_none:""|linebreaks }}</para> <keepInFrame>
<para style="specific_description">{{ object.venue.address|default_if_none:""|linebreaks }}</para>
</keepInFrame> </keepInFrame>
</td>
<td rightPadding="0">
<setNextFrame name="event"/> <h2>Timings</h2>
<nextFrame/> <blockTable style="eventDetails" colWidths="55,75">
<h2>Event Details</h2>
<blockTable style="eventDetails" colWidths="75,75">
<tr> <tr>
<td>Start Time</td> <td leftPadding="0" topPadding="0"><h3>Start</h3></td>
<td> <td>
<para>{{ object.start_time|time:"H:i" }} <para style="times">{{ object.start_time|time:"H:i" }}
<br/> {{ object.start_date|date:"d/m/Y" }}
{{ object.start_date|date:"(d/m/Y)" }}
</para> </para>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>End Time</td> <td leftPadding="0"><h3>End</h3></td>
<td> <td>
<para>{{ object.end_time|time:"H:i" }} <para style="times">{{ object.end_time|default_if_none:""|time:"H:i" }}
<br/> {{ object.end_date|date:"d/m/Y" }}
{{ object.end_date|date:"(d/m/Y)" }}
</para> </para>
</td> </td>
</tr> </tr>
{% if object.access_at %}
<tr> <tr>
<td>Earliest Access</td> <td leftPadding="0"><h3>Access</h3></td>
<td> <td>
<para>{{ object.access_at|time:"H:i" }} <para style="times">{{ object.access_at|time:"H:i" }}
<br/>
{{ object.access_at|date:"d/m/Y" }} {{ object.access_at|date:"d/m/Y" }}
</para> </para>
</td> </td>
</tr> </tr>
{% endif %}
</blockTable>
</td>
</tr>
</blockTable> </blockTable>
<spacer length="15"/>
<setNextTemplate name="Main"/> <setNextTemplate name="Main"/>
<setNextFrame name="main"/>
<nextFrame/>
<blockTable style="itemTable" colWidths="300,80,35,80"> <blockTable style="itemTable" colWidths="300,80,35,80">
<tr> <tr>
{# Bold tags need to be in a para in order to render in reportlab #} {# Bold tags need to be in a para in order to render in reportlab #}
<td> <td>
<para> <para>
<b>Equipment Details</b> <b>Item</b>
</para> </para>
</td> </td>
<td> <td>
@@ -103,8 +111,11 @@
<td> <td>
<para>{{ item.name }} <para>{{ item.name }}
{% if item.description %} {% if item.description %}
<br/> </para>
<para style="item_description">
<em>{{ item.description|linebreaks }}</em> <em>{{ item.description|linebreaks }}</em>
</para>
<para>
{% endif %} {% endif %}
</para> </para>
</td> </td>
@@ -114,10 +125,11 @@
</tr> </tr>
{% endfor %} {% endfor %}
</blockTable> </blockTable>
<keepTogether>
<blockTable style="totalTable" colWidths="300,115,80"> <blockTable style="totalTable" colWidths="300,115,80">
<tr> <tr>
<td>VAT may be charged at the current rate date of event ({{ object.vat_rate.as_percent|floatformat:2 }}%)</td> <td>VAT may be charged at the current rate date of event ({{ object.vat_rate.as_percent|floatformat:2 }}%)</td>
<td>Sum-total</td> <td>Total (ex. VAT)</td>
<td>£ {{ object.sum_total|floatformat:2 }}</td> <td>£ {{ object.sum_total|floatformat:2 }}</td>
</tr> </tr>
<tr> <tr>
@@ -143,7 +155,8 @@
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
</keepTogether>
<keepTogether>
<blockTable style="infoTable"> <blockTable style="infoTable">
<tr> <tr>
<td> <td>
@@ -157,17 +170,9 @@
<td>24 Hour Emergency Contacts: 07825 065681 or 07825 065678</td> <td>24 Hour Emergency Contacts: 07825 065681 or 07825 065678</td>
</tr> </tr>
</blockTable> </blockTable>
</keepTogether>
<blockTable style="paymentTable" colWidths="100,146,93,154"> <spacer length="15"/>
<tr></tr> <keepTogether>
<tr>
<td>Payment Received:</td>
<td>{{ object.payment_received }}</td>
<td>Payment Method:</td>
<td>{{ object.payment_method }}</td>
</tr>
<tr></tr>
</blockTable>
<para style="blockPara"> <para style="blockPara">
<b>To be signed on booking:</b> <b>To be signed on booking:</b>
@@ -221,7 +226,7 @@
</para> </para>
{% include "RIGS/event_print_signature.xml" %} {% include "RIGS/event_print_signature.xml" %}
<spacer length="10"/>
<para style="blockPara"> <para style="blockPara">
<b>To be signed on the day of the event/hire:</b> <b>To be signed on the day of the event/hire:</b>
</para> </para>
@@ -234,3 +239,5 @@
{% endif %} {% endif %}
{% include "RIGS/event_print_signature.xml" %} {% include "RIGS/event_print_signature.xml" %}
</keepTogether>
<namedString id="lastPage"><pageNumber/></namedString>

View File

@@ -2,7 +2,7 @@
<tr id="item-{{item.pk}}" data-pk="{{item.pk}}" class="item_row"> <tr id="item-{{item.pk}}" data-pk="{{item.pk}}" class="item_row">
<td> <td>
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
<div> <div class="item-description">
<em class="description">{{item.description|linebreaksbr}}</em> <em class="description">{{item.description|linebreaksbr}}</em>
</div> </div>
</td> </td>