diff options
Diffstat (limited to 'ishtar_common/templates/blocks/DataTables-content.html')
-rw-r--r-- | ishtar_common/templates/blocks/DataTables-content.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ishtar_common/templates/blocks/DataTables-content.html b/ishtar_common/templates/blocks/DataTables-content.html new file mode 100644 index 000000000..41513aade --- /dev/null +++ b/ishtar_common/templates/blocks/DataTables-content.html @@ -0,0 +1,45 @@ +{% load i18n %} + <div id="grid_{{name}}_meta_wrapper"> + <table id='grid_{{name}}' class="display" width="100%"> + <thead> + <tr> + <th></th> + <th></th>{% for col in col_names %} + <th>{{col}}</th> + {% endfor %}</tr> + </thead> + </table> + </div> + + <div id='foot_{{name}}' class="gridfooter row toolbar"> + <div class='col-md-2'> + <div class="btn-group btn-group-sm" role="group"> + <button type='button' class="btn btn-secondary" data-toggle="modal" + data-target="#modal_grid_{{name}}"> + {% trans "Expand table" %} <i class="fa fa-expand" aria-hidden="true"></i> + </button> + </div> + </div> + <div class='col-md-2'> + <div class="btn-group btn-group-sm" role="group" + aria-label="{% trans 'Export'%}"> + {% if source_full or extra_sources %} + <a class="btn btn-secondary" href='{{source}}csv' target='_blank' + title="{% trans 'Export as CSV - ' %}{% trans 'simple'%}">{% trans "Simple CSV" %}</a> + {% if source_full %}<a class='btn btn-secondary' href='{{source_full}}csv' target='_blank' title="{% trans 'Export as CSV - full' %}">{% trans "CSV full" %}</a>{% endif %} + {% for slug, name, extra_source in extra_sources %} + <a class="btn btn-secondary" href='{{extra_source}}csv' target='_blank' title="{% trans 'Export as CSV - ' %}{{name}}">{{name}}</a> + {% endfor %} + {% else %} + <a class="btn btn-secondary" href="{{source}}csv" target="_blank" title="{% trans 'Export as CSV' %}">{% trans "CSV" %}</a> + {% endif %} + </div> + </div> + </div> + + {% if multiple %} + <input type="button" id="add_button_{{name}}" value="{% trans 'Add' %}"/> + <ul id="selectmulti_{{name}}" class="selectmulti"></ul> + {% endif %} + + <input type="hidden" id="hidden_{{name}}" name="{{name}}"/> |