From e24f2ea8c19db7836488cccbc8d49ecf1a177097 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 12 Sep 2021 10:14:56 -0700 Subject: [PATCH] Null state text for announcements view --- .../templates/settings/announcements.html | 74 ++++++++++--------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/bookwyrm/templates/settings/announcements.html b/bookwyrm/templates/settings/announcements.html index aba41247..2c57ae78 100644 --- a/bookwyrm/templates/settings/announcements.html +++ b/bookwyrm/templates/settings/announcements.html @@ -14,40 +14,46 @@ {% include 'settings/announcement_form.html' with controls_text="create_announcement" %} - - - - - - - - - {% for announcement in announcements %} - - - - - - - - {% endfor %} -
- {% url 'settings-announcements' as url %} - {% trans "Date added" as text %} - {% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %} - - {% trans "Preview" as text %} - {% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %} - - {% trans "Start date" as text %} - {% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %} - - {% trans "End date" as text %} - {% include 'snippets/table-sort-header.html' with field="end_date" sort=sort text=text %} - - {% trans "Status" as text %} - {% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %} -
{{ announcement.created_date|naturalday }}{{ announcement.preview }}{{ announcement.start_date|naturaltime|default:'' }}{{ announcement.end_date|naturaltime|default:'' }}{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}
+
+ + + + + + + + + {% for announcement in announcements %} + + + + + + + + {% endfor %} +
+ {% url 'settings-announcements' as url %} + {% trans "Date added" as text %} + {% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %} + + {% trans "Preview" as text %} + {% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %} + + {% trans "Start date" as text %} + {% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %} + + {% trans "End date" as text %} + {% include 'snippets/table-sort-header.html' with field="end_date" sort=sort text=text %} + + {% trans "Status" as text %} + {% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %} +
{{ announcement.created_date|naturalday }}{{ announcement.preview }}{{ announcement.start_date|naturaltime|default:'' }}{{ announcement.end_date|naturaltime|default:'' }}{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}
+ + {% if not announcements %} +

{% trans "No announcements found." %}

+ {% endif %} +
{% include 'snippets/pagination.html' with page=announcements path=request.path %} {% endblock %}