X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/09444838209cb9fd08f799553889ff04a015e8ad..37e03d34aec3af64d322f0c76d49dba46ee29f92:/project/templates/explorer/file_list.html?ds=inline

diff --git a/project/templates/explorer/file_list.html b/project/templates/explorer/file_list.html
index bfbafe13..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 editor_view 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> &nbsp; </td>
+    </tr>
+    {% endfor %}
+</table>
+
+
 {% endblock maincontent %}