mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 09:22:21 +00:00
Generic list template
This commit is contained in:
@@ -228,9 +228,9 @@ class EventPrint(generic.View):
|
||||
|
||||
|
||||
class EventArchive(generic.ListView):
|
||||
template_name = "event_archive.html"
|
||||
model = models.Event
|
||||
paginate_by = 25
|
||||
template_name = "event_archive.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
# get super context
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{% 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.js" %}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover().click(function(){
|
||||
@@ -16,28 +16,12 @@
|
||||
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);
|
||||
});
|
||||
|
||||
|
||||
$('.date').each(function (index, dateElem) {
|
||||
var $dateElem = $(dateElem);
|
||||
var formatted = moment($dateElem.attr('data-date')).fromNow();
|
||||
$dateElem.text(formatted);
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -47,10 +31,9 @@
|
||||
<div class="col-sm-12">
|
||||
<h3>Rigboard Activity Stream</h3>
|
||||
</div>
|
||||
<div class="text-right col-sm-12">{% paginator %}</div>
|
||||
</div>
|
||||
{% paginator %}
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -59,12 +42,11 @@
|
||||
<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>
|
||||
@@ -75,16 +57,15 @@
|
||||
{{version.changes.new|to_class_name}} Created
|
||||
{% else %}
|
||||
{% include 'version_changes.html' %}
|
||||
{% endif %} </td>
|
||||
<td>{{ version.changes.revision.comment }}</td>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="align-right">{% paginator %}</div>
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">End</div>
|
||||
<input type="date" name="end" id="end" value="{{ end|default_if_none:"" }}" placeholder="End" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">Keyword</div>
|
||||
<input type="search" name="q" placeholder="Keyword" value="{{ request.GET.q }}"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="submit" class="btn btn-primary" value="Search"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
<div class="pull-right">
|
||||
{% paginator %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@@ -52,4 +52,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -18,29 +18,27 @@
|
||||
{% endif %}
|
||||
{% if object.is_rig and perms.RIGS.view_event %}
|
||||
{# only need contact details for a rig #}
|
||||
<div class="col-sm-12 col-md-6 col-lg-5">
|
||||
<div class="card card-default">
|
||||
<div class="col-sm">
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-header">Contact Details</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Person</dt>
|
||||
<dd
|
||||
<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 }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Email</dt>
|
||||
<dd>
|
||||
<dt class="col-sm-6">Email</dt>
|
||||
<dd class="col-sm-6">
|
||||
<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>
|
||||
<dt class="col-sm-6">Phone Number</dt>
|
||||
<dd class="col-sm-6"><a href="tel:{{object.person.phone}}">{{ object.person.phone }}</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,38 +46,36 @@
|
||||
<div class="card card-default">
|
||||
<div class="card-header">Organisation</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Organisation</dt>
|
||||
<dd>
|
||||
<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 }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>Phone Number</dt>
|
||||
<dd>
|
||||
<dt class="col-sm-6">Phone Number</dt>
|
||||
<dd class="col-sm-6">
|
||||
<a href="tel:{{object.person.phone}}">
|
||||
{{ object.organisation.phone }}
|
||||
</a>
|
||||
</dd>
|
||||
|
||||
<dt>Has SU Account</dt>
|
||||
<dd>{{ event.organisation.union_account|yesno|capfirst }}</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 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-sm-12 {% if event.is_rig and perms.RIGS.view_event %}col-md-6 col-lg-7{% endif %}">
|
||||
<div class="col-sm">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">Event Info</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Event Venue</dt>
|
||||
<dd>
|
||||
<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 }}
|
||||
@@ -88,8 +84,8 @@
|
||||
</dd>
|
||||
|
||||
{% if event.is_rig %}
|
||||
<dt>Event MIC</dt>
|
||||
<dd>
|
||||
<dt class="col-sm-6">Event MIC</dt>
|
||||
<dd class="col-sm-6">
|
||||
{% if event.mic and perms.RIGS.view_profile %}
|
||||
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
|
||||
{{ event.mic.name }}
|
||||
@@ -100,35 +96,35 @@
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>Status</dt>
|
||||
<dd>{{ event.get_status_display }}</dd>
|
||||
<dt class="col-sm-6">Status</dt>
|
||||
<dd class="col-sm-6">{{ event.get_status_display }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
<dd class="col-sm-12"> </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 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>Access From</dt>
|
||||
<dd>{{ event.access_at|date:"D d M Y H:i"|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>Event Starts</dt>
|
||||
<dd>{{ event.start_date|date:"D d M Y" }} {{ event.start_time|date:"H:i" }}</dd>
|
||||
<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>Event Ends</dt>
|
||||
<dd>{{ event.end_date|date:"D d M Y" }} {{ event.end_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> </dd>
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
<dt>Event Description</dt>
|
||||
<dd class="dont-break-out">{{ event.description|linebreaksbr }}</dd>
|
||||
<dt class="col-sm-6">Event Description</dt>
|
||||
<dd class="dont-break-out col-sm-12">{{ event.description|linebreaksbr }}</dd>
|
||||
|
||||
<dd> </dd>
|
||||
<dd class="col-sm-12"> </dd>
|
||||
|
||||
<dt>Based On</dt>
|
||||
<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 %}
|
||||
@@ -139,19 +135,19 @@
|
||||
</dd>
|
||||
|
||||
{% if event.dry_hire %}
|
||||
<dt>Checked In By</dt>
|
||||
<dd>{{ object.checked_in_by.name }}</dd>
|
||||
<dt class="col-sm-6">Checked In By</dt>
|
||||
<dd class="col-sm-6">{{ object.checked_in_by.name }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if event.is_rig %}
|
||||
<dt>Collected By</dt>
|
||||
<dd>{{ object.collector }}</dd>
|
||||
<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> </dd>
|
||||
<dt>PO</dt>
|
||||
<dd>{{ object.purchase_order }}</dd>
|
||||
<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>
|
||||
@@ -170,7 +166,7 @@
|
||||
">
|
||||
<div class="card-header">Client Authorisation</div>
|
||||
<div class="card-body">
|
||||
<dl class="dl-horizontal col-sm-6">
|
||||
<dl class="col-sm-6">
|
||||
<dt>Authorisation Request</dt>
|
||||
<dd>{{ object.auth_request_to|yesno:"Yes,No" }}</dd>
|
||||
|
||||
@@ -184,7 +180,7 @@
|
||||
<dd>{{ object.auth_request_to }}</dd>
|
||||
</dl>
|
||||
<dd class="visible-xs"> </dd>
|
||||
<dl class="dl-horizontal col-sm-6">
|
||||
<dl class="col-sm-6">
|
||||
<dt>Authorised</dt>
|
||||
<dd>{{ object.authorised|yesno:"Yes,No" }}</dd>
|
||||
|
||||
|
||||
@@ -75,15 +75,15 @@
|
||||
{{ object.mic.initials }}<br>
|
||||
<img src="{{ object.mic.profile_picture }}" class="event-mic-photo"/>
|
||||
{% else %}
|
||||
<span class="fas fa-exclamation-sign"></span>
|
||||
<span class="fas fa-exclamation"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a href="{% url 'invoice_event' object.pk %}"
|
||||
class="btn btn-default"
|
||||
class="btn btn-primary"
|
||||
data-toggle="tooltip"
|
||||
title="'Invoice' this event - click this when paperwork has been sent to treasury">
|
||||
<span class="fas fa-gbp"></span>
|
||||
<i class="fas fa-pound-sign"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,70 +1,25 @@
|
||||
{% 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="fas fa-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 class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>Organisations</h3>
|
||||
</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="fas fa-eye-open"></span>
|
||||
</a>
|
||||
<a href="{% url 'organisation_update' object.pk %}" class="btn btn-default"><span
|
||||
class="fas fa-pencil"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">No organisations found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'organisation_create' %}" class="btn btn-default pull-right">New <span
|
||||
class="fas fa-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="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% include 'partials/generic_list.html' with edit="organisation_update" detail="organisation_detail" union_account=True %}
|
||||
{% endblock %}
|
||||
|
||||
48
RIGS/templates/partials/generic_list.html
Normal file
48
RIGS/templates/partials/generic_list.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% load url_replace from filters %}
|
||||
{% load orderby from filters %}
|
||||
{% load paginator from filters %}
|
||||
<div class="col-sm-12">{% paginator %}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td scope="col">#</td>
|
||||
<td scope="col">Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||
<td scope="col">Email</td>
|
||||
<td scope="col">Phone</td>
|
||||
<td scope="col">Notes</td>
|
||||
{% if union_account %} {#TODO#}
|
||||
<td scope="col">Union Account</td>
|
||||
{% endif %}
|
||||
<td scope="col">Quick Links</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<th scope="row">{{ object.pk }}</th>
|
||||
<td>{{ object.name }}</td>
|
||||
<td>{{ object.email }}</td>
|
||||
<td>{% if object.phone %}<a href="tel:{{ object.phone }}">{%endif%}{{ object.phone }}{% if object.phone %}</a>{%endif%}</td>
|
||||
<td>{{ object.notes|yesno|capfirst }}</td>
|
||||
{% if union_account %}
|
||||
<td>{{ object.union_account|yesno|capfirst }}</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<a href="{% url detail object.pk %}" class="btn btn-primary modal-href">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
<a href="{% url edit object.pk %}" class="btn btn-secondary"><i
|
||||
class="fas fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">Nothing found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-12">{% paginator %}</div>
|
||||
@@ -7,62 +7,22 @@
|
||||
{% 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-primary pull-right">New <span
|
||||
class="fas fa-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 class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>People</h3>
|
||||
</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-light modal-href">
|
||||
<span class="fas fa-eye"></span>
|
||||
</a>
|
||||
<a href="{% url 'person_update' person.pk %}" class="btn btn-secondary"><span
|
||||
class="fas fa-user-edit"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">No people stored</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'person_create' %}" class="btn btn-primary pull-right">New <span
|
||||
class="fas fa-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="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% include 'partials/generic_list.html' with edit="person_update" detail="person_detail" %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -7,63 +7,22 @@
|
||||
{% 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="fas fa-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 class="row">
|
||||
<div class="col-sm-10">
|
||||
<h3>Venues</h3>
|
||||
</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="fas fa-eye-open"></span>
|
||||
</a>
|
||||
<a href="{% url 'venue_update' object.pk %}" class="btn btn-default"><span
|
||||
class="fas fa-pencil"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">No venues found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-2">
|
||||
<a href="{% url 'venue_create' %}" class="btn btn-default pull-right">New <span
|
||||
class="fas fa-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="align-right">{% paginator %}</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% include 'partials/generic_list.html' with edit="venue_update" detail="venue_detail" %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -202,6 +202,7 @@ class OrganisationUpdate(generic.UpdateView):
|
||||
|
||||
|
||||
class VenueList(generic.ListView):
|
||||
template_name = "venue_list.html"
|
||||
model = models.Venue
|
||||
paginate_by = 20
|
||||
|
||||
|
||||
Reference in New Issue
Block a user