blob: 832b60d22ac7781ed06eed751a17f84e75cee15b (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
{% load i18n %}
<div id="grid_{{name}}_meta_wrapper" class="sources sources-default">
<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="sources sources-default gridfooter row toolbar">
<div class='col col-sm-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">
<div class="btn-group btn-group-sm" role="group">
<button id="export-{{name}}" type="button"
class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{% trans 'Export'%}
</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'
title="{% trans 'Export as CSV - ' %}{% trans 'simple'%}">{% trans "Simple CSV" %}</a>
{% if source_full %}<a class='dropdown-item {{sname}}-csv-full' 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="dropdown-item {{slug}}-csv-full" href='{{extra_source}}csv' target='_blank' title="{% trans 'Export as CSV - ' %}{{name}}">{{name}}</a>
{% endfor %}
{% else %}
<a class="dropdown-item {{sname}}-csv" href="{{source}}csv" target="_blank" title="{% trans 'Export as CSV' %}">{% trans "CSV" %}</a>
{% endif %}
</div>
</div>
{% if current_model.has_label_templates %}<div class="btn-group btn-group-sm" role="group">
<button id="export-labels-{{name}}" type="button"
class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{% trans 'Labels' context 'To be print' %}
</button>
<div class="dropdown-menu" aria-labelledby="export-labels-{{name}}">
{% for template in current_model.label_templates %}
<a class="dropdown-item {{template.slug}}-labels" href="{{template.get_baselink_for_labels}}" target="_blank" title="{{template.name}}">
{{template.name}}
</a>
{% endfor %}
</div>
</div>{% endif %}
<span class="selected-lines">
<span class="sl-whole">{% trans "whole table" %}</span>
<span class="sl-selected"><span class="sl-number"></span> {% trans "selected item(s)" %}</span>
</span>
</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}}"/>
{% for source_id, source_label, source_url 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>{{col}}</th>
{% endfor %}</tr>
</thead>
</table>
</div>
{% endfor %}
|