2021-05-20 15:09:35 +00:00
|
|
|
{% load humanize %}{% load i18n %}{% load utilities %}
|
|
|
|
{% with announcement.id|uuid as uuid %}
|
2021-05-20 19:08:12 +00:00
|
|
|
<aside
|
2022-03-01 19:06:15 +00:00
|
|
|
class="notification mb-1 p-3{% if not admin_mode %} is-hidden{% endif %} transition-y {% if announcement.display_type %}has-background-{{ announcement.display_type }}{% endif %}"
|
2021-08-09 01:40:47 +00:00
|
|
|
{% if not admin_mode %}data-hide="hide_announcement_{{ announcement.id }}"{% endif %}
|
2021-05-20 19:08:12 +00:00
|
|
|
>
|
2022-02-11 18:50:55 +00:00
|
|
|
<details>
|
|
|
|
<summary>
|
2021-05-20 15:09:35 +00:00
|
|
|
{% if announcement.event_date %}
|
|
|
|
<strong>{{ announcement.event_date|naturalday|title }}:</strong>
|
|
|
|
{% endif %}
|
2022-02-11 18:50:55 +00:00
|
|
|
|
2022-02-11 18:36:08 +00:00
|
|
|
{{ announcement.preview|safe }}
|
2022-02-11 18:50:55 +00:00
|
|
|
|
|
|
|
{% if announcement.content %}
|
|
|
|
<span class="details-close mt-4 mr-4 icon icon-x is-small" aria-hidden></span>
|
|
|
|
{% endif %}
|
|
|
|
</summary>
|
2021-05-20 19:36:42 +00:00
|
|
|
{% if announcement.content %}
|
2022-02-11 18:50:55 +00:00
|
|
|
<div class="mb-2 mt-2" id="announcement_{{ uuid }}">
|
|
|
|
<div class="box is-shadowless mb-0">
|
|
|
|
{{ announcement.content|safe }}
|
|
|
|
</div>
|
2021-05-20 15:09:35 +00:00
|
|
|
</div>
|
2021-05-20 19:36:42 +00:00
|
|
|
{% endif %}
|
2022-02-11 18:50:55 +00:00
|
|
|
</details>
|
2021-05-20 18:46:24 +00:00
|
|
|
<div class="is-flex mt-0 help">
|
|
|
|
<p>{% blocktrans with user_path=announcement.user.local_path username=announcement.user.display_name %}Posted by <a href="{{ user_path }}">{{ username }}</a>{% endblocktrans %}</p>
|
|
|
|
{% if not admin_mode %}
|
|
|
|
<span class="mr-2 ml-2" aria-hidden="true">·</span>
|
2021-08-09 01:40:47 +00:00
|
|
|
<a class="set-display" data-id="hide_announcement_{{ announcement.id }}" data-value="true">{% trans "Dismiss message" %}</a>
|
2021-05-20 18:46:24 +00:00
|
|
|
{% endif %}
|
2021-05-20 15:09:35 +00:00
|
|
|
</div>
|
|
|
|
</aside>
|
|
|
|
{% endwith %}
|