Mercurial > libervia-templates
annotate 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 |
rev | line source |
---|---|
0 | 1 {% block item %} |
30
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
2 |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
3 {% if item.language and locale and locale != item.language %} |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
4 {# we may display items in different language in a specific way #} |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
5 {% set other_lang = " other_lang" %} |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
6 {% endif %} |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
7 |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
8 <article id="{{ item.id }}" class="init box{{other_lang}}" onclick="clicked_cls(this)"> |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
9 {% if other_lang is defined %} |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
10 <div class="info"><p>{% trans language=locale.language_name %}This message is not in {{language}}, click to display anyway{% endtrans %}</p></div> |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
11 {% endif %} |
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
12 |
0 | 13 <header> |
14 {% block header %} | |
15 <div class="title">{% block blog_title %}{{ item.title_xhtml or item.title or '' }}{% endblock %}</div> | |
16
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
16 {% block metadata %} |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
17 <div class="metadata"> |
24
2496887339f6
defaut (blog/item): use new identities object for author field
Goffi <goffi@goffi.org>
parents:
20
diff
changeset
|
18 <span class="author">{{identities[item.author_jid].nick | default(item.author)}}</span> |
16
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
19 <span class="blog_data">{{item.published | blog_date}}</span> |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
20 </div> |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
21 |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
22 {% endblock metadata %} |
0 | 23 {% endblock header %} |
24 </header> | |
25 | |
26 <div class="content"> | |
27 {% block content %} | |
28 {{ item.content_xhtml or item.content or ''}} | |
29 {% endblock content %} | |
30 </div> | |
16
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
31 |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
32 <div class="expand_box"> |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
33 <p> |
20 | 34 {% trans %}Click to to expand…{% endtrans %} |
16
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
35 </p> |
8cdcbe0d7dee
blog: various appareance improvments:
Goffi <goffi@goffi.org>
parents:
0
diff
changeset
|
36 </div> |
30
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
37 |
0 | 38 </article> |
30
69a2e3bf5e17
blog/item: if item is not in same language as current locale, item is hidden but will be shown on click.
Goffi <goffi@goffi.org>
parents:
24
diff
changeset
|
39 |
0 | 40 {% endblock item %} |