mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 00:12:15 +00:00
Start to move search bar into header
Broken because my scripts are all over the place
This commit is contained in:
@@ -41,50 +41,6 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-default">
|
||||
<div class="card-heading">
|
||||
<h4 class="card-title">Search Rigboard
|
||||
<a href="{% url 'search_help' %}" class="pull-right modal-href"><span class="fas fa-question-sign"</span></a></h4>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#search-options li a').click(function(){
|
||||
$('#searchForm').attr('action', $(this).data('action')).submit();
|
||||
});
|
||||
$('#id_search_input').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('#searchForm').attr('action', $('#search-options li a').first().data('action')).submit();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="list-group">
|
||||
<div class="list-group-item">
|
||||
<form id="searchForm" class="form" role="form" method="GET">
|
||||
<div class="input-group" data-toggle="tooltip" title="Use the dropdown button to select what to search. The default is Event Archive.">
|
||||
<input id="id_search_input" type="search" name="q" class="form-control" placeholder="Search..." />
|
||||
<span class="input-group-btn">
|
||||
<div class="btn-group" role="group">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="fas fa-search"></span> Search <span class="caret"></span></button>
|
||||
<ul id="search-options" class="dropdown-menu">
|
||||
<li><a data-action="{% url 'event_archive' %}" href="#">Events</a></li>
|
||||
<li><a data-action="{% url 'person_list' %}" href="#">People</a></li>
|
||||
<li><a data-action="{% url 'organisation_list' %}" href="#">Organisations</a></li>
|
||||
<li><a data-action="{% url 'venue_list' %}" href="#">Venues</a></li>
|
||||
{% if perms.RIGS.view_invoice %}
|
||||
<li><a data-action="{% url 'invoice_archive' %}" href="#">Invoices</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if perms.RIGS.view_event %}
|
||||
<div class="col-sm-6">
|
||||
|
||||
Reference in New Issue
Block a user