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

47 lines
1.3 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">
<a href="{{ link.url }}" target="_blank" rel="nofollow noopener noreferrer">{{ link.url }}</a>
2022-01-10 22:55:10 +00:00
</td>
<td>
{% if link.added_by %}
2022-01-10 22:55:10 +00:00
<a href="{% url 'settings-user' link.added_by.id %}">@{{ link.added_by|username }}</a>
{% else %}
<em>{% trans "Unknown user" %}</em>
{% endif %}
2022-01-10 22:55:10 +00:00
</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>