Skip to content

Commit f45eb00

Browse files
authored
fix(admin/revision): inactive actions (#1375)
1 parent c59a994 commit f45eb00

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

templates/elements/object-views-button.html.twig

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
source: source
3636
}) -%}
3737
{%- if rawHTML != '' -%}
38-
{% set contentTypeActions = contentTypeActions|merge([{ label: rawHTML|raw }]) %}
38+
{% set contentTypeActions = contentTypeActions|merge([{ label: rawHTML|raw, rawHtml: true }]) %}
3939
{%- endif -%}
4040
{%- endif -%}
4141
{% elseif template.renderOption is constant('EMS\\CoreBundle\\Form\\Field\\RenderOptionType::NOTIFICATION') %}
@@ -127,23 +127,21 @@
127127
<ul class="dropdown-menu" role="menu">
128128
{% for a in contentTypeActions %}
129129
<li class="{{ a.list_item_classes|default([])|length > 0 ? a.list_item_classes|join(' ') }}">
130-
{% if a.post_button|default %}
130+
{% if a.rawHtml|default %}
131+
{{ a.label|raw }}
132+
{% elseif a.post_button|default %}
131133
{% include '@EMSCore/elements/post-button.html.twig' with {
132134
'url': a.link,
133135
'label': a.label,
134136
'icon': a.icon,
135137
'btnClass': ''
136138
}%}
137139
{% else %}
138-
{% if a.link|default %}
139-
<a href="{{ a.link }}" {% for attribute in a.link_attributes|default([]) %}{{ attribute.name }}="{{ attribute.value }}" {% endfor %}>
140-
{% endif %}
140+
<a href="{{ a.link|default('#') }}" {% for attribute in a.link_attributes|default([]) %}{{ attribute.name }}="{{ attribute.value }}" {% endfor %}>
141141
{% if a.icon|default %}<i class="{{ a.icon|raw }}"></i>{% endif %}
142142
{% if a.label|default %}{{ a.label|raw }}{% endif %}
143143
{% if a.suffix_icon|default %}<i class="{{ a.suffix_icon }}"></i>{% endif %}
144-
{% if a.link|default %}
145-
</a>
146-
{% endif %}
144+
</a>
147145
{% endif %}
148146
</li>
149147
{% endfor %}

0 commit comments

Comments
 (0)