X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/38343a3fc11f5509c8522fec94c0ae7085b7244f..cd69a086aa9ce06b83f277b24e2992238654c320:/project/templates/explorer/file_list.html diff --git a/project/templates/explorer/file_list.html b/project/templates/explorer/file_list.html index 7063d293..25136371 100644 --- a/project/templates/explorer/file_list.html +++ b/project/templates/explorer/file_list.html @@ -1,9 +1,43 @@ {% extends "base.html" %} {% block maincontent %} -<ul> -{% for blob in objects %} - <li><a href="{% url file_xml blob %}">{{ blob }}</a></li> -{% endfor %} -</ul> + +{% if perms.explorer.can_add_files %} +<h2>Dodaj nowy utwór</h2> + +<form action="{% url file_upload %}" method="POST" enctype="multipart/form-data"> + {{ bookform.as_p }} + <p><button type="submit">Dodaj ksiÄ Å¼kÄ</button></p> +</form> +{% endif %} + +<h2>Wszystkie utwory:</h2> +<table class="object-list" cellspacing="0"> + <tr><th>Lp.</th><th>Nazwa utworu</th><th>Wersje</th></tr> + <tr><td colspan="3" class="page-navigation"> + {% if files.has_previous %} + <span class="prev-page-marker"> + <a href="?page={{ files.previous_page_number }}">Poprzednia</a> + </span> + {% endif %} + + <span>Strona {{files.number}} z {{files.paginator.num_pages}}</span> + + {% if files.has_next %} + <span class="next-page-marker"> + <a href="?page={{ files.next_page_number }}">NastÄpna</a> + </span> + {% endif %} + </td> + </tr> + {% for file in files.object_list %} + <tr> + <td>{{forloop.counter0|add:files.start_index}}.</td> + <td><a href="{% url editor_view file %}">{{ file }}</a></td> + <td> </td> + </tr> + {% endfor %} +</table> + + {% endblock maincontent %}