mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
forum: display search bar on every forum pages
This commit is contained in:
parent
404b825de4
commit
525b047b4f
@ -1,5 +1,5 @@
|
||||
{% 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 %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% 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 %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% 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() %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% 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>
|
||||
|
Loading…
Reference in New Issue
Block a user