From 525b047b4fff39daf5ccd344f4ae2f098a34691c Mon Sep 17 00:00:00 2001 From: Bartuccio Antoine Date: Wed, 5 Dec 2018 18:18:24 +0100 Subject: [PATCH] forum: display search bar on every forum pages --- forum/templates/forum/forum.jinja | 3 ++- forum/templates/forum/macros.jinja | 6 ++++++ forum/templates/forum/main.jinja | 7 ++----- forum/templates/forum/reply.jinja | 3 ++- forum/templates/forum/topic.jinja | 3 ++- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/forum/templates/forum/forum.jinja b/forum/templates/forum/forum.jinja index 89a0e3a7..ca53fb7b 100644 --- a/forum/templates/forum/forum.jinja +++ b/forum/templates/forum/forum.jinja @@ -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 @@ > {{ f }} {% endfor %} > {{ forum }} + {{ display_search_bar() }}

{{ forum.name }}

diff --git a/forum/templates/forum/macros.jinja b/forum/templates/forum/macros.jinja index 0b6804eb..5e2cc7d5 100644 --- a/forum/templates/forum/macros.jinja +++ b/forum/templates/forum/macros.jinja @@ -155,3 +155,9 @@ {{ m.mark_as_read(user) or "" }} {% endmacro %} +{% macro display_search_bar() %} +
+ + +
+{% endmacro %} diff --git a/forum/templates/forum/main.jinja b/forum/templates/forum/main.jinja index 065007f8..c6199c16 100644 --- a/forum/templates/forum/main.jinja +++ b/forum/templates/forum/main.jinja @@ -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 @@

{% trans %}Forum{% endtrans %}

+ {{ display_search_bar() }}

{% trans %}View last unread messages{% endtrans %} {% trans %}Favorite topics{% endtrans %} @@ -21,10 +22,6 @@ {% trans %}New forum{% endtrans %}

{% endif %} -
{% trans %}Title{% endtrans %} diff --git a/forum/templates/forum/reply.jinja b/forum/templates/forum/reply.jinja index 3a4b49de..8cafbbba 100644 --- a/forum/templates/forum/reply.jinja +++ b/forum/templates/forum/reply.jinja @@ -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() }}

{% trans %}Forum{% endtrans %} {% for f in topic.forum.get_parent_list() %} diff --git a/forum/templates/forum/topic.jinja b/forum/templates/forum/topic.jinja index 918b9665..ba165b75 100644 --- a/forum/templates/forum/topic.jinja +++ b/forum/templates/forum/topic.jinja @@ -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 %}

+ {{ display_search_bar() }} {% trans %}Forum{% endtrans %} {% for f in topic.forum.get_parent_list()|reverse %} > {{ f }}