Skip to content

Commit 1bbb2ee

Browse files
committed
Added support for own classess in action_list.html.twig
1 parent 18e7b15 commit 1bbb2ee

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/bundle/Resources/views/themes/admin/ui/action_list.html.twig

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
{% for action in item.children %}
44
{% set element = action.uri ? 'a' : 'button' %}
5+
{% set classess = {
6+
class: 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text' ~ ' ' ~ action.attributes.class|default('')
7+
} %}
8+
59
{% set attr = {
6-
class: "btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text",
7-
title: action.label,
8-
}|merge(action.attributes) %}
10+
title: action.label
11+
}|merge(action.attributes, classess) %}
912

1013
{% if action.uri %}
1114
{% set attr = attr|merge({ href: action.uri })%}
@@ -14,8 +17,8 @@
1417
{% endif %}
1518

1619
<{{ element }} {{ html.attributes(attr) }}>
17-
<svg class="ibexa-icon ibexa-icon--small">
18-
<use xlink:href="{{ ibexa_icon_path(action.extras.icon) }}"></use>
19-
</svg>
20+
<svg class="ibexa-icon ibexa-icon--small">
21+
<use xlink:href="{{ ibexa_icon_path(action.extras.icon) }}"></use>
22+
</svg>
2023
</{{ element }}>
2124
{% endfor %}

0 commit comments

Comments
 (0)