Moved the table element from the main rigboard out to something reusuable.

Added the ability to view organisations by people and vice versa, as well as the option to see all the rigs associated with orgs/people/venues.

Added helper properties for the above
This commit is contained in:
Tom Price
2015-01-22 20:48:37 +00:00
parent e2d01cc6c5
commit c6aed3db75
7 changed files with 200 additions and 119 deletions

View File

@@ -5,13 +5,14 @@
{% block content %}
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="col-sm-6">
<h4>Details</h4>
{% if not request.is_ajax %}
<h3>{{ object.name }}<br/>
<span class="small">Last edited {{ object.last_edited_at }} by {{ object.last_edited_by }}</span>
<span class="small">Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}</span>
</h3>
<div class="pull-right">
<a href="{% url 'venue_update' object.pk %}" class="btn btn-primary">Edit <span
<a href="{% url 'person_update' object.pk %}" class="btn btn-primary">Edit <span
class="glyphicon glyphicon-pencil"></span></a>
</div>
{% endif %}
@@ -34,6 +35,23 @@
</dl>
</div>
</div>
<div class="col-sm-6">
<h4>Organisations</h4>
<ul class="list-unstyled">
{% for organisation in object.organisations %}
<li><a href="{% url 'organisation_detail' organisation.pk %}">{{ organisation.name }}</a></li>
{% endfor %}
</ul>
</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>
{% endblock %}
@@ -41,7 +59,7 @@
{% block footer %}
<div class="row">
<div class="col-sm-10 align-left">
Lasted edited at {{ object.last_edited_at|date:"SHORT_DATE_FORMAT" }} by {{ user }}
Lasted edited at {{ object.last_edited_at|date:"SHORT_DATE_FORMAT" }} by {{ object.last_edited_by.name }}
</div>
<div class="col-sm-2">
<div class="pull-right">