This repository was archived by the owner on Feb 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 234
Expand file tree
/
Copy pathdatatable_html.html.twig
More file actions
65 lines (62 loc) · 2.87 KB
/
datatable_html.html.twig
File metadata and controls
65 lines (62 loc) · 2.87 KB
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
{##
# This file is part of the SgDatatablesBundle package.
#
# (c) stwe <https://github.com/stwe/DatatablesBundle>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#}
{% set individual_filtering = false %}
{% if true == sg_datatables_view.options.individualFiltering %}
{% if true == sg_datatables_view.features.searching or sg_datatables_view.features.searching is same as(null) %}
{% set individual_filtering = true %}
{% endif %}
{% endif %}
<table id="sg-datatables-{{ sg_datatables_view.uniqueName }}" class="{{ sg_datatables_view.options.classes }}" cellspacing="0" width="100%">
<thead>
{% if true == individual_filtering %}
{% if 'head' == sg_datatables_view.options.individualFilteringPosition or 'both' == sg_datatables_view.options.individualFilteringPosition%}
<tr>
{% for column in sg_datatables_view.columnBuilder.columns %}
{% if column.sentInResponse %}
<th>{{ column.title }}</th>
{% endif %}
{% endfor %}
</tr>
<tr id="sg-datatables-{{ sg_datatables_view.uniqueName }}-filterrow">
{% for column in sg_datatables_view.columnBuilder.columns %}
{% if column.sentInResponse %}
<th>
{% if column.searchable %}
{{ sg_datatables_render_filter(sg_datatables_view, column, 'head') }}
{% endif %}
</th>
{% endif %}
{% endfor %}
</tr>
{% endif %}
{% endif %}
</thead>
{% if true == individual_filtering %}
{% if 'foot' == sg_datatables_view.options.individualFilteringPosition or 'both' == sg_datatables_view.options.individualFilteringPosition%}
<tfoot>
<tr>
{% for column in sg_datatables_view.columnBuilder.columns %}
{% if column.sentInResponse %}
<td>
{% if column.searchable %}
{{ sg_datatables_render_filter(sg_datatables_view, column, 'foot') }}
{% endif %}
</td>
{% endif %}
{% endfor %}
</tr>
</tfoot>
{% endif %}
{% endif %}
<tbody>
</tbody>
</table>
{% if sg_datatables_view.columnBuilder.uniqueColumn('multiselect') is not same as(null) %}
<div id="sg-datatables-{{ sg_datatables_view.uniqueName }}-multiselect-actions"></div>
{% endif %}