This repository was archived by the owner on May 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
inyoka_theme_default/templates Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 8686 {% set rendered_pagination = macros.render_pagination(pagination) %}
8787
8888 < h1 > {{ topic.title|e }}</ h1 >
89+
90+ {% if discussions %}
91+ {% macro render_article_list(discussions) %}
92+ {% for article in discussions %}
93+ < a class ="article_discussion_list " href ="{{ article|url }} "> {{ article.name|e }}</ a >
94+ {% if not loop.last %},{% endif %}
95+ {% endfor %}
96+ {% endmacro %}
97+
98+ {% call macros.render_message('info') %}
99+ {% trans count=discussions|count, article_list=render_article_list(discussions) %}
100+ This topic is the discussion of the article {{ article_list }}.
101+ {% pluralize %}
102+ This topic is the discussion of the articles {{ article_list }}.
103+ {% endtrans %}
104+ {% endcall %}
105+ {% endif %}
106+
89107 {{ rendered_pagination }}
90108 {% for post in posts %}
91109 < div class ="forum-post {% if post.hidden %}forum-post-muted{% endif %} " id ="post-{{ post.id }} ">
Original file line number Diff line number Diff line change @@ -243,10 +243,16 @@ <h1>{% trans %}Staff{% endtrans %}</h1>
243243{% endmacro %}
244244
245245{% macro render_message(type, content) %}
246+ {# instead of passing the content via the parameter, a caller can be used #}
246247 < div class ="message-{{ type }} " role ="alert ">
247248 < button type ="button " class ="close " data-dismiss ="alert " aria-label ="Close ">
248249 < span aria-hidden ="true "> ×</ span >
249250 </ button >
251+
252+ {% if caller %}
253+ {{ caller() }}
254+ {% endif %}
255+
250256 {{ content }}
251257 </ div >
252258{% endmacro %}
You can’t perform that action at this time.
0 commit comments