summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks/DataTables-content.html
blob: 41513aade8564c256d9da182922bc58621b53740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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}}"/>