forked from mirrors/bookwyrm
Null state text for announcements view
This commit is contained in:
parent
0f31586ab6
commit
e24f2ea8c1
1 changed files with 40 additions and 34 deletions
|
@ -14,40 +14,46 @@
|
|||
{% include 'settings/announcement_form.html' with controls_text="create_announcement" %}
|
||||
</form>
|
||||
|
||||
<table class="table is-striped">
|
||||
<tr>
|
||||
<th>
|
||||
{% url 'settings-announcements' as url %}
|
||||
{% trans "Date added" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Preview" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Start date" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "End date" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="end_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Status" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %}
|
||||
</th>
|
||||
</tr>
|
||||
{% for announcement in announcements %}
|
||||
<tr>
|
||||
<td>{{ announcement.created_date|naturalday }}</td>
|
||||
<td><a href="{% url 'settings-announcements' announcement.id %}">{{ announcement.preview }}</a></td>
|
||||
<td>{{ announcement.start_date|naturaltime|default:'' }}</td>
|
||||
<td>{{ announcement.end_date|naturaltime|default:'' }}</td>
|
||||
<td>{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="block">
|
||||
<table class="table is-striped">
|
||||
<tr>
|
||||
<th>
|
||||
{% url 'settings-announcements' as url %}
|
||||
{% trans "Date added" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Preview" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Start date" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "End date" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="end_date" sort=sort text=text %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans "Status" as text %}
|
||||
{% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %}
|
||||
</th>
|
||||
</tr>
|
||||
{% for announcement in announcements %}
|
||||
<tr>
|
||||
<td>{{ announcement.created_date|naturalday }}</td>
|
||||
<td><a href="{% url 'settings-announcements' announcement.id %}">{{ announcement.preview }}</a></td>
|
||||
<td>{{ announcement.start_date|naturaltime|default:'' }}</td>
|
||||
<td>{{ announcement.end_date|naturaltime|default:'' }}</td>
|
||||
<td>{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if not announcements %}
|
||||
<p><em>{% trans "No announcements found." %}</em></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'snippets/pagination.html' with page=announcements path=request.path %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue