{% extends "layout.html" %} {% comment %} Oh yeah, I know, this template code is horrible, and actually there are three templates in one (news page for: project, language and translation project). In the future we have to take a different approach for this. {% endcomment %} {% load i18n cleanhtml assets %} {% get_current_language as LANGUAGE_CODE %} {% block title %} {% trans "News" %} | {% if directory.is_language %} {{ directory.language.name }} {% elif directory.is_project %} {{ directory.project.fullname }} | {% trans "Projects" %} {% else %} {{ directory.translation_project.project.fullname }} | {{ directory.translation_project.language.fullname }} {% endif %} | {{ block.super }} {% endblock %} {% block extra_head %} {% endblock %} {% block breadcrumbs %} {% if directory.is_language %} {% include 'core/_breadcrumbs.html' with nav='languages/_nav.html' %} {% elif directory.is_project %} {% include 'core/_breadcrumbs.html' with nav='projects/_nav.html' %} {% else %} {% include 'core/_breadcrumbs.html' with nav='translation_projects/_nav.html' %} {% endif %} {% endblock %} {% block content %}
{% if form %}

{% trans "Publish News" %}

{% if notices_published %}

{% trans "Successfully published the following news" %}

{% for np in notices_published %}

{{ np }}

{% endfor %}

{% endif %}
{% csrf_token %} {{ form.as_p }}

{% endif %}

{% trans "Latest News" %}

{% for notice in notices %}
{{ notice.get_date }}
{{ notice.message|safe|linebreaks|clean }}
{% empty %}

{% trans "No news yet." %}

{% endfor %}
{% endblock %} {% block scripts_extra %} {% if user.is_superuser or request.permissions.administrate %} {% assets "js_admin" %} {% endassets %} {% endif %} {% endblock %}