{# display a blog item which can be expanded/retracted by clicking on it if the locale differs from item language, it will be totally reduced, and will need a click to be displayed @variable item(data_object.BlogItem): item to display @variable identities(data_object.Identities): identities which can be used to display info on item author @variable dates_format(unicode): format of the date to use (see date_fmt filter) #} {% block item %} {% set item_level = (item_level or 0) + 1 %} {% if item.language and locale and locale.language != item.language %} {# we may display items in different language in a specific way #} {% set other_lang = " other_lang" if expanded else " other_lang state_init" %} {% endif %}
{% if identities is defined %} {% if avatar is defined %}
{{ avatar.avatar(item.author_jid) }}
{% endif %} {% endif %}
{% set title = item.title_xhtml or item.title%} {% if title %}

{{title}}

{% endif %}

{% set published = item.published|date_fmt(fmt=dates_format) %} {{item.author}} {{published}} {% if item.tags %} {% if tags_http_uri is defined %} {% for tag in item.tags %} {{tag}} {% endfor %} {% else %} {% for tag in item.tags %} {{tag}} {% endfor %} {% endif %} {% endif %}

{{- item.content_xhtml or item.content|urlize or '' -}}

{% for comments_items in item.comments_items_list %} {% for item in comments_items %} {% include 'blog/item.html' %} {% endfor %} {% if allow_commenting and item_level == 1 %}
{{- textbox.comment(service=comments_items.service, node=comments_items.node) -}}
{% endif %} {% endfor %}
{% endblock item %}