Edit links view

This commit is contained in:
Mouse Reeve
2022-01-12 09:52:26 -08:00
parent 2ca41a0b11
commit ebc451fdd2
8 changed files with 100 additions and 11 deletions

View File

@ -10,8 +10,8 @@
</div>
{% if can_edit_book %}
<div class="column is-narrow">
{% url 'file-link' book.id as fallback_url %}
<button class="button is-small" type="button" data-modal-open="edit-links">
{% url 'file-link-add' book.id as fallback_url %}
<button class="button is-small" type="button" data-modal-open="add-links">
<span class="icon icon-plus">
<span class="is-sr-only">
{% trans "Add link to copy" %}
@ -39,8 +39,12 @@
<em>{% trans "No links available" %}</em>
{% endif %}
{% if can_edit_book %}
{% include 'book/file_link_modal.html' with book=book id="edit-links" %}
{% if can_edit_book and links.exists %}
<a href="{% url 'file-link' book.id %}" class="is-pulled-right">
<span class="icon icon-pencil" aria-hidden="true"></span>
<span>{% trans "Edit links" %}</span>
</a>
{% include 'book/file_link_modal.html' with book=book id="add-links" %}
{% endif %}
{% endif %}