diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-01-13 12:49:00 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-01-13 12:49:00 +0100 |
commit | 05cd92e825d10d4c3fe7b9d12bbb8107fc51aed7 (patch) | |
tree | 0d5464c232fa4c3c8ffa53c819a05d1de508afc0 /ishtar_common | |
parent | 31b24f83fa30758b5a111297072945a3bde4a7eb (diff) | |
download | Ishtar-05cd92e825d10d4c3fe7b9d12bbb8107fc51aed7.tar.bz2 Ishtar-05cd92e825d10d4c3fe7b9d12bbb8107fc51aed7.zip |
Syndication table: select/deselect all
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/admin.py | 4 | ||||
-rw-r--r-- | ishtar_common/templates/blocks/DataTables.html | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py index dc4fbbf90..780a65496 100644 --- a/ishtar_common/admin.py +++ b/ishtar_common/admin.py @@ -2446,7 +2446,9 @@ def update_types_from_source(modeladmin, request, queryset): return HttpResponseRedirect(return_url) -update_types_from_source.short_description = _("Update types from source") +update_types_from_source.short_description = _( + "Update table, export format and types from source" +) def generate_match_document(modeladmin, request, queryset): diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html index 19ffd948e..681c91d7d 100644 --- a/ishtar_common/templates/blocks/DataTables.html +++ b/ishtar_common/templates/blocks/DataTables.html @@ -385,7 +385,23 @@ jQuery(document).ready(function(){ "select": { "style": 'multi' }, + {% if export_urls %} + "buttons": [ + { + extend: 'selectAll', + text: '<i class="fa fa-check-circle-o"></i>', + titleAttr: "{% trans 'Select all items' %}" + }, + { + extend: 'selectNone', + text: '<i class="fa fa-times"></i>', + titleAttr: "{% trans 'Deselect' %}" + } + ], + "dom": 'liBtp', + {% else %} "dom": 'litp', + {% endif %} "columns": [ { "data": "id", "visible": false }, { "data": "link", "orderable": false },{% for col in columns %} |