view default/blog/item.html @ 32:16818343fc43

blog/item: use date_days instead of blog_date + fr translation
author Goffi <goffi@goffi.org>
date Sat, 24 Jun 2017 21:50:24 +0200
parents 69a2e3bf5e17
children 5fd910d48192
line wrap: on
line source

{% 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 %}

<article id="{{ item.id }}" class="init box{{other_lang}}" onclick="clicked_cls(this)">
    {% if other_lang is defined %}
        <div class="info"><p>{% trans language=locale.language_name %}This message is not in {{language}}, click to display anyway{% endtrans %}</p></div>
    {% endif %}

    <header>
        {% block header %}
        <div class="title">{% block blog_title %}{{ item.title_xhtml or item.title or '' }}{% endblock %}</div>
            {% block metadata %}
            <div class="metadata">
            <span class="author">{{identities[item.author_jid].nick | default(item.author)}}</span>
            <span class="blog_data">{% trans days=item.published|date_days %}{{days}} days ago{% endtrans %}</span>
            </div>

            {% endblock metadata %}
        {% endblock header %}
    </header>

    <div class="content">
        {% block content %}
        {{ item.content_xhtml or item.content or ''}}
        {% endblock content %}
    </div>

    <div class="expand_box">
        <p>
            {% trans %}Click to to expand…{% endtrans %}
        </p>
    </div>

</article>

{% endblock item %}