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 pathbutton.html.twig
More file actions
63 lines (63 loc) · 2.62 KB
/
button.html.twig
File metadata and controls
63 lines (63 loc) · 2.62 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
{
{% if button.action is defined and button.action is not same as(null) %}
{% if button.action['vars'] is defined %}
{% set vars = button.action['vars'] %}
{% else %}
{% set vars = {} %}
{% endif %}
action: {% include button.action['template'] with vars %},
{% endif %}
{% if button.available is defined and button.available is not same as(null) %}
{% if button.available['vars'] is defined %}
{% set vars = button.available['vars'] %}
{% else %}
{% set vars = {} %}
{% endif %}
available: {% include button.available['template'] with vars %},
{% endif %}
{% if button.className is defined and button.className is not same as(null) %}
className: "{{ button.className }}",
{% endif %}
{% if button.destroy is defined and button.destroy is not same as(null) %}
{% if button.destroy['vars'] is defined %}
{% set vars = button.destroy['vars'] %}
{% else %}
{% set vars = {} %}
{% endif %}
destroy: {% include button.destroy['template'] with vars %},
{% endif %}
{% if button.enabled is defined and button.enabled is not same as(null) %}
enabled: {{ button.enabled|sg_datatables_bool_var }},
{% endif %}
{% if button.extend is defined and button.extend is not same as(null) %}
extend: "{{ button.extend }}",
{% endif %}
{% if button.init is defined and button.init is not same as(null) %}
{% if button.init['vars'] is defined %}
{% set vars = button.init['vars'] %}
{% else %}
{% set vars = {} %}
{% endif %}
init: {% include button.init['template'] with vars %},
{% endif %}
{% if button.key is defined and button.key is not same as(null) %}
key: "{{ button.key }}",
{% endif %}
{% if button.name is defined and button.name is not same as(null) %}
name: "{{ button.name }}",
{% endif %}
{% if button.namespace is defined and button.namespace is not same as(null) %}
namespace: "{{ button.namespace }}",
{% endif %}
{% if button.text is defined and button.text is not same as(null) %}
text: "{{ button.text|e('js') }}",
{% endif %}
{% if button.titleAttr is defined and button.titleAttr is not same as(null) %}
titleAttr: "{{ button.titleAttr }}",
{% endif %}
{% if button.buttonOptions is defined and button.buttonOptions is not same as(null) %}
{% for key, option in button.buttonOptions %}
{{ key }}: {{ option|json_encode|raw }},
{% endfor %}
{% endif %}
},