mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-25 16:33:47 +00:00
Adapte le champs search de navbar aux nouveauté et y affiche la query
This commit is contained in:
parent
ea7292c023
commit
8958f2a06a
2 changed files with 2 additions and 1 deletions
|
@ -225,6 +225,7 @@ def get_results(query, request, filters={}):
|
||||||
results[r] = results[r].distinct()[:max_result]
|
results[r] = results[r].distinct()[:max_result]
|
||||||
|
|
||||||
results.update({'max_result': max_result})
|
results.update({'max_result': max_result})
|
||||||
|
results.update({'search_term': query})
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<div class="col-sm-3 col-md-3 navbar-right">
|
<div class="col-sm-3 col-md-3 navbar-right">
|
||||||
<form action="{% url "search:search"%}" class="navbar-form" role="search">
|
<form action="{% url "search:search"%}" class="navbar-form" role="search">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" placeholder="Search" name="search_field" id="search-term">
|
<input type="text" class="form-control" placeholder="Search" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}>
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
||||||
<a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="glyphicon glyphicon-plus"></i></a>
|
<a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="glyphicon glyphicon-plus"></i></a>
|
||||||
|
|
Loading…
Reference in a new issue