This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
corbo/corbo/templates/corbo/announce_view.html

53 lines
1.6 KiB
HTML

{% extends "corbo/announce_list.html" %}
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href='{% url "view_category" slug=object.category.slug %}'>{{ object.category }}</a>
{% endblock %}
{% block appbar %}
<h2>{{ object.title }}</h2>
<a href="{% url 'delete_announce' pk=object.pk %}" rel="popup">{% trans 'Delete' %}</a>
<a href="{% url 'edit_announce' pk=object.pk %}">{% trans 'Edit' %}</a>
<a href="{% url 'email_announce' pk=object.pk %}" rel="popup">{% trans 'Send test email' %}</a>
{% if sms_enabled %}
<a href="{% url 'sms_announce' pk=object.pk %}" rel="popup">{% trans 'Send test SMS' %}</a>
{% endif %}
{% endblock %}
{% block content %}
<div class="announce_block">
<div class="announce_preview">
{{ object.text|safe }}
</div>
{% if object.publication_time or object.expiration_time or broadcasts %}
<div class="announce_dashboard">
{% if object.publication_time %}
<p>
<strong>{% trans "Publication" %}</strong> {{ announce.publication_time|date:'DATETIME_FORMAT' }}
</p>
{% endif %}
{% if object.expiration_time %}
<p>
<strong>{% trans "Expiration" %}</strong> {{ announce.expiration_time|date:'DATETIME_FORMAT' }}
</p>
{% endif %}
{% if broadcasts %}
{% for broadcast in broadcasts %}
<p>
<strong>{% trans "Sent" %}</strong> {{ broadcast.deliver_time|date:'DATETIME_FORMAT' }}
{% blocktrans count delivers=broadcast.delivery_count %}
to {{ delivers }} destination
{% plural %}
to {{ delivers }} destinations
{% endblocktrans %}
</p>
{% endfor %}
{% endif %}
</div>
{% endif %}
</div>
{% endblock %}