aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Lepori <al@0hm.ch>2024-01-23 15:50:27 +0100
committerAndrea Lepori <al@0hm.ch>2024-01-23 15:50:27 +0100
commit7323669823045466a1b6a323c90a847bd8a07bea (patch)
tree807ded6788f9ea211a6aaca96c712b8ec69f36e2
parentshow hidden types with unarchived docs (diff)
downloadscout-subs-7323669823045466a1b6a323c90a847bd8a07bea.tar.gz
scout-subs-7323669823045466a1b6a323c90a847bd8a07bea.zip
doc list table download options
Diffstat (limited to '')
-rw-r--r--server/templates/server/doc_list_table.html6
-rw-r--r--server/views.py1
-rw-r--r--version.txt2
3 files changed, 8 insertions, 1 deletions
diff --git a/server/templates/server/doc_list_table.html b/server/templates/server/doc_list_table.html
index 860ffda..eb9c946 100644
--- a/server/templates/server/doc_list_table.html
+++ b/server/templates/server/doc_list_table.html
@@ -11,6 +11,8 @@
<div class="nav-wrapper {{color}}">
<ul>
<li><a href="#modal1" data-target="modal1" class="modal-trigger tooltipped" data-position="top" data-tooltip="Seleziona colonne"><i class="material-icons">view_column</i></a></li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Scarica tabella come Excel" Onclick='table.download("xlsx", "{{type_name}} - tabella.xlsx")'><i class="material-icons">table_view</i></a></li>
+ <li><a class="tooltipped" data-position="top" data-tooltip="Scarica tabella come PDF" Onclick='table.downloadToTab("pdf")'><i class="material-icons">picture_as_pdf</i></a></li>
</ul>
<ul class="right">
<li><a class="tooltipped" data-position="top" data-tooltip="Pulisci filtri" Onclick="send('clear')"><i class="material-icons">clear</i></a></li>
@@ -21,6 +23,10 @@
{% block script_import %}
<script src=" https://cdn.jsdelivr.net/npm/luxon@3.4.1/build/global/luxon.min.js "></script>
+<script src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script>
+<script src="https://unpkg.com/jspdf-autotable@latest/dist/jspdf.plugin.autotable.js"></script>
+<script src="https://cdn.sheetjs.com/xlsx-0.20.1/package/dist/xlsx.full.min.js"></script>
+
{% endblock %}
{% block content %}
diff --git a/server/views.py b/server/views.py
index c06046d..13eb6e4 100644
--- a/server/views.py
+++ b/server/views.py
@@ -1456,6 +1456,7 @@ def doclist_table(request, type_id):
'error': error,
'error_text': error_text,
'settings': settings,
+ 'type_name': doc_type.name,
'type_id': type_id,
'custom_keys': custom_keys,
}
diff --git a/version.txt b/version.txt
index d4f35c8..d9d6a47 100644
--- a/version.txt
+++ b/version.txt
@@ -1,2 +1,2 @@
version=0.7
-rev=12
+rev=13