From 2ae7f2685d2450d2a807b9e88b16df549fac9ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Fri, 2 Jan 2026 19:12:00 +0100 Subject: [PATCH] Make documents UI modular --- ram/portal/templates/bookshelf/book.html | 17 +-------- ram/portal/templates/includes/documents.html | 26 ++++++++++++++ ram/portal/templates/rollingstock.html | 38 ++------------------ 3 files changed, 29 insertions(+), 52 deletions(-) create mode 100644 ram/portal/templates/includes/documents.html diff --git a/ram/portal/templates/bookshelf/book.html b/ram/portal/templates/bookshelf/book.html index a67fd08..4e14488 100644 --- a/ram/portal/templates/bookshelf/book.html +++ b/ram/portal/templates/bookshelf/book.html @@ -216,22 +216,7 @@
diff --git a/ram/portal/templates/includes/documents.html b/ram/portal/templates/includes/documents.html new file mode 100644 index 0000000..755e88f --- /dev/null +++ b/ram/portal/templates/includes/documents.html @@ -0,0 +1,26 @@ + {% if documents %} + + + + + + + + {% for d in documents.all %} + + + + + + {% endfor %} + +
{{ header|default:"Documents" }}
{{ d.description }} + {% if d.private %} + + {% else %} + + {% endif %} + {{ d.filename }} + {{ d.file.size | filesizeformat }}
+ {% endif %} + diff --git a/ram/portal/templates/rollingstock.html b/ram/portal/templates/rollingstock.html index 6cb0eef..65e5654 100644 --- a/ram/portal/templates/rollingstock.html +++ b/ram/portal/templates/rollingstock.html @@ -403,42 +403,8 @@