N°3123 - Create specific block for DisplayBlock(type: List)

This commit is contained in:
Eric
2020-11-26 16:50:58 +01:00
parent 9a595e3178
commit cf4e8c65d2
11 changed files with 137 additions and 4 deletions

View 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 %}

View 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 %}