Commit 525b047b authored by Sli's avatar Sli Committed by Skia

forum: display search bar on every forum pages

parent 404b825d
{% extends "core/base.jinja" %}
{% from 'forum/macros.jinja' import display_forum, display_topic %}
{% from 'forum/macros.jinja' import display_forum, display_topic, display_search_bar %}
{% block title %}
{{ forum }}
......@@ -12,6 +12,7 @@
> <a href="{{ f.get_absolute_url() }}">{{ f }}</a>
{% endfor %}
> <a href="{{ forum.get_absolute_url() }}">{{ forum }}</a>
{{ display_search_bar() }}
</div>
<div id="forum">
<h3>{{ forum.name }}</h3>
......
......@@ -155,3 +155,9 @@
{{ m.mark_as_read(user) or "" }}
{% endmacro %}
{% macro display_search_bar() %}
<form action="{{ url('forum:search') }}" method="GET" style="text-align: right;">
<input type="text" placeholder="{% trans %}Search{% endtrans %}" name="query"/>
<input type="submit" value="{% trans %}Search{% endtrans %}"/>
</form>
{% endmacro %}
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% from 'forum/macros.jinja' import display_forum %}
{% from 'forum/macros.jinja' import display_forum, display_search_bar %}
{% block title %}
{% trans %}Forum{% endtrans %}
......@@ -12,6 +12,7 @@
</p>
<div id="forum">
<h3>{% trans %}Forum{% endtrans %}</h3>
{{ display_search_bar() }}
<p>
<a class="ib button" href="{{ url('forum:last_unread') }}">{% trans %}View last unread messages{% endtrans %}</a>
<a class="ib button" href="{{ url('forum:favorite_topics') }}">{% trans %}Favorite topics{% endtrans %}</a>
......@@ -21,10 +22,6 @@
<a href="{{ url('forum:new_forum') }}">{% trans %}New forum{% endtrans %}</a>
</p>
{% endif %}
<form action="{{ url('forum:search') }}" method="GET" id="header_search">
<input type="text" placeholder="{% trans %}Search{% endtrans %}" name="query" id="search" />
<input type="submit" value="{% trans %}Search{% endtrans %}" style="display: none;" />
</form>
<div>
<div class="ib w_big">
{% trans %}Title{% endtrans %}
......
{% extends "core/base.jinja" %}
{% from 'forum/macros.jinja' import display_message %}
{% from 'forum/macros.jinja' import display_message, display_search_bar %}
{% block title %}
{% if topic %}
......@@ -11,6 +11,7 @@
{% block content %}
{% if topic %}
{{ display_search_bar() }}
<p>
<a href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a>
{% for f in topic.forum.get_parent_list() %}
......
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% from 'forum/macros.jinja' import display_message %}
{% from 'forum/macros.jinja' import display_message, display_search_bar %}
{% block title %}
{{ topic }}
......@@ -27,6 +27,7 @@
{% block content %}
<p>
{{ display_search_bar() }}
<a href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a>
{% for f in topic.forum.get_parent_list()|reverse %}
> <a href="{{ f.get_absolute_url() }}">{{ f }}</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