forum: use generic macro to display breadcrumb and display it on search result

This commit is contained in:
2018-12-13 14:07:22 +01:00
committed by Skia
parent 84811af9f1
commit af3e2fb951
4 changed files with 21 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% from 'forum/macros.jinja' import display_message, display_search_bar %}
{% from 'forum/macros.jinja' import display_message, display_breadcrumb, display_search_bar %}
{% block title %}
{{ topic }}
@@ -26,16 +26,8 @@
{% endblock %}
{% block content %}
<p>
{{ display_search_bar(request) }}
<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>
{% endfor %}
> <a href="{{ topic.forum.get_absolute_url() }}">{{ topic.forum }}</a>
> <a href="{{ topic.get_absolute_url() }}">{{ topic }}</a>
</p>
<h3>{{ topic.title }}</h3>
{{ display_breadcrumb(topic.forum, topic) }}
<h3>{{ topic.title }}</h3>
<div id="forum">
<p>{{ topic.description }}</p>
<p>
@@ -47,6 +39,7 @@
{% endif %}
</p>
{{ display_search_bar(request) }}
<p style="text-align: right; background: #d8e7f3;">
{% for p in msgs.paginator.page_range %}
<span class="ib" style="background: {% if p == msgs.number %}white{% endif %}; margin: 0;"><a href="?page={{ p }}">{{ p }}</a></span>