Modal to add link
This commit is contained in:
@ -147,7 +147,7 @@
|
||||
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="add_description" controls_uid=book.id focus="id_description" hide_active=True id="hide_description" %}
|
||||
|
||||
<div class="box is-hidden" id="add_description_{{ book.id }}">
|
||||
<form name="add-description" method="POST" action="/add-description/{{ book.id }}">
|
||||
<form name="add-description" method="POST" action="{% url "add-description" book.id %}">
|
||||
{% csrf_token %}
|
||||
<p class="fields is-grouped">
|
||||
<label class="label" for="id_description_{{ book.id }}">{% trans "Description:" %}</label>
|
||||
@ -345,6 +345,23 @@
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="content-block">
|
||||
<h2 class="title is-5">{% trans "Get a copy" %}</h2>
|
||||
{% if book.file_links %}
|
||||
<ul>
|
||||
{% for link in book.file_links.all %}
|
||||
<li><a href="{{ link.url }}">{{ link.name }}</a> ({{ link.filetype }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if can_edit_book %}
|
||||
{% trans "Add link to copy" as button_text %}
|
||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="edit_file_links" controls_uid=book.id focus="modal_title_edit_file_links" class="is-small" icon_with_text="plus" %}
|
||||
{% include 'book/file_links_modal.html' with book=book controls_text="edit_file_links" controls_uid=book.id %}
|
||||
{% endif %}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user