Files
iTop/templates/base/components/button/buttonurl.html.twig
Stephen Abello 373942f922 N°9152 - Add extensibility API endpoints for UI elements (#1017)
---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
Co-authored-by: Benjamin DALSASS <benjamin.dalsass@combodo.com>
2026-08-31 16:03:36 +02:00

30 lines
1.4 KiB
Twig

<a id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} ibo-is-{{ oUIBlock.GetActionType() }} ibo-is-{{ oUIBlock.GetColor() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
data-role="ibo-button"
{% if oUIBlock.GetDataAttributes() %}
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
data-{{ sName }}="{{ sValue }}"
{% endfor %}
{% endif %}
{% if oUIBlock.GetAriaAttributes() %}
{% for sName, sValue in oUIBlock.GetAriaAttributes() %}
aria-{{ sName }}="{{ sValue }}"
{% endfor %}
{% endif %}
href="{{ oUIBlock.GetURL() }}"
target="{{ oUIBlock.GetTarget() }}"
{# Visual tooltip... #}
{% if oUIBlock.GetTooltip() is not empty %}
data-tooltip-content="{{ oUIBlock.GetTooltip() }}"
{% else %}
title="{{ oUIBlock.GetLabel() }}"
{% endif %}
>
<span class="ibo-button--loading-icon fas fa-spinner fa-pulse"></span>
{% if oUIBlock.GetIconClass() is not empty %}
<span class="ibo-button--icon {{ oUIBlock.GetIconClass() }}"></span>
{% endif %}
{% if oUIBlock.GetLabel() is not empty %}
<span class="ibo-button--label">{{ oUIBlock.GetLabel() }}</span>
{% endif %}
</a>