Skip to content

Commit f06aa2e

Browse files
committed
Wrap extensions to block. Allow to override.
1 parent aa0f84c commit f06aa2e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Resources/views/datatable/extensions.html.twig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#}
99

1010
{# Buttons Extension #}
11+
{% block extensions_buttons %}
1112
{% if sg_datatables_view.extensions.buttons is not same as(null) %}
1213
{% if sg_datatables_view.extensions.buttons is same as(true) %}
1314
{# the easiest way to activate the extension - buttons is a boolean value (true) #}
@@ -26,8 +27,10 @@
2627
],
2728
{% endif %}
2829
{% endif %}
30+
{% endblock %}
2931

3032
{# Responsive Extension #}
33+
{% block extensions_responsive %}
3134
{% if sg_datatables_view.extensions.responsive is not same as(null) %}
3235
{% if sg_datatables_view.extensions.responsive is same as(true) %}
3336
{# the easiest way to activate the extension - responsive is a boolean value (true) #}
@@ -68,8 +71,10 @@
6871
},
6972
{% endif %}
7073
{% endif %}
74+
{% endblock %}
7175

7276
{# Select Extension #}
77+
{% block extensions_select %}
7378
{% if sg_datatables_view.extensions.select is not same as(null) %}
7479
{% if sg_datatables_view.extensions.select is same as(true) %}
7580
{# the easiest way to activate the extension - select is a boolean value (true) #}
@@ -98,8 +103,10 @@
98103
},
99104
{% endif %}
100105
{% endif %}
106+
{% endblock %}
101107

102108
{# RowGroup Extension #}
109+
{% block extensions_rowgroup %}
103110
{% if sg_datatables_view.extensions.rowGroup is not same as(null) %}
104111
"rowGroup": {
105112
{% if sg_datatables_view.extensions.rowGroup.enable is same as(true) %}
@@ -136,8 +143,10 @@
136143
{% endif %}
137144
},
138145
{% endif %}
146+
{% endblock %}
139147

140148
{# Scroller Extension #}
149+
{% block extensions_scroller %}
141150
{% if sg_datatables_view.extensions.scroller is not same as(null) %}
142151
{% if sg_datatables_view.extensions.scroller is same as(true) %}
143152
{# the easiest way to activate the extension - scroller is a boolean value (true) #}
@@ -162,4 +171,5 @@
162171
{% endif %}
163172
},
164173
{% endif %}
165-
{% endif %}
174+
{% endif %}
175+
{% endblock %}

0 commit comments

Comments
 (0)