comparison default/blog/item.html @ 30:69a2e3bf5e17

blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
author Goffi <goffi@goffi.org>
date Sat, 24 Jun 2017 20:27:12 +0200
parents 2496887339f6
children 16818343fc43
comparison
equal deleted inserted replaced
29:494d740aa3d6 30:69a2e3bf5e17
1 {% block item %} 1 {% block item %}
2 <article id="{{ item.id }}" class="box" onclick="this.classList.toggle('clicked')"> 2
3 {% if item.language and locale and locale != item.language %}
4 {# we may display items in different language in a specific way #}
5 {% set other_lang = " other_lang" %}
6 {% endif %}
7
8 <article id="{{ item.id }}" class="init box{{other_lang}}" onclick="clicked_cls(this)">
9 {% if other_lang is defined %}
10 <div class="info"><p>{% trans language=locale.language_name %}This message is not in {{language}}, click to display anyway{% endtrans %}</p></div>
11 {% endif %}
12
3 <header> 13 <header>
4 {% block header %} 14 {% block header %}
5 <div class="title">{% block blog_title %}{{ item.title_xhtml or item.title or '' }}{% endblock %}</div> 15 <div class="title">{% block blog_title %}{{ item.title_xhtml or item.title or '' }}{% endblock %}</div>
6 {% block metadata %} 16 {% block metadata %}
7 <div class="metadata"> 17 <div class="metadata">
22 <div class="expand_box"> 32 <div class="expand_box">
23 <p> 33 <p>
24 {% trans %}Click to to expand…{% endtrans %} 34 {% trans %}Click to to expand…{% endtrans %}
25 </p> 35 </p>
26 </div> 36 </div>
37
27 </article> 38 </article>
39
28 {% endblock item %} 40 {% endblock item %}