{% extends 'blog.html' %} {% load comment blog %} {% block title %}{% translate "Blog entities" %}{% endblock %} {% block sidebar %} {% if blog.manager or user.is_admin %}

{% translate "Show" %} {% translate "Published" %}, {% translate "Not published" %}

{% endif %} {% if blog %} {# selected blog #}

{% translate "Latest entities" %}

{% get_recent_entities for blog as recent_entities %} {% for recent_entity in recent_entities %}

{{ recent_entity.title }}

{% empty %}

{% translate "No entities" %}

{% endfor %}

{% translate "Latest entities" %} {% if blog.manager %} | {% translate "Create new blog entity" %} {% endif %}

{% else %} {# blog not selected #}

{% translate "Latest blogs" %}

{% get_recent_blogs as recent_blogs %}

{% for recent_blog in recent_blogs %} {{ recent_blog.name }}
{% endfor %}

{% translate "All blogs" %} {% if user %} | {% translate "Create new blog" %} {% endif %}

{% endif %} {% endblock %} {% block content %} {% for entity in entities %} {% get_comment_count for entity as comment_count %}

{{ entity.title }}

{{ entity.description|default:""|escape }}
{{ entity.changed|date:"j M Y" }} {% translate "from" %} {{ entity.author }} | {{ comment_count|default:"No"|translate }} {% translate "comments" %} {% if entity.tags %} | {% translate "Tags" %}: {% for tag in entity.tags %} {{ tag.name }} {% if forloop.last %}, {% endif %} {% endfor %}post {% endif %} {% if entity.manager %} | {% translate "Edit" %} | {% translate "Delete" %} {% endif %}
{% empty %} {% translate "No blog posts" %} {% endfor %} {% pagination entities %} {% endblock %}