summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks/DataTables-content.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-10 13:08:48 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-12 09:50:56 +0100
commit061edbaac5a37b8e717391c3b7d804a96c041979 (patch)
tree79a9647f9e8563d44d08123dd4844a249001e63a /ishtar_common/templates/blocks/DataTables-content.html
parentac839d9481b863c93a9c0f92011118bb581f7c2d (diff)
downloadIshtar-061edbaac5a37b8e717391c3b7d804a96c041979.tar.bz2
Ishtar-061edbaac5a37b8e717391c3b7d804a96c041979.zip
Syndication - export external sources
Diffstat (limited to 'ishtar_common/templates/blocks/DataTables-content.html')
-rw-r--r--ishtar_common/templates/blocks/DataTables-content.html21
1 files changed, 12 insertions, 9 deletions
diff --git a/ishtar_common/templates/blocks/DataTables-content.html b/ishtar_common/templates/blocks/DataTables-content.html
index 029ebd84c..0665e7a4e 100644
--- a/ishtar_common/templates/blocks/DataTables-content.html
+++ b/ishtar_common/templates/blocks/DataTables-content.html
@@ -22,11 +22,11 @@
</div>
<div class="col">
<div class="btn-group btn-group-sm" role="group">
- <button id="export-{{name}}" type="button"
- class="btn btn-secondary dropdown-toggle table-export" data-toggle="dropdown"
- aria-haspopup="true" aria-expanded="false">
+ <button id="export-{{name}}" type="button"
+ class="btn btn-secondary dropdown-toggle table-export" data-toggle="dropdown"
+ aria-haspopup="true" aria-expanded="false">
{% trans 'Export'%}
- </button>
+ </button>
<div class="dropdown-menu" aria-labelledby="export-{{name}}">
{% if source_full or extra_sources %}
<a class="dropdown-item {{sname}}-csv" href='{{source}}csv' target='_blank'
@@ -40,7 +40,7 @@
{% endif %}
</div>
<div class="input-group-append">
- <div class="selected-lines input-group-text" id="btnGroupAddon">
+ <div class="selected-lines input-group-text">
<span class="sl-whole">{% trans "whole table" %}</span>
<span class="sl-selected"><span class="sl-number"></span>&nbsp;{% trans "selected item(s)" %}</span>
</div>
@@ -70,13 +70,13 @@
<input type="hidden" id="hidden_{{name}}" name="{{name}}"/>
- {% for source_id, source_label, source_url in external_sources %}
+ {% for source_id, source_label, source_url, columns, column_labels, export_urls in external_sources %}
<div id="grid_{{name}}_{{source_id}}_meta_wrapper" class="sources sources-{{source_id}}">
<table id='grid_{{name}}_{{source_id}}' class="display" width="100%">
<thead>
<tr>
<th></th>
- <th></th>{% for col in col_names %}
+ <th></th>{% for col in column_labels %}
<th>{{col}}</th>
{% endfor %}</tr>
</thead>
@@ -92,6 +92,7 @@
</button>
</div>
</div>
+ {% if export_urls %}
<div class="col">
<div class="btn-group btn-group-sm" role="group">
<button id="export-{{name}}-" type="button"
@@ -100,16 +101,18 @@
{% trans 'Export'%}
</button>
<div class="dropdown-menu" aria-labelledby="export-{{name}}">
- <a class="dropdown-item {{sname}}-csv" href="{{source}}csv" target="_blank" title="{% trans 'Export as CSV' %}">{% trans "CSV" %}</a>
+ {% for lbl_export, export_url in export_urls %}
+ <a class="dropdown-item {{sname}}-csv-external" href="{{export_url}}" target="_blank" title="{% trans 'Export as CSV - ' %}{{lbl_export}}">{{lbl_export}}</a>{% endfor %}
</div>
<div class="input-group-append">
- <div class="selected-lines input-group-text" id="btnGroupAddon">
+ <div class="selected-lines input-group-text">
<span class="sl-whole">{% trans "whole table" %}</span>
<span class="sl-selected"><span class="sl-number"></span>&nbsp;{% trans "selected item(s)" %}</span>
</div>
</div>
</div>
</div>
+ {% endif %}
</div>