mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°3123 - Create specific block for DisplayBlock(type: List)
This commit is contained in:
25
templates/specific/displayblock/blocklist/layout.html.twig
Normal file
25
templates/specific/displayblock/blocklist/layout.html.twig
Normal file
@@ -0,0 +1,25 @@
|
||||
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
|
||||
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
||||
{% apply spaceless %}
|
||||
|
||||
{% if oUIBlock.GetParameter('bEmptySet') %}
|
||||
<p>{{ 'UI:NoObjectToDisplay'|dict_s }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if oUIBlock.GetParameter('bNotAuthorized') %}
|
||||
<p>{{ 'UI:NoObjectToDisplay'|dict_s }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if oUIBlock.GetParameter('bCreateNew') %}
|
||||
<p>
|
||||
<a{{ oUIBlock.GetParameter('sLinkTarget') }} href="{{ oUIBlock.GetParameter('sAbsoluteUrlAppRoot') }}pages/UI.php?operation=new&class={{ oUIBlock.GetParameter('sClass') }}&{{ oUIBlock.GetParameter('sParams') }}{{ oUIBlock.GetParameter('sDefault') }}">
|
||||
{{ 'UI:ClickToCreateNew'|dict_format(oUIBlock.GetParameter('sClassName')) }}
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
|
||||
{{ render_block(oSubBlock, {aPage: aPage}) }}
|
||||
{% endfor %}
|
||||
|
||||
{% endapply %}
|
||||
7
templates/specific/displayblock/blocklist/layout.js.twig
Normal file
7
templates/specific/displayblock/blocklist/layout.js.twig
Normal file
@@ -0,0 +1,7 @@
|
||||
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
|
||||
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
||||
{% apply spaceless %}
|
||||
{% if oUIBlock.GetParameter('sEventAttachedData') is not empty %}
|
||||
$('body').trigger('update_history.itop', [{{ oUIBlock.GetParameter('sEventAttachedData') }}])
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
Reference in New Issue
Block a user