forked from mirror/Part-DB.Part-DB-server
Added some simple tables for searching, subcategories and tags.
This commit is contained in:
parent
f402145c51
commit
4c5b5b6df0
4 changed files with 79 additions and 27 deletions
|
@ -18,7 +18,7 @@
|
|||
<div class="collapse navbar-collapse" id="navbarContent">
|
||||
<div class="form-inline my-2 my-lg-0 ml-auto" id="searchbar">
|
||||
<!-- Searchbar -->
|
||||
<form action="{$relative_path}show_search_parts.php" method="get">
|
||||
<form action="" method="get">
|
||||
<div class="dropdown d-inline">
|
||||
<button class="btn btn-light dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
{% trans %}search.options.label{% endtrans %}
|
||||
|
@ -52,8 +52,10 @@
|
|||
<label for="regex" class="form-check-label">{% trans %}search.regexmatching{% endtrans %}</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="search" class="form-control mr-sm-2" placeholder="{% trans %}search.placeholder{% endtrans %}" name="keyword" onkeyup="livesearch(event, this, 2);">
|
||||
<button type="submit" id="search-submit" class="btn btn-outline-secondary my-2">{% trans %}go.exclamation{% endtrans %}</button>
|
||||
|
||||
<input type="search" class="form-control mr-sm-2" placeholder="{% trans %}search.placeholder{% endtrans %}" name="keyword"
|
||||
onkeyup="$('#search-submit').attr('href', $('#search-submit').data('href') + '/' + $(this).val());">
|
||||
<a id="search-submit" href="#" role="button" data-href="{{ url('parts_search', {'keyword': ''}) }}" class="btn btn-outline-secondary my-2">{% trans %}go.exclamation{% endtrans %}</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
{% macro string_to_tags(string, class="badge badge-info") %}
|
||||
{% for tag in string|split(',') %}
|
||||
<a href="#" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
<a href="{{ url('part_list_tags', {'tag': tag | trim}) }}" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue