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" %}
|
{% include 'settings/announcement_form.html' with controls_text="create_announcement" %}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table class="table is-striped">
|
<div class="block">
|
||||||
<tr>
|
<table class="table is-striped">
|
||||||
<th>
|
<tr>
|
||||||
{% url 'settings-announcements' as url %}
|
<th>
|
||||||
{% trans "Date added" as text %}
|
{% url 'settings-announcements' as url %}
|
||||||
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
{% trans "Date added" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
||||||
<th>
|
</th>
|
||||||
{% trans "Preview" as text %}
|
<th>
|
||||||
{% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %}
|
{% trans "Preview" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %}
|
||||||
<th>
|
</th>
|
||||||
{% trans "Start date" as text %}
|
<th>
|
||||||
{% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %}
|
{% trans "Start date" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="start_date" sort=sort text=text %}
|
||||||
<th>
|
</th>
|
||||||
{% trans "End date" as text %}
|
<th>
|
||||||
{% include 'snippets/table-sort-header.html' with field="end_date" sort=sort text=text %}
|
{% trans "End date" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="end_date" sort=sort text=text %}
|
||||||
<th>
|
</th>
|
||||||
{% trans "Status" as text %}
|
<th>
|
||||||
{% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %}
|
{% trans "Status" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="active" sort=sort text=text %}
|
||||||
</tr>
|
</th>
|
||||||
{% for announcement in announcements %}
|
</tr>
|
||||||
<tr>
|
{% for announcement in announcements %}
|
||||||
<td>{{ announcement.created_date|naturalday }}</td>
|
<tr>
|
||||||
<td><a href="{% url 'settings-announcements' announcement.id %}">{{ announcement.preview }}</a></td>
|
<td>{{ announcement.created_date|naturalday }}</td>
|
||||||
<td>{{ announcement.start_date|naturaltime|default:'' }}</td>
|
<td><a href="{% url 'settings-announcements' announcement.id %}">{{ announcement.preview }}</a></td>
|
||||||
<td>{{ announcement.end_date|naturaltime|default:'' }}</td>
|
<td>{{ announcement.start_date|naturaltime|default:'' }}</td>
|
||||||
<td>{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}</td>
|
<td>{{ announcement.end_date|naturaltime|default:'' }}</td>
|
||||||
</tr>
|
<td>{% if announcement.active %}{% trans "active" %}{% else %}{% trans "inactive" %}{% endif %}</td>
|
||||||
{% endfor %}
|
</tr>
|
||||||
</table>
|
{% 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 %}
|
{% include 'snippets/pagination.html' with page=announcements path=request.path %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue