moviewyrm/bookwyrm/templates/settings/announcements/announcement.html

65 lines
2.4 KiB
HTML
Raw Normal View History

2021-09-08 21:05:08 +00:00
{% extends 'settings/layout.html' %}
2021-05-20 15:56:17 +00:00
{% load i18n %}{% load humanize %}
{% block title %}{% trans "Announcement" %} - {{ announcement.preview }}{% endblock %}
2021-05-20 15:56:17 +00:00
{% block header %}
{% trans "Announcement" %}
<a href="{% url 'settings-announcements' %}" class="has-text-weight-normal help">{% trans "Back to list" %}</a>
{% endblock %}
{% block edit-button %}
{% trans "Edit Announcement" as button_text %}
2021-05-20 19:08:12 +00:00
<div class="field has-addons">
<div class="control">
{% include 'snippets/toggle/open_button.html' with controls_text="edit_announcement" icon_with_text="pencil" text=button_text focus="edit_announcement_header" %}
2021-05-20 19:08:12 +00:00
</div>
<form class="control" action="{% url 'settings-announcements-delete' announcement.id %}" method="post">
{% csrf_token %}
<button type="submit" class="button is-danger">
2021-05-21 16:52:40 +00:00
<span class="icon icon-x m-0-mobile" aria-hidden="true"></span>
<span class="is-sr-only-mobile">{% trans "Delete" %}</span>
2021-05-20 19:08:12 +00:00
</button>
</form>
</div>
{% endblock %}
{% block panel %}
2021-05-20 15:56:17 +00:00
<form name="edit-announcement" method="post" action="{% url 'settings-announcements' announcement.id %}" class="block">
2021-09-28 19:26:55 +00:00
{% include 'settings/announcements/announcement_form.html' with controls_text="edit_announcement" %}
2021-05-20 15:56:17 +00:00
</form>
<div class="block content">
2021-05-20 15:56:17 +00:00
<dl>
<dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "Visible:" %}</dt>
<dd>
<span class="tag {% if announcement in active_announcements %}is-success{% else %}is-danger{% endif %}">
{% if announcement in active_announcements %}
{% trans "True" %}
{% else %}
{% trans "False" %}
{% endif %}
</span>
</dd>
2021-05-20 15:56:17 +00:00
{% if announcement.start_date %}
<dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "Start date:" %}</dt>
<dd>{{ announcement.start_date|naturalday }}</dd>
2021-05-20 15:56:17 +00:00
{% endif %}
{% if announcement.end_date %}
<dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "End date:" %}</dt>
<dd>{{ announcement.end_date|naturalday }}</dd>
2021-05-20 15:56:17 +00:00
{% endif %}
<dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "Active:" %}</dt>
<dd>{{ announcement.active }}</dd>
2021-05-20 15:56:17 +00:00
</dl>
<hr aria-hidden="true">
2021-05-20 18:46:24 +00:00
{% include 'snippets/announcement.html' with announcement=announcement pressed=True admin_mode=True %}
</div>
{% endblock %}