'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)
$("#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);
{% 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>