Commit da5ee3c8 authored by fred's avatar fred
Browse files

news: fix search

parent 8f5df8fe
......@@ -45,6 +45,7 @@ def news_nav(context, date=None, klass=None):
'newsitem': context.get('newsitem'),
'categories': context.get('categories'),
'news': context.get('news'),
'search_query': context.get('search_query'),
}
@register.inclusion_tag('emissions/nav.html', takes_context=True)
......
......@@ -281,7 +281,8 @@ $(function() {
$("#search-form").unbind('submit').on('submit', function(event) {
event.preventDefault();
$(this).addClass('loading');
loadPage($(this).attr('action') + '/?' + $(this).serialize());
console.log('action:', $(this).attr('action') + '?' + $(this).serialize());
loadPage($(this).attr('action') + '?' + $(this).serialize());
});
$(".tabs").each(function() {
var self = $(this);
......
......@@ -8,15 +8,6 @@
{% block main %}
<form method="get" action="." class="padded center" id="search-form">
<div class="big ">
<label for="id_q">Rechercher :</label>
<input id="id_q" name="q" type="text" {% if search_query %}value="{{ search_query }}{% endif %}">
<button class="icon-search"></button>
</div>
</form>
<div class="wrapper {% if results %}sided{% endif %}">
{% if search_query and not results %}
......
<div class="mainSub">
<div class="wrapper">
<nav>
<form method="get" action="." class="big marged" id="search-form">
<label for="id_q">Rechercher:</label><input id="id_q" name="q" type="text"><button class="icon-search"></button>
<form method="get" action="{% url 'newsArchives' %}" class="big marged" id="search-form">
<label for="id_q">Rechercher :</label>
<input id="id_q" name="q" type="text" {% if search_query %}value="{{ search_query }}"{% endif %}>
<button class="icon-search"></button>
</form>
</nav>
</div>
......
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