mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
This will allow to use this everywhere ! Before this commit we had : UiContentBlock aCSSClasses GetCssClasses SetCssClasses // reset + add, existing callers AddCSSClasses Button $aAdditionalCSSClasses GetAdditionalCSSClass AddCSSClasses Now we have : UiBlock aAdditionalCSSClasses AddCSSClasses SetCSSClasses GetAdditionalCSSClass Note that there were also some methods in PopoverMenuItem : PopoverMenuItem SetCssClasses AddCssClass GetCssClasses As they are indirection to methods in the $oPopupMenuItem attribute, I added to them the "MenuItem" prefix : SetMenuItemCssClasses AddMenuItemCssClass GetMenuItemCssClasses Didn't find any use to change.
20 lines
1.0 KiB
Twig
20 lines
1.0 KiB
Twig
<button id="{{ oUIBlock.GetId() }}"
|
|
class="ibo-button ibo-is-{{ oUIBlock.GetActionType() }} ibo-is-{{ oUIBlock.GetColor() }} {{ oUIBlock.GetAdditionalCSSClasses() }}{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}"
|
|
{% if oUIBlock.GetDataAttributes() %}
|
|
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
|
|
data-{{ sName }}="{{ sValue }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
type="{{ oUIBlock.GetType() }}"
|
|
name="{{ oUIBlock.GetName() }}"
|
|
value="{{ oUIBlock.GetValue() }}"
|
|
{% if oUIBlock.IsDisabled() is same as(true) %} disabled {% endif %}
|
|
{% if oUIBlock.GetTooltip() is not empty %} data-tooltip-content="{{ oUIBlock.GetTooltip() }}" {% endif %}
|
|
>
|
|
{% 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 %}
|
|
</button> |