diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py index b6197f33..25b72a11 100644 --- a/bookwyrm/forms.py +++ b/bookwyrm/forms.py @@ -269,6 +269,12 @@ class SiteForm(CustomForm): exclude = [] +class AnnouncementForm(CustomForm): + class Meta: + model = models.Announcement + exclude = ["remote_id"] + + class ListForm(CustomForm): class Meta: model = models.List diff --git a/bookwyrm/templates/settings/admin_layout.html b/bookwyrm/templates/settings/admin_layout.html index 4f71a228..635e8607 100644 --- a/bookwyrm/templates/settings/admin_layout.html +++ b/bookwyrm/templates/settings/admin_layout.html @@ -43,6 +43,10 @@ {% if perms.bookwyrm.edit_instance_settings %}
+ {% trans "Name" as text %} + {% include 'snippets/table-sort-header.html' with field="name" 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.name }} | +{{ announcement.start_date|naturaltime|default:'' }} | +{{ announcement.end_date|naturaltime|default:'' }} | +{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %} | +