# HG changeset patch # User Goffi # Date 1498328832 -7200 # Node ID 69a2e3bf5e1744f7c21216fbc4ef3629e483fcb0 # Parent 494d740aa3d6416847d64e7729f6aaca60121859 blog/item: if item is not in same language as current locale, item is hidden but will be shown on click. diff -r 494d740aa3d6 -r 69a2e3bf5e17 default/blog/item.html --- a/default/blog/item.html Sat Jun 24 20:25:39 2017 +0200 +++ b/default/blog/item.html Sat Jun 24 20:27:12 2017 +0200 @@ -1,5 +1,15 @@ {% block item %} -
+ +{% if item.language and locale and locale != item.language %} + {# we may display items in different language in a specific way #} + {% set other_lang = " other_lang" %} +{% endif %} + +
+ {% if other_lang is defined %} +

{% trans language=locale.language_name %}This message is not in {{language}}, click to display anyway{% endtrans %}

+ {% endif %} +
{% block header %}
{% block blog_title %}{{ item.title_xhtml or item.title or '' }}{% endblock %}
@@ -24,5 +34,7 @@ {% trans %}Click to to expand…{% endtrans %}

+
+ {% endblock item %} diff -r 494d740aa3d6 -r 69a2e3bf5e17 default/static/blog.css --- a/default/static/blog.css Sat Jun 24 20:25:39 2017 +0200 +++ b/default/static/blog.css Sat Jun 24 20:27:12 2017 +0200 @@ -75,6 +75,31 @@ display: initial; } +article.other_lang>div.info { + display: none; +} + +article.other_lang.init>* { + display: none; +} + +article.other_lang.init>div.info { + display: initial; +} + +article.other_lang.init>div.info>p { + margin: 0; + padding: 0.2em; + text-align: center; + font-style: italic; +} + +article.other_lang.init { + border: none; + border-radius: 0; + padding: 0; +} + /**** comments ****/ button.comments_btn {