moviewyrm/bookwyrm/templates/settings/link_domains/link_table.html

43 lines
1.2 KiB
HTML
Raw Normal View History

2022-01-10 22:55:10 +00:00
{% load i18n %}
{% load utilities %}
2022-01-12 17:52:26 +00:00
<table class="is-striped is-fullwidth">
2022-01-10 22:55:10 +00:00
<tr>
<th>{% trans "URL" %}</th>
<th>{% trans "Added by" %}</th>
<th>{% trans "Filetype" %}</th>
<th>{% trans "Book" %}</th>
{% block additional_headers %}{% endblock %}
</tr>
2022-01-12 17:52:26 +00:00
{% for link in links %}
2022-01-10 22:55:10 +00:00
<tr>
<td class="overflow-wrap-anywhere">
2022-01-17 19:25:41 +00:00
<a href="{{ link.url }}" target="_blank" rel="noopener noreferrer">{{ link.url }}</a>
2022-01-10 22:55:10 +00:00
</td>
<td>
<a href="{% url 'settings-user' link.added_by.id %}">@{{ link.added_by|username }}</a>
</td>
<td>
{% if link.filelink.filetype %}
{{ link.filelink.filetype }}
{% endif %}
</td>
<td>
2022-01-12 17:52:26 +00:00
{% if link.filelink.book %}
2022-01-10 22:55:10 +00:00
{% with book=link.filelink.book %}
2022-01-12 19:34:44 +00:00
{% include "snippets/book_titleby.html" with book=book %}
2022-01-10 22:55:10 +00:00
{% endwith %}
{% endif %}
</td>
2022-01-12 17:52:26 +00:00
2022-01-10 22:55:10 +00:00
{% block additional_data %}{% endblock %}
</tr>
{% endfor %}
2022-01-12 17:52:26 +00:00
{% if not links %}
<tr>
<td colspan="7"><em>{% trans "No links available for this domain." %}</em></td>
</tr>
{% endif %}
2022-01-10 22:55:10 +00:00
</table>