Fix up header search

This commit is contained in:
2020-03-15 15:19:39 +00:00
parent 7cef4d03c0
commit 3f36f66b8a
2 changed files with 46 additions and 53 deletions

View File

@@ -17,54 +17,45 @@
<div class="card-body">
<p>
Searches for entire query in:
<button type="button" class="btn btn-default btn-xs">name</button>
<button type="button" class="btn btn-default btn-xs">description</button> and
<button type="button" class="btn btn-default btn-xs">notes</button>
<span class="badge badge-dark">name</span>
<span class="badge badge-dark">description</span> and
<span class="badge badge-dark">notes</span>
</p>
<p>You can search for an event by <button type="button" class="btn btn-default btn-xs">event_id</button> by entering an integer, or using the format <code>N01234</code></p>
<p>On the search results page you can also specify the date range for the <button type="button" class="btn btn-default btn-xs">start_date</button> of the event</p>
<p>Events are sorted in reverse <button type="button" class="btn btn-default btn-xs">start_date</button> order (most recent events at the top)</p>
<p>You can search for an event by <span class="badge badge-dark">event_id</span> by entering an integer, or using the format <code>N01234</code></p>
<p>On the search results page you can also specify the date range for the <span class="badge badge-dark">start_date</span> of the event</p>
<p>Events are sorted in reverse <span class="badge badge-dark">start_date</span> order (most recent events at the top)</p>
</div>
</div>
<div class="card card-default">
<div class="card-header">
<h3 class="card-title">Searching People/Organisations/Venues</h3>
</div>
<div class="card-body">
<p>
Searches for entire search phrase in:
<button type="button" class="btn btn-default btn-xs">name</button>
<button type="button" class="btn btn-default btn-xs">email</button>
<button type="button" class="btn btn-default btn-xs">address</button>
<button type="button" class="btn btn-default btn-xs">notes</button> and
<button type="button" class="btn btn-default btn-xs">phone</button>
<span class="badge badge-dark">name</span>
<span class="badge badge-dark">email</span>
<span class="badge badge-dark">address</span>
<span class="badge badge-dark">notes</span> and
<span class="badge badge-dark">phone</span>
</p>
<p>You can search for an entry by <button type="button" class="btn btn-default btn-xs">id</button> by entering an integer</p>
<p>Entries are sorted in alphabetical order by <button type="button" class="btn btn-default btn-xs">name</button></p>
<p>You can search for an entry by <span class="badge badge-dark">id</span> by entering an integer</p>
<p>Entries are sorted in alphabetical order by <span class="badge badge-dark">name</span></p>
</div>
{% if perms.RIGS.view_invoice %}
<div class="card-header">
<h3 class="card-title">Searching Invoices</h3>
</div>
<div class="card-body">
<p>
Searches for entire search phrase in:
<span class="badge badge-dark">event__name</span>
</p>
<p>You can search for an event's invoice by entering the <span class="badge badge-dark">event_id</span> using the format <code>N01234</code></p>
<p>You can search for an invoice by <span class="badge badge-dark">invoice_id</span> using the format <code>#01234</code></p>
<p>Entering a raw integer will search by both <span class="badge badge-dark">invoice_id</span> and <span class="badge badge-dark">event_id</span></p>
<p>Entries are sorted in reverse <span class="badge badge-dark">invoice_date</span> order</p>
</div>
</div>
{% if perms.RIGS.view_invoice %}
<div class="card card-default">
<div class="card-header">
<h3 class="card-title">Searching Invoices</h3>
</div>
<div class="card-body">
<p>
Searches for entire search phrase in:
<button type="button" class="btn btn-default btn-xs">event__name</button>
</p>
<p>You can search for an event's invoice by entering the <button type="button" class="btn btn-default btn-xs">event_id</button> using the format <code>N01234</code></p>
<p>You can search for an invoice by <button type="button" class="btn btn-default btn-xs">invoice_id</button> using the format <code>#01234</code></p>
<p>Entering a raw integer will search by both <button type="button" class="btn btn-default btn-xs">invoice_id</button> and <button type="button" class="btn btn-default btn-xs">event_id</button></p>
<p>Entries are sorted in reverse <button type="button" class="btn btn-default btn-xs">invoice_date</button> order</p>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@@ -54,21 +54,23 @@
{% 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 w-25" 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>
<a href="{% url 'search_help' %}" class="nav-link modal-href"><span class="fas fa-question"></span></a></h4>
<form id="searchForm" class="form-inline" role="form" method="GET">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<input id="id_search_input" type="search" name="q" class="form-control form-control-sm" placeholder="Search..." />
</div>
<select id="search-options" 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 form-control-sm btn-sm">Search</button>
<a href="{% url 'search_help' %}" class="nav-link modal-href btn-sm"><span class="fas fa-question-circle"></span></a>
</form>
{% endblock %}
{% block js %}