Files
iTop/templates/base/components/dashlet/dashlet-badge.html.twig
Pierre Goiffon 1cc48c8d8e 💄 iTop 3.0.0 badge dashlet : make whole badge clickable (#191)
Would be better to have only one handler on the dashboard side but we want to respect code responsibility !
So until we have a system for components to print "static" code (that will be printed only once whatever number of component instances we have in the page), we are doing it the "old" way : calling a JQuery widget in the component JS Twig.
2021-02-11 12:09:06 +01:00

22 lines
1.3 KiB
Twig

{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
<div class="ibo-dashlet-badge--body{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" id="{{ oUIBlock.GetId() }}"
data-role="ibo-dashlet-badge--body">
<div class="ibo-dashlet-badge--icon-container">
<img class="ibo-dashlet-badge--icon" src="{{ oUIBlock.GetClassIconUrl() }}">
</div>
<div class="ibo-dashlet-badge--actions">
<a class="ibo-dashlet-badge--action-list" href="{{ oUIBlock.GetHyperlink() }}" data-role="ibo-dashlet-badge--action-list">
<span class="ibo-dashlet-badge--action-list-count">{{ oUIBlock.GetCount() }}</span>
<span class="ibo-dashlet-badge--action-list-label">{{ oUIBlock.GetClassLabel() }}</span>
</a>
{% if oUIBlock.GetCreateActionUrl() is not empty %}
<a class="ibo-dashlet-badge--action-create" href="{{ oUIBlock.GetCreateActionUrl() }}">
<span class="ibo-dashlet-badge--action-create-icon fas fa-plus"></span>
<span class="ibo-dashlet-badge--action-create-label">{{ oUIBlock.GetCreateActionLabel() }}</span>
</a>
{% endif %}
</div>
</div>
{% endapply %}