mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
Popover menu: Add HTML data attributes in templates
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
{% extends 'base/components/popover-menu/item/layout.html.twig' %}
|
||||
|
||||
{% block iboPopoverMenuItem %}
|
||||
<a class="ibo-popover-menu--item" data-role="ibo-popover-menu--item" href="{{ oUIBlock.GetUrl() }}" onclick="{{ oUIBlock.GetJsCode()|escape }}">
|
||||
<a class="ibo-popover-menu--item" data-role="ibo-popover-menu--item" href="{{ oUIBlock.GetUrl() }}" onclick="{{ oUIBlock.GetJsCode()|escape }}"
|
||||
{% if oUIBlock.GetDataAttributes() %}
|
||||
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
|
||||
data-{{ sName }}="{{ sValue }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>
|
||||
{{ oUIBlock.GetLabel() }}
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{% extends 'base/components/popover-menu/item/layout.html.twig' %}
|
||||
{% block iboPopoverMenuItem %}
|
||||
<hr class="ibo-popover-menu--item ibo-popover-menu--separator">
|
||||
<hr class="ibo-popover-menu--item ibo-popover-menu--separator"
|
||||
{% if oUIBlock.GetDataAttributes() %}
|
||||
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
|
||||
data-{{ sName }}="{{ sValue }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,13 @@
|
||||
{% extends 'base/components/popover-menu/item/layout.html.twig' %}
|
||||
|
||||
{% block iboPopoverMenuItem %}
|
||||
<a class="ibo-popover-menu--item" data-role="ibo-popover-menu--item" href="{{ oUIBlock.GetUrl() }}" target="{{ oUIBlock.GetTarget() }}">
|
||||
<a class="ibo-popover-menu--item" data-role="ibo-popover-menu--item" href="{{ oUIBlock.GetUrl() }}" target="{{ oUIBlock.GetTarget() }}"
|
||||
{% if oUIBlock.HasDataAttributes() %}
|
||||
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
|
||||
data-{{ sName }}="{{ sValue }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
>
|
||||
{{ oUIBlock.GetLabel() }}
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user