{% extends "base.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 url from future %} {% load i18n cleanhtml assets cache common_tags %} {% get_current_language as LANGUAGE_CODE %} {% block title %} {% trans "News" %} | {% if directory.is_language %} {{ directory.language.name }} {% else %} {% if directory.is_project %} {{ directory.project.fullname }} | {% trans "Projects" %} {% else %} {{ directory.translation_project.project.fullname }} | {{ directory.translation_project.language.fullname }} {% endif %} {% endif %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {{ block.super }}{% include 'common/_breadcrumbs.html' %} {% endblock %} {% block extra_head %} {% endblock %} {% block body_id %}{% if directory.is_language %}languagenews{% else %}tpnews{% endif %}{% endblock %} {% block tabs %} {% if directory.is_language %} {% include "language_menu.html" %} {% else %} {% if directory.is_project %} {% include "project_menu.html" %} {% else %} {% include "tp_menu.html" %} {% endif %} {% 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 %}