Commit a2569f4c authored by Maël Kervella's avatar Maël Kervella

Adapte le champs search de navbar aux nouveauté et y affiche la query

parent 0df8ce4d
......@@ -225,6 +225,7 @@ def get_results(query, request, filters={}):
results[r] = results[r].distinct()[:max_result]
results.update({'max_result': max_result})
results.update({'search_term': query})
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">
<form action="{% url "search:search"%}" class="navbar-form" role="search">
<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">
<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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment