Add download button for each file

- This commit also introduces some CSS to place the buttons/forms next
to each other
This commit is contained in:
Fabian Würfl
2018-05-20 17:02:41 +02:00
parent f3813777b7
commit de96175c18
2 changed files with 34 additions and 2 deletions

View File

@ -14,8 +14,17 @@
{%- set files = music_library.get_files(subdirpath) %}
{%- if files %}
{% for file in files %}
<!--<li>{{ file }}</li>-->
<li><form method="post"><input type="text" value="{{ subdirpath }}/{{ file }}" name="add_file" hidden><input type="submit" value="Add">&nbsp;&nbsp;{{ file }}</form></li>
<li class="file">
<form method="post" class="file file_add">
<input type="text" value="{{ subdirpath }}/{{ file }}" name="add_file" hidden>
<input type="submit" value="Add">
</form>
<form action="./download" method="get" class="file file_download">
<input type="text" value="{{ subdirpath }}/{{ file }}" name="file" hidden>
<input type="submit" value="Download">
&nbsp;{{ file }}
</form>
</li>
{% endfor %}
{%- endif %}
</ul>