pinax/announcements/announcement_list.html

{% extends "pinax/announcements/base.html" %}

{% load i18n %}

{% block head_title %}{% trans "Announcements Admin" %}{% endblock %}

{% block body %}
    <h2 class="with-actions">
        {% trans "Announcements" %}
        <a class="button" href="{% url "pinax_announcements:announcement_create" %}">
            {% trans "Add New Announcement" %}
        </a>
    </h2>

    {% for announcement in announcement_list %}
        <div class="announcement">
            <div class="announcement-body">
                <div class="announcement-title">{{ announcement.title }}</div>
                {{ announcement.content }}
            </div>
            <div class="announcement-meta">
                <div class="announcment-date">
                    {% if announcement.publish_start or announcement.publish_end %}
                        <small>Published from <em>{{ announcement.publish_start|date:"F j, Y" }}</em> to
                        <em>{{ announcement.publish_end|date:"F j, Y" }}</em></small>
                    {% endif %}
                </div>
                <div class="announcement-actions">
                    <a href="{% url "pinax_announcements:announcement_update" pk=announcement.pk %}" class="announcement-edit-link">
                        <i class="fas fa-pencil-alt"></i>
                        {% trans "Edit" %}
                    </a>
                </div>
            </div>
        </div>
    {% endfor %}
{% endblock %}