mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
86 lines
3.9 KiB
HTML
86 lines
3.9 KiB
HTML
{% extends 'base.html' %}
|
|
{% block titleheader %}
|
|
<a class="navbar-brand" 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>
|
|
{% endif %}
|
|
{% if perms.RIGS.view_invoice %}
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownInvoices" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Invoices
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdownInvoices">
|
|
{% if perms.RIGS.add_invoice %}
|
|
<a class="dropdown-item" href="{% url 'invoice_waiting' %}"><span class="fas fa-briefcase text-danger"></span> Waiting</a>
|
|
{% endif %}
|
|
<a class="dropdown-item" href="{% url 'invoice_list' %}"><span class="fas fa-pound-sign text-warning"></span> Outstanding</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 %}
|
|
<form id="searchForm" class="form form-inline" role="form" method="GET">
|
|
<input id="id_search_input" type="search" name="q" class="form-control" placeholder="Search..." />
|
|
<div class="input-group-append">
|
|
<select class="custom-select form-control">
|
|
<option selected data-action="{% url 'event_archive' %}" href="#">Events</option>
|
|
<option data-action="{% url 'person_list' %}" href="#">People</option>
|
|
<option data-action="{% url 'organisation_list' %}" href="#">Organisations</option>
|
|
<option data-action="{% url 'venue_list' %}" href="#">Venues</option>
|
|
{% if perms.RIGS.view_invoice %}
|
|
<option data-action="{% url 'invoice_archive' %}" href="#">Invoices</option>
|
|
{% endif %}
|
|
</select>
|
|
</div>
|
|
<button class="btn btn-primary form-control"><span class="fas fa-search"></span> Search</button>
|
|
</form>
|
|
<a href="{% url 'search_help' %}" class="nav-link modal-href"><span class="fas fa-question"></span></a></h4>
|
|
{% endblock %}
|
|
{% block js %}
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('#search-options option').click(function(){
|
|
$('#searchForm').attr('action', $(this).data('action')).submit();
|
|
});
|
|
$('#id_search_input').keypress(function (e) {
|
|
if (e.which == 13) {
|
|
$('#searchForm').attr('action', $('#search-options option').first().data('action')).submit();
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|