From f5cce23bb46f57e162adbdbc6210a39f3da3cbda Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Wed, 3 Sep 2025 10:37:26 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"N=C2=B08579=20-=20remove=20"spaceless?= =?UTF-8?q?"=20in=20twig=20files"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ee993ef80ac755fe17b374f5ebc12a5fd1fbc58b. --- .../templates/ConfirmUpdate.html.twig | 15 +- .../templates/SelectUpdateFile.html.twig | 28 +- .../templates/UpdateCoreFiles.html.twig | 106 ++--- .../block-chart/layout.html.twig | 10 +- .../display-block/block-chart/layout.js.twig | 4 +- .../display-block/block-csv/layout.html.twig | 48 +-- .../display-block/block-csv/layout.js.twig | 4 +- .../display-block/block-list/layout.html.twig | 38 +- .../display-block/block-list/layout.js.twig | 8 +- .../layout.js.twig | 4 +- .../layout.js.twig | 4 +- .../layout.ready.js.twig | 4 +- .../layout.ready.js.twig | 6 +- .../application/links/layout.ready.js.twig | 4 +- .../block-shortcuts/layout.js.twig | 6 +- .../block-print-header/layout.html.twig | 30 +- .../block-print-header/layout.live.js.twig | 6 +- .../block-print-header/layout.ready.js.twig | 6 +- .../components/button-group/layout.html.twig | 27 +- .../dashlet/dashlet-badge.html.twig | 56 +-- .../dashlet/dashlet-header-static.html.twig | 26 +- .../dashlet/dashlet-plain-text.html.twig | 10 +- .../base/components/dashlet/layout.html.twig | 3 + .../base/components/form/layout.html.twig | 12 +- .../input/file-select/layout.html.twig | 24 +- .../medallion-icon/layout.html.twig | 4 +- .../base/components/spinner/layout.html.twig | 12 +- .../base/components/template/layout.html.twig | 12 +- .../base/components/text/layout.html.twig | 4 +- .../base/components/title/layout.html.twig | 30 +- .../base/components/toolbar/layout.html.twig | 18 +- .../vertical-separator/layout.html.twig | 13 +- .../toolbar/toolbar-spacer/layout.html.twig | 6 +- .../activity-entry/layout.html.twig | 2 + .../caselog-entry-form/layout.html.twig | 10 +- .../layouts/content-block/layout.html.twig | 35 +- .../layouts/dashboard/column/layout.html.twig | 32 +- .../base/layouts/dashboard/layout.html.twig | 22 +- .../layouts/dashboard/row/layout.html.twig | 12 +- .../email-notification-preview.html.twig | 4 +- .../backoffice/ajaxpage/layout.html.twig | 382 +++++++++--------- .../clilikewebpage/layout.html.twig | 4 +- .../extension-blocks/banner.html.twig | 8 +- .../extension-blocks/footer.html.twig | 10 +- .../extension-blocks/header.html.twig | 6 +- 45 files changed, 635 insertions(+), 480 deletions(-) diff --git a/datamodels/2.x/itop-core-update/templates/ConfirmUpdate.html.twig b/datamodels/2.x/itop-core-update/templates/ConfirmUpdate.html.twig index b54d81901..9cc273a27 100644 --- a/datamodels/2.x/itop-core-update/templates/ConfirmUpdate.html.twig +++ b/datamodels/2.x/itop-core-update/templates/ConfirmUpdate.html.twig @@ -1,6 +1,9 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} + {% UIContentBlock Standard {'aContainerClasses': ['ibo-update-core', 'ibo-setup--wizard']} %} + {% if bSuccess %} {% UIContentBlock Standard {'aContainerClasses': ['ibo-setup--wizard--content']} %} {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:Status'|dict_s, 'sId':'update_progress'} %} @@ -8,7 +11,9 @@ {% set sVersion = 'UI:iTopVersion:Long'|dict_format(constant('ITOP_APPLICATION'), constant('ITOP_VERSION'), constant('ITOP_REVISION'), constant('ITOP_BUILD_DATE')) %} {% UIField Large {'sLabel':'iTopUpdate:UI:CurrentVersion'|dict_s, 'sValueHtml':sVersion} %}{% EndUIField %} {% EndUIFieldSet %} + {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:Backup'|dict_s} %} + {% if bDoBackup or bDoFilesArchive %} {% if bDoBackup %} {% UIField Large {'sLabel':'iTopUpdate:UI:WithDBBackup'|dict_s, 'sValueHtml':sBackupFile} %}{% EndUIField %} @@ -19,11 +24,14 @@ {% else %} {% UIAlert ForWarning {'sContent':'iTopUpdate:UI:WithoutBackup'|dict_s, 'IsCollapsible':false, 'IsClosable':false} %}{% EndUIAlert %} {% endif %} + {% EndUIFieldSet %} + {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:Action'|dict_s} %} {% UIAlert ForWarning {'sContent':'iTopUpdate:UI:WarningReadOnlyDuringUpdate'|dict_s, 'IsCollapsible':false, 'IsClosable':false} %}{% EndUIAlert %} {% EndUIFieldSet %} {% EndUIContentBlock %} + {% UIToolbar ForButton {'AddCSSClass':'ibo-setup--wizard--buttons-container'} %} {% UIForm Standard {'CSSClasses':['form-inline']} %} {% UIButton ForCancel {'sId':'cancel-update', 'sLabel':'iTopUpdate:UI:Cancel'|dict_s, 'bIsSubmit':true} %} @@ -38,12 +46,17 @@ {% UIInput ForHidden {'sName':'doFilesArchive', 'sValue':bDoFilesArchive} %} {% EndUIForm %} {% EndUIToolbar %} + {% else %} + {% UIFieldSet Standard {'sLegend':''} %} {% UIAlert ForFailure {'sContent':sError, 'IsCollapsible':false, 'IsClosable':false} %}{% EndUIAlert %} {% UIForm Standard {} %} {% UIButton ForPrimaryAction {'sLabel':'iTopUpdate:UI:Back'|dict_s, 'bIsSubmit':true} %} {% EndUIForm %} {% EndUIFieldSet %} + {% endif %} -{% EndUIContentBlock %} \ No newline at end of file + +{% EndUIContentBlock %} +{% endapply %} \ No newline at end of file diff --git a/datamodels/2.x/itop-core-update/templates/SelectUpdateFile.html.twig b/datamodels/2.x/itop-core-update/templates/SelectUpdateFile.html.twig index d583394e0..33d68114e 100644 --- a/datamodels/2.x/itop-core-update/templates/SelectUpdateFile.html.twig +++ b/datamodels/2.x/itop-core-update/templates/SelectUpdateFile.html.twig @@ -1,7 +1,11 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} + {% UIContentBlock Standard {'aContainerClasses':['ibo-update-core']} %} + {% UIPanel Neutral {sTitle:'iTopUpdate:UI:PageTitle'|dict_s} %} + {% UIContentBlock Standard {'aContainerClasses': ['display_block', 'display-files']} %} {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:Status'|dict_s} %} {% UIAlert ForInformation {'sId':'header-requirements', 'IsCollapsible':false, 'IsClosable':false} %} @@ -14,26 +18,34 @@ {% EndUIContentBlock %} {% EndUICollapsibleSection %} {% EndUIAlert %} + {% UIField Standard {'sLabel':'iTopUpdate:UI:CurrentVersion'|dict_s} %} {{ 'UI:iTopVersion:Long'|dict_format(constant('ITOP_APPLICATION'), constant('ITOP_VERSION'), constant('ITOP_REVISION'), constant('ITOP_BUILD_DATE')) }} {% EndUIField %} + {% UIField Standard {'sLabel':'iTopUpdate:UI:DiskFreeSpace'|dict_s} %} {{ sDiskFreeSpace }} {% EndUIField %} + {% UIField Standard {'sLabel':'iTopUpdate:UI:ItopDiskSpace'|dict_s, 'ValueId':'itop-disk-space'} %} {% UISpinner Standard {} %} {% EndUIField %} + {% UIField Standard {'sLabel':'iTopUpdate:UI:DBDiskSpace'|dict_s, 'ValueId':'db-disk-space'} %} {% UISpinner Standard {} %} {% EndUIField %} + {% UIField Standard {'sLabel':'iTopUpdate:UI:FileUploadMaxSize'|dict_s} %} {{ sFileUploadMaxSize }} {% EndUIField %} + {% EndUIFieldSet %} + {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:SelectUpdateFile'|dict_s, 'sId':'form-update-outer'} %} {% UIForm Standard {} %} {% UIInput ForHidden {'sName':'route', 'sValue':'core_update.confirm_update'} %} {% UIInput ForHidden {'sName':'transaction_id', 'sValue':sTransactionId} %} + {% UIAlert ForFailure {'sId':'header-file-size', 'IsHidden':true} %} {% UIContentBlock Standard {'aContainerClasses':['ibo-file-size-error']} %} {{ 'iTopUpdate:Error:FileUploadMaxSizeTooSmall'|dict_s }} @@ -45,25 +57,34 @@ {{ 'iTopUpdate:UI:UploadMaxFileSize'|dict_format(sUploadMaxSize) }} {% EndUIContentBlock %} {% EndUIAlert %} + {% UIAlert ForInformation {'sId':'check-in-progress', 'IsHidden':false} %} {{ 'iTopUpdate:UI:CheckInProgress'|dict_s }} {% EndUIAlert %} + {% UIFileSelect Standard {sName: 'file', sId: 'file','AddCSSClass':'ibo-is-hidden'} %} + {% UIAlert ForWarning {'sId':'dobackup-warning', 'IsHidden':true} %} {{ 'iTopUpdate:UI:DoBackup:Warning'|dict_s }} {% EndUIAlert %} + {% UIContentBlock Standard {'aContainerClasses':['ibo-font-ral-nor-150']} %} {% UIInput Standard {'sType':'checkbox', 'sId':'doBackup', 'sName':'doBackup', 'sValue':'1', 'IsChecked':true, 'CSSClasses':['ibo-input-checkbox', 'ibo-input--label-left'], 'Label':'iTopUpdate:UI:DoBackup:Label'|dict_s} %} {% EndUIContentBlock %} + {% UIContentBlock Standard {'aContainerClasses':['ibo-font-ral-nor-150']} %} {% UIInput Standard {'sType':'checkbox', 'sId':'doFilesArchive', 'sName':'doFilesArchive', 'sValue':'1', 'IsChecked':true, 'CSSClasses':['ibo-input-checkbox', 'ibo-input--label-left'], 'Label':'iTopUpdate:UI:DoFilesArchive'|dict_s} %} {% EndUIContentBlock %} + {% UIContentBlock Standard {'aContainerClasses':['ibo_check_update_submit']} %} {% UIButton ForPrimaryAction {'sLabel':'iTopUpdate:UI:CheckUpdate'|dict_s, 'sId':'check-update', 'bIsSubmit':true, 'IsDisabled':true} %} {% UISpinner Standard {'sId':'submit-wait', 'IsHidden':true} %} {% EndUIContentBlock %} + {% EndUIForm %} + {% EndUIFieldSet %} + {% if bIsSetupLaunchButtonEnabled %} {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:Setup'|dict_s} %} {% UIForm Standard {'sId':'launch-setup-form', Action:sLaunchSetupUrl} %} @@ -78,9 +99,14 @@ {% UISpinner Standard {sId:'fast-setup-wait', IsHidden:true} %} {% EndUIFieldSet %} {% endif %} + {% UIFieldSet Standard {'sLegend':'iTopUpdate:UI:History'|dict_s} %} {% UIDataTable ForRendering {'sListId':'iboupdatehistory', 'oSet':oSet} %}{% EndUIDataTable %} {% EndUIFieldSet %} + {% EndUIContentBlock %} + {% EndUIPanel %} -{% EndUIContentBlock %} \ No newline at end of file + +{% EndUIContentBlock %} +{% endapply %} \ No newline at end of file diff --git a/datamodels/2.x/itop-core-update/templates/UpdateCoreFiles.html.twig b/datamodels/2.x/itop-core-update/templates/UpdateCoreFiles.html.twig index 76bea5057..c22b0ccdf 100644 --- a/datamodels/2.x/itop-core-update/templates/UpdateCoreFiles.html.twig +++ b/datamodels/2.x/itop-core-update/templates/UpdateCoreFiles.html.twig @@ -1,64 +1,68 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -{% UIContentBlock Standard {aContainerClasses: ['ibo-update-core', 'ibo-setup--wizard']} %} - {% UIContentBlock Standard {'aContainerClasses': ['ibo-setup--wizard--content']} %} - {% UIFieldSet Standard {sLegend:'iTopUpdate:UI:Progress'|dict_s, sId:'installation_progress'} %} - {# Todo 3.0 Add Progress bar UIBlock #} -
- {{ 'iTopUpdate:UI:SetupMessage:Ready'|dict_s }} -
0%
-
- {% EndUIFieldSet %} +{% apply spaceless %} - {% UIFieldSet Standard {sLegend:'iTopUpdate:UI:Status'|dict_s} %} - {% UIAlert ForSuccess {sId:'new_version', sTitle:'iTopUpdate:UI:NewVersion'|dict_s, IsHidden:true, IsCollapsible:false, IsClosable:false} %} - {% UIContentBlock Standard {aContainerClasses:['ibo-update-core--current-version']} %} - {{ sCurrentVersion }} - {% EndUIContentBlock %} - {% EndUIAlert %} - {% UIAlert ForInformation {sId:'current_version', IsCollapsible:false, IsClosable:false} %} - {% UIContentBlock Standard {aContainerClasses:['ibo-update-core--current-version']} %} - {{ sCurrentVersion }} - {% EndUIContentBlock %} - {% EndUIAlert %} + {% UIContentBlock Standard {aContainerClasses: ['ibo-update-core', 'ibo-setup--wizard']} %} - {% if bDoBackup %} - {% UIAlert ForInformation {sId:'do_backup_done', sTitle:'iTopUpdate:UI:WithDBBackup'|dict_s, sContent:sBackupFile, IsHidden:true} %}{% EndUIAlert %} - {% endif %} + {% UIContentBlock Standard {'aContainerClasses': ['ibo-setup--wizard--content']} %} + {% UIFieldSet Standard {sLegend:'iTopUpdate:UI:Progress'|dict_s, sId:'installation_progress'} %} + {# Todo 3.0 Add Progress bar UIBlock #} +
+ {{ 'iTopUpdate:UI:SetupMessage:Ready'|dict_s }} +
0%
+
+ {% EndUIFieldSet %} - {% if bDoFilesArchive %} - {% UIAlert ForInformation {sId:'do_files_archive_done', sTitle:'iTopUpdate:UI:WithFilesBackup'|dict_s, sContent:sItopArchive, IsHidden:true} %}{% EndUIAlert %} - {% endif %} - {% EndUIFieldSet %} + {% UIFieldSet Standard {sLegend:'iTopUpdate:UI:Status'|dict_s} %} + {% UIAlert ForSuccess {sId:'new_version', sTitle:'iTopUpdate:UI:NewVersion'|dict_s, IsHidden:true, IsCollapsible:false, IsClosable:false} %} + {% UIContentBlock Standard {aContainerClasses:['ibo-update-core--current-version']} %} + {{ sCurrentVersion }} + {% EndUIContentBlock %} + {% EndUIAlert %} + {% UIAlert ForInformation {sId:'current_version', IsCollapsible:false, IsClosable:false} %} + {% UIContentBlock Standard {aContainerClasses:['ibo-update-core--current-version']} %} + {{ sCurrentVersion }} + {% EndUIContentBlock %} + {% EndUIAlert %} - {% UIFieldSet Standard {sLegend:''} %} - {% UIAlert ForFailure {sId:'setup_error_outer', sContent:'', IsCollapsible:false, IsClosable:false, IsHidden:true} %} - {% UIContentBlock Standard {sId:'setup_error',aContainerClasses:['ibo-update-core--error']} %}{% EndUIContentBlock %} - {% if bDoFilesArchive %} - {{ 'iTopUpdate:UI:RestoreArchive'|dict_format(sItopArchive) }} - {% endif %} {% if bDoBackup %} - {{ 'iTopUpdate:UI:RestoreBackup'|dict_format(sBackupFile) }} + {% UIAlert ForInformation {sId:'do_backup_done', sTitle:'iTopUpdate:UI:WithDBBackup'|dict_s, sContent:sBackupFile, IsHidden:true} %}{% EndUIAlert %} {% endif %} - {{ 'iTopUpdate:UI:MaintenanceModeActive'|dict_s }} - {% EndUIAlert %} - {% EndUIFieldSet %} - {% EndUIContentBlock %} - {% UIToolbar ForButton {'AddCSSClass':'ibo-setup--wizard--buttons-container'} %} - {% UIContentBlock Standard {sId:'run_setup',aContainerClasses:['ibo-update-core--run-setup'], IsHidden:true} %} + {% if bDoFilesArchive %} + {% UIAlert ForInformation {sId:'do_files_archive_done', sTitle:'iTopUpdate:UI:WithFilesBackup'|dict_s, sContent:sItopArchive, IsHidden:true} %}{% EndUIAlert %} + {% endif %} + {% EndUIFieldSet %} + + {% UIFieldSet Standard {sLegend:''} %} + {% UIAlert ForFailure {sId:'setup_error_outer', sContent:'', IsCollapsible:false, IsClosable:false, IsHidden:true} %} + {% UIContentBlock Standard {sId:'setup_error',aContainerClasses:['ibo-update-core--error']} %}{% EndUIContentBlock %} + {% if bDoFilesArchive %} + {{ 'iTopUpdate:UI:RestoreArchive'|dict_format(sItopArchive) }} + {% endif %} + {% if bDoBackup %} + {{ 'iTopUpdate:UI:RestoreBackup'|dict_format(sBackupFile) }} + {% endif %} + {{ 'iTopUpdate:UI:MaintenanceModeActive'|dict_s }} + {% EndUIAlert %} + {% EndUIFieldSet %} + {% EndUIContentBlock %} + + {% UIToolbar ForButton {'AddCSSClass':'ibo-setup--wizard--buttons-container'} %} + {% UIContentBlock Standard {sId:'run_setup',aContainerClasses:['ibo-update-core--run-setup'], IsHidden:true} %} + {% UIForm Standard {CSSClasses:['form-inline']} %} + {% UIInput ForHidden {sName:'route', sValue:'core_update.run_setup'} %} + {% UIInput ForHidden {sName:'authent', sValue:sSetupToken} %} + {% UIInput ForHidden {sName:'', sValue:''} %} + {% UIButton ForPrimaryAction {sLabel:'iTopUpdate:UI:RunSetup'|dict_s, sId:'run_setup', bIsSubmit:true, IsDisabled:false} %} + {% EndUIForm %} + {% EndUIContentBlock %} + {% UIToolbarSpacer Standard {} %} {% UIForm Standard {CSSClasses:['form-inline']} %} - {% UIInput ForHidden {sName:'route', sValue:'core_update.run_setup'} %} - {% UIInput ForHidden {sName:'authent', sValue:sSetupToken} %} - {% UIInput ForHidden {sName:'', sValue:''} %} - {% UIButton ForPrimaryAction {sLabel:'iTopUpdate:UI:RunSetup'|dict_s, sId:'run_setup', bIsSubmit:true, IsDisabled:false} %} + {% UIButton ForPrimaryAction {sLabel:'iTopUpdate:UI:Continue'|dict_s, sId:'setup_continue', bIsSubmit:true, IsDisabled:true} %} {% EndUIForm %} - {% EndUIContentBlock %} - {% UIToolbarSpacer Standard {} %} - {% UIForm Standard {CSSClasses:['form-inline']} %} - {% UIButton ForPrimaryAction {sLabel:'iTopUpdate:UI:Continue'|dict_s, sId:'setup_continue', bIsSubmit:true, IsDisabled:true} %} - {% EndUIForm %} - {% EndUIToolbar %} + {% EndUIToolbar %} -{% EndUIContentBlock %} \ No newline at end of file + {% EndUIContentBlock %} +{% endapply %} \ No newline at end of file diff --git a/templates/application/display-block/block-chart/layout.html.twig b/templates/application/display-block/block-chart/layout.html.twig index 89beb550b..ed83efac1 100644 --- a/templates/application/display-block/block-chart/layout.html.twig +++ b/templates/application/display-block/block-chart/layout.html.twig @@ -1,7 +1,9 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
-
- +{% apply spaceless %} +
+
+ +
-
\ No newline at end of file +{% endapply %} \ No newline at end of file diff --git a/templates/application/display-block/block-chart/layout.js.twig b/templates/application/display-block/block-chart/layout.js.twig index 874e43c76..7d2fbbfa9 100644 --- a/templates/application/display-block/block-chart/layout.js.twig +++ b/templates/application/display-block/block-chart/layout.js.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} $.post('{{ oUIBlock.sUrl|escape('js') }}', {}, function (data) { $('body').append(data); -}); \ No newline at end of file +}); +{% endapply %} \ No newline at end of file diff --git a/templates/application/display-block/block-csv/layout.html.twig b/templates/application/display-block/block-csv/layout.html.twig index 229c6777c..f1866e2c4 100644 --- a/templates/application/display-block/block-csv/layout.html.twig +++ b/templates/application/display-block/block-csv/layout.html.twig @@ -1,27 +1,29 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
-
- - - - - -
{{ 'UI:Download-CSV'|dict_format(oUIBlock.sCsvFile) }}{{ oUIBlock.sCharsetNotice }} - -  {{ 'UI:CSVExport:AdvancedMode'|dict_s }} -
- {% if oUIBlock.bAdvancedMode %} -

- {{ 'UI:CSVExport:AdvancedMode+'|dict_s }} -

- {% endif %} -
- -
-
- {{ 'UI:Loading'|dict_s }} +{% apply spaceless %} +
+
+ + + + + +
{{ 'UI:Download-CSV'|dict_format(oUIBlock.sCsvFile) }}{{ oUIBlock.sCharsetNotice }} + +  {{ 'UI:CSVExport:AdvancedMode'|dict_s }} +
+ {% if oUIBlock.bAdvancedMode %} +

+ {{ 'UI:CSVExport:AdvancedMode+'|dict_s }} +

+ {% endif %}
+ +
+
+ {{ 'UI:Loading'|dict_s }} +
+
+
- -
\ No newline at end of file +{% endapply %} \ No newline at end of file diff --git a/templates/application/display-block/block-csv/layout.js.twig b/templates/application/display-block/block-csv/layout.js.twig index 2279c1663..0547daa6a 100644 --- a/templates/application/display-block/block-csv/layout.js.twig +++ b/templates/application/display-block/block-csv/layout.js.twig @@ -1,5 +1,6 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} $.post( '{{ oUIBlock.sAjaxLink|escape('js') }}', {{ oUIBlock.sJsonParams|raw }}, @@ -7,4 +8,5 @@ $.post( $('#csv_content').html(data); $('#csv_content_loading').hide(); $('#csv_content').show(); - }); \ No newline at end of file + }); +{% endapply %} \ No newline at end of file diff --git a/templates/application/display-block/block-list/layout.html.twig b/templates/application/display-block/block-list/layout.html.twig index 4aea4dc21..2252989d2 100644 --- a/templates/application/display-block/block-list/layout.html.twig +++ b/templates/application/display-block/block-list/layout.html.twig @@ -1,21 +1,25 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -{% if oUIBlock.bEmptySet or oUIBlock.bNotAuthorized %} -
{{ 'UI:NoObjectToDisplay'|dict_s }}
-{% endif %} +{% apply spaceless %} -{# TODO 3.1: This section should be removed if BlockList is no longer used as is, but always with a table #} -{% if oUIBlock.bCreateNew %} -
- - - - - {{ 'UI:ClickToCreateNew'|dict_format(oUIBlock.sClassLabel) }} - -
-{% endif %} + {% if oUIBlock.bEmptySet or oUIBlock.bNotAuthorized %} +
{{ 'UI:NoObjectToDisplay'|dict_s }}
+ {% endif %} -{% for oSubBlock in oUIBlock.GetSubBlocks() %} - {{- render_block(oSubBlock, {aPage: aPage}) -}} -{% endfor %} \ No newline at end of file + {# TODO 3.1: This section should be removed if BlockList is no longer used as is, but always with a table #} + {% if oUIBlock.bCreateNew %} +
+ + + + + {{ 'UI:ClickToCreateNew'|dict_format(oUIBlock.sClassLabel) }} + +
+ {% endif %} + + {% for oSubBlock in oUIBlock.GetSubBlocks() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %} + +{% endapply %} \ No newline at end of file diff --git a/templates/application/display-block/block-list/layout.js.twig b/templates/application/display-block/block-list/layout.js.twig index 7313a230c..d4a05b19c 100644 --- a/templates/application/display-block/block-list/layout.js.twig +++ b/templates/application/display-block/block-list/layout.js.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -{% if oUIBlock.sEventAttachedData is not empty %} - $('body').trigger('update_history.itop', [{{ oUIBlock.sEventAttachedData|raw }}]); -{% endif %} \ No newline at end of file +{% apply spaceless %} + {% if oUIBlock.sEventAttachedData is not empty %} + $('body').trigger('update_history.itop', [{{ oUIBlock.sEventAttachedData|raw }}]); + {% endif %} +{% endapply %} \ No newline at end of file diff --git a/templates/application/links/direct/block-direct-linkset-edit-table/layout.js.twig b/templates/application/links/direct/block-direct-linkset-edit-table/layout.js.twig index c0fb297d2..400cce7b7 100644 --- a/templates/application/links/direct/block-direct-linkset-edit-table/layout.js.twig +++ b/templates/application/links/direct/block-direct-linkset-edit-table/layout.js.twig @@ -1,5 +1,6 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} oWidget{{ oUIBlock.oUILinksDirectWidget.GetInputId() }} = $('#{{ oUIBlock.oUILinksDirectWidget.GetInputId() }}').directlinks({ class_name: '{{ oUIBlock.oUILinksDirectWidget.GetClass() }}', att_code: '{{ oUIBlock.oUILinksDirectWidget.GetAttCode() }}', @@ -7,4 +8,5 @@ oWidget{{ oUIBlock.oUILinksDirectWidget.GetInputId() }} = $('#{{ oUIBlock.oUILin submit_to: '{{ oUIBlock.sSubmitUrl }}', oWizardHelper: {{ oUIBlock.sWizHelper }}, do_search: '{{ oUIBlock.sJSDoSearch }}' -}); \ No newline at end of file +}); +{% endapply %} \ No newline at end of file diff --git a/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.js.twig b/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.js.twig index 5d65668ef..2dc44fdb0 100644 --- a/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.js.twig +++ b/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.js.twig @@ -1,5 +1,6 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }} = new LinksWidget( '{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}', '{{ oUIBlock.oUILinksWidget.GetClass() }}', @@ -13,4 +14,5 @@ oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }} = new LinksWidget( {{ oUIBlock.iMaxAddedId }}, {{ oUIBlock.aRemoved | json_encode | raw }} ); -oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.Init(); \ No newline at end of file +oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.Init(); +{% endapply %} \ No newline at end of file diff --git a/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.ready.js.twig b/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.ready.js.twig index 18230e6ff..f52b3cd6c 100644 --- a/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.ready.js.twig +++ b/templates/application/links/indirect/block-indirect-linkset-edit-table/layout.ready.js.twig @@ -1,3 +1,5 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.RegisterChange(); \ No newline at end of file +{% apply spaceless %} +oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.RegisterChange(); +{% endapply %} \ No newline at end of file diff --git a/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig b/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig index dc01439d5..c62e86c9d 100644 --- a/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig +++ b/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} + $('#dlg_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').dialog({ width: $(window).width()*0.8, height: $(window).height()*0.8, @@ -28,4 +30,6 @@ $('#dlg_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').dialog({ }); $('#SearchFormToAdd_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }} form').on('submit.uilinksWizard', oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.SearchObjectsToAdd); -$('#SearchFormToAdd_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').on('resize', oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.UpdateSizes); \ No newline at end of file +$('#SearchFormToAdd_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').on('resize', oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.UpdateSizes); + +{% endapply %} \ No newline at end of file diff --git a/templates/application/links/layout.ready.js.twig b/templates/application/links/layout.ready.js.twig index 74e9a05ee..801b9c6db 100644 --- a/templates/application/links/layout.ready.js.twig +++ b/templates/application/links/layout.ready.js.twig @@ -1,6 +1,8 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} {{ oUIBlock.GetWidgetName() }} = $('#{{ oUIBlock.GetId() }}').links_view_table({ link_class: '{{ oUIBlock.GetLinkedClass() }}', external_key_to_me: '{{ oUIBlock.GetExternalKeyToMe() }}' -}); \ No newline at end of file +}); +{% endapply %} \ No newline at end of file diff --git a/templates/application/preferences/block-shortcuts/layout.js.twig b/templates/application/preferences/block-shortcuts/layout.js.twig index a94fb685c..cdf4c9b76 100644 --- a/templates/application/preferences/block-shortcuts/layout.js.twig +++ b/templates/application/preferences/block-shortcuts/layout.js.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} + var selectionCount{{ oUIBlock.sIdShortcuts }} = $('#{{ oUIBlock.sIdShortcuts }} [name="selectionCount"]'); selectionCount{{ oUIBlock.sIdShortcuts }}.on('change',function() { @@ -45,4 +47,6 @@ $('#shortcut_btn_delete').on('click', function() { }); } return false; -}); \ No newline at end of file +}); + +{% endapply %} \ No newline at end of file diff --git a/templates/application/printable/block-print-header/layout.html.twig b/templates/application/printable/block-print-header/layout.html.twig index 8a6020798..d4fffe250 100644 --- a/templates/application/printable/block-print-header/layout.html.twig +++ b/templates/application/printable/block-print-header/layout.html.twig @@ -1,17 +1,21 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
-

{{'UI:ExplainPrintable'| dict_format('')| raw}}

-
-    -    +{% apply spaceless %} - +
+

{{'UI:ExplainPrintable'| dict_format('')| raw}}

+
+    +    -
\ No newline at end of file + + +
+ +{% endapply %} \ No newline at end of file diff --git a/templates/application/printable/block-print-header/layout.live.js.twig b/templates/application/printable/block-print-header/layout.live.js.twig index 6a6ac7414..e35795e04 100644 --- a/templates/application/printable/block-print-header/layout.live.js.twig +++ b/templates/application/printable/block-print-header/layout.live.js.twig @@ -1,3 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -var oHiddeableChapters = {}; \ No newline at end of file +{% apply spaceless %} + +var oHiddeableChapters = {}; + +{% endapply %} \ No newline at end of file diff --git a/templates/application/printable/block-print-header/layout.ready.js.twig b/templates/application/printable/block-print-header/layout.ready.js.twig index a8d3afda6..acded995e 100644 --- a/templates/application/printable/block-print-header/layout.ready.js.twig +++ b/templates/application/printable/block-print-header/layout.ready.js.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} + var sHiddeableChapters = '
\ No newline at end of file +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/dashlet/dashlet-header-static.html.twig b/templates/base/components/dashlet/dashlet-header-static.html.twig index d49360c0d..7d3e555fc 100644 --- a/templates/base/components/dashlet/dashlet-header-static.html.twig +++ b/templates/base/components/dashlet/dashlet-header-static.html.twig @@ -1,15 +1,17 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
-
- {% if oUIBlock.GetIconUrl() is not empty %} -
- {# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #} - -
- {% endif %} - {% if oUIBlock.GetTitle() is not empty %} -
{{ oUIBlock.GetTitle() }}
- {% endif %} +{% apply spaceless %} +
+
+ {% if oUIBlock.GetIconUrl() is not empty %} +
+ {# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #} + +
+ {% endif %} + {% if oUIBlock.GetTitle() is not empty %} +
{{ oUIBlock.GetTitle() }}
+ {% endif %} +
-
\ No newline at end of file +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/dashlet/dashlet-plain-text.html.twig b/templates/base/components/dashlet/dashlet-plain-text.html.twig index 586e70c92..061331d6b 100644 --- a/templates/base/components/dashlet/dashlet-plain-text.html.twig +++ b/templates/base/components/dashlet/dashlet-plain-text.html.twig @@ -1,6 +1,8 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
- {# |raw filter is ok here as the escaping is already done by the \DashletPlainText class itself #} - {{- oUIBlock.GetText()|raw -}} -
\ No newline at end of file +{% apply spaceless %} +
+ {# |raw filter is ok here as the escaping is already done by the \DashletPlainText class itself #} + {{ oUIBlock.GetText()|raw }} +
+{% endapply %} \ No newline at end of file diff --git a/templates/base/components/dashlet/layout.html.twig b/templates/base/components/dashlet/layout.html.twig index 375c45499..8cfe046bf 100644 --- a/templates/base/components/dashlet/layout.html.twig +++ b/templates/base/components/dashlet/layout.html.twig @@ -1,2 +1,5 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %} + +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/form/layout.html.twig b/templates/base/components/form/layout.html.twig index 0c2a159ef..756dee092 100644 --- a/templates/base/components/form/layout.html.twig +++ b/templates/base/components/form/layout.html.twig @@ -13,9 +13,11 @@ {% endfor %} {% endif %} > - {% block iboContentBlockContainer %} - {% for oSubBlock in oUIBlock.GetSubBlocks() %} - {{- render_block(oSubBlock, {aPage: aPage}) -}} - {% endfor %} - {% endblock %} + {% apply spaceless %} + {% block iboContentBlockContainer %} + {% for oSubBlock in oUIBlock.GetSubBlocks() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %} + {% endblock %} + {% endapply %} \ No newline at end of file diff --git a/templates/base/components/input/file-select/layout.html.twig b/templates/base/components/input/file-select/layout.html.twig index 585281664..886a1e445 100644 --- a/templates/base/components/input/file-select/layout.html.twig +++ b/templates/base/components/input/file-select/layout.html.twig @@ -1,13 +1,15 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
- -
\ No newline at end of file +{% apply spaceless %} +
+ +
+{% endapply %} \ No newline at end of file diff --git a/templates/base/components/medallion-icon/layout.html.twig b/templates/base/components/medallion-icon/layout.html.twig index 91357ed19..1f274c054 100644 --- a/templates/base/components/medallion-icon/layout.html.twig +++ b/templates/base/components/medallion-icon/layout.html.twig @@ -1,5 +1,6 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %}
{% if oUIBlock.GetImageUrl() != '' %} @@ -10,4 +11,5 @@ {% if oUIBlock.GetDescription() != '' %}
{{ oUIBlock.GetDescription() }}
{% endif %} -
\ No newline at end of file +
+{% endapply %} \ No newline at end of file diff --git a/templates/base/components/spinner/layout.html.twig b/templates/base/components/spinner/layout.html.twig index 43037199d..a04251b2d 100644 --- a/templates/base/components/spinner/layout.html.twig +++ b/templates/base/components/spinner/layout.html.twig @@ -1,12 +1,14 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
{% if oUIBlock.HasDescription() %}
{{ oUIBlock.GetDescription() }}
{% endif %} -
\ No newline at end of file +
+{% endapply %} \ No newline at end of file diff --git a/templates/base/components/template/layout.html.twig b/templates/base/components/template/layout.html.twig index eb725b455..36e1e63aa 100644 --- a/templates/base/components/template/layout.html.twig +++ b/templates/base/components/template/layout.html.twig @@ -1,7 +1,9 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} - \ No newline at end of file +{% apply spaceless %} + +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/text/layout.html.twig b/templates/base/components/text/layout.html.twig index d7d15c749..4d55ae3af 100644 --- a/templates/base/components/text/layout.html.twig +++ b/templates/base/components/text/layout.html.twig @@ -1,3 +1,5 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -{{ oUIBlock.GetText() }} \ No newline at end of file +{% apply spaceless %} + {{ oUIBlock.GetText() }} +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/title/layout.html.twig b/templates/base/components/title/layout.html.twig index 8ddff503f..288662831 100644 --- a/templates/base/components/title/layout.html.twig +++ b/templates/base/components/title/layout.html.twig @@ -1,16 +1,18 @@ -
- {% if oUIBlock.HasIcon() %} -
-
+{% apply spaceless %} +
+ {% if oUIBlock.HasIcon() %} +
+
+
+ {% endif %} +
+ {% block iboPageTitleText %} + + {% for oSubBlock in oUIBlock.GetSubBlocks() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %} + + {% endblock %}
- {% endif %} -
- {% block iboPageTitleText %} - - {% for oSubBlock in oUIBlock.GetSubBlocks() %} - {{- render_block(oSubBlock, {aPage: aPage}) -}} - {% endfor %} - - {% endblock %}
-
\ No newline at end of file +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/toolbar/layout.html.twig b/templates/base/components/toolbar/layout.html.twig index e062b363f..18ad86924 100644 --- a/templates/base/components/toolbar/layout.html.twig +++ b/templates/base/components/toolbar/layout.html.twig @@ -1,10 +1,14 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Toolbar #} -
- {% for oSubBlock in oUIBlock.GetSubBlocks() %} - {{- render_block(oSubBlock, {aPage: aPage}) -}} - {% endfor %} -
\ No newline at end of file +{% apply spaceless %} +
+ + {% for oSubBlock in oUIBlock.GetSubBlocks() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %} +
+{% endapply %} \ No newline at end of file diff --git a/templates/base/components/toolbar/separator/vertical-separator/layout.html.twig b/templates/base/components/toolbar/separator/vertical-separator/layout.html.twig index 22ab602c2..02598e34b 100644 --- a/templates/base/components/toolbar/separator/vertical-separator/layout.html.twig +++ b/templates/base/components/toolbar/separator/vertical-separator/layout.html.twig @@ -1,8 +1,9 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} - - - \ No newline at end of file +{% apply spaceless %} + + +{% endapply %} \ No newline at end of file diff --git a/templates/base/components/toolbar/toolbar-spacer/layout.html.twig b/templates/base/components/toolbar/toolbar-spacer/layout.html.twig index 75e32ab08..4d1141bc6 100644 --- a/templates/base/components/toolbar/toolbar-spacer/layout.html.twig +++ b/templates/base/components/toolbar/toolbar-spacer/layout.html.twig @@ -1,4 +1,6 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
-
\ No newline at end of file +{% apply spaceless %} +
+
+{% endapply %} \ No newline at end of file diff --git a/templates/base/layouts/activity-panel/activity-entry/layout.html.twig b/templates/base/layouts/activity-panel/activity-entry/layout.html.twig index 5b521cdae..a302cabca 100644 --- a/templates/base/layouts/activity-panel/activity-entry/layout.html.twig +++ b/templates/base/layouts/activity-panel/activity-entry/layout.html.twig @@ -32,6 +32,7 @@
+ {% apply spaceless %} {% block iboActivityEntrySubInformation %} {% if oUIBlock.GetOrigin() is not null and oUIBlock.GetOrigin != constant('Combodo\\iTop\\Core\\CMDBChange\\CMDBChangeOrigin::INTERACTIVE') %} @@ -47,6 +48,7 @@ data-raw-datetime="{{ oUIBlock.GetRawDateTime() }}" data-formatted-datetime="{{ oUIBlock.GetFormattedDateTime() }}">{{ oUIBlock.GetFormattedDateTime() }} {% endblock %} + {% endapply %}
{% endblock %}
diff --git a/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig b/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig index 9bda2be44..d37355314 100644 --- a/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig +++ b/templates/base/layouts/activity-panel/caselog-entry-form/layout.html.twig @@ -1,3 +1,4 @@ +{% apply spaceless %}
{% for TextInputActionButton in oUIBlock.GetExtraActionButtons() %} - {{- render_block(TextInputActionButton, {aPage: aPage}) -}} + {{ render_block(TextInputActionButton, {aPage: aPage}) }} {% endfor %}
{% for FormActionButton in oUIBlock.GetMainActionButtons() %} - {{- render_block(FormActionButton, {aPage: aPage}) -}} + {{ render_block(FormActionButton, {aPage: aPage}) }} {% endfor %}
- {{- render_block(oUIBlock.GetTextInput(), {aPage: aPage}) -}} + {{ render_block(oUIBlock.GetTextInput(), {aPage: aPage}) }}
@@ -34,4 +35,5 @@ -
\ No newline at end of file + +{% endapply %} \ No newline at end of file diff --git a/templates/base/layouts/content-block/layout.html.twig b/templates/base/layouts/content-block/layout.html.twig index b0d25f147..6fd18f76d 100644 --- a/templates/base/layouts/content-block/layout.html.twig +++ b/templates/base/layouts/content-block/layout.html.twig @@ -1,18 +1,23 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Content Block #} -{# Important: We don't want the UIContentBlock have a div node based on the inherited CSS classes, otherwise the node would always be present, which is not what we want #} -{% set bHasDiv = (oUIBlock.GetAdditionalCSSClassesAsString() or oUIBlock.GetDataAttributes() or oUIBlock.IsHidden() or oUIBlock.HasForcedDiv()) %} -{% block iboContentBlockContainer %} - {% if bHasDiv %} -
{% endif %} - {% for oSubBlock in oUIBlock.GetSubBlocks() %} {{ render_block(oSubBlock, {aPage: aPage}) }} {% endfor %} - {% if bHasDiv %}
{% endif %} -{% endblock %} \ No newline at end of file +{% apply spaceless %} + + {# Important: We don't want the UIContentBlock have a div node based on the inherited CSS classes, otherwise the node would always be present, which is not what we want #} + {% set bHasDiv = (oUIBlock.GetAdditionalCSSClassesAsString() or oUIBlock.GetDataAttributes() or oUIBlock.IsHidden() or oUIBlock.HasForcedDiv()) %} + + {% block iboContentBlockContainer %} + {% if bHasDiv %} +
{% endif %} + {% for oSubBlock in oUIBlock.GetSubBlocks() %} {{ render_block(oSubBlock, {aPage: aPage}) }} {% endfor %} + {% if bHasDiv %}
{% endif %} + + {% endblock %} +{% endapply %} \ No newline at end of file diff --git a/templates/base/layouts/dashboard/column/layout.html.twig b/templates/base/layouts/dashboard/column/layout.html.twig index f2556faee..376d9ebdc 100644 --- a/templates/base/layouts/dashboard/column/layout.html.twig +++ b/templates/base/layouts/dashboard/column/layout.html.twig @@ -1,20 +1,22 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Dashboard Column #} -{% if oUIBlock.IsEditMode() %} - {% if oUIBlock.IsLastRow() %} - {% set sCellClass = "layout_cell edit_mode layout_extension" %} +{% apply spaceless %} + {% if oUIBlock.IsEditMode() %} + {% if oUIBlock.IsLastRow() %} + {% set sCellClass = "layout_cell edit_mode layout_extension" %} + {% else %} + {% set sCellClass = "layout_cell edit_mode" %} + {% endif %} {% else %} - {% set sCellClass = "layout_cell edit_mode" %} + {% set sCellClass = "dashboard" %} {% endif %} -{% else %} - {% set sCellClass = "dashboard" %} -{% endif %} -
- {% for oSubBlock in oUIBlock.GetSubBlocks() %} - {{- render_block(oSubBlock, {aPage: aPage}) -}} - {% endfor %} -
\ No newline at end of file +
+ {% for oSubBlock in oUIBlock.GetSubBlocks() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %} +
+{% endapply %} \ No newline at end of file diff --git a/templates/base/layouts/dashboard/layout.html.twig b/templates/base/layouts/dashboard/layout.html.twig index b99471791..b61727439 100644 --- a/templates/base/layouts/dashboard/layout.html.twig +++ b/templates/base/layouts/dashboard/layout.html.twig @@ -1,14 +1,16 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Dashboard Layout #} -{% if oUIBlock.HasTitle() or oUIBlock.HasToolbar() %} -
-
{{ oUIBlock.GetTitle() }}
- {{ render_block(oUIBlock.GetToolbar(), {aPage: aPage}) }} +{% apply spaceless %} + {% if oUIBlock.HasTitle() or oUIBlock.HasToolbar() %} +
+
{{ oUIBlock.GetTitle() }}
+ {{ render_block(oUIBlock.GetToolbar(), {aPage: aPage}) }} +
+ {% endif %} +
+ {% for oSubBlock in oUIBlock.GetDashboardRows() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %}
-{% endif %} -
- {% for oSubBlock in oUIBlock.GetDashboardRows() %} - {{ render_block(oSubBlock, {aPage: aPage}) }} - {% endfor %} -
\ No newline at end of file +{% endapply %} \ No newline at end of file diff --git a/templates/base/layouts/dashboard/row/layout.html.twig b/templates/base/layouts/dashboard/row/layout.html.twig index 56be4575c..7340fa1de 100644 --- a/templates/base/layouts/dashboard/row/layout.html.twig +++ b/templates/base/layouts/dashboard/row/layout.html.twig @@ -1,8 +1,10 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Dashboard Row #} -
- {% for oSubBlock in oUIBlock.GetSubBlocks() %} - {{- render_block(oSubBlock, {aPage: aPage}) -}} - {% endfor %} -
\ No newline at end of file +{% apply spaceless %} +
+ {% for oSubBlock in oUIBlock.GetSubBlocks() %} + {{ render_block(oSubBlock, {aPage: aPage}) }} + {% endfor %} +
+{% endapply %} \ No newline at end of file diff --git a/templates/datamodel/ActionEmail/email-notification-preview.html.twig b/templates/datamodel/ActionEmail/email-notification-preview.html.twig index c1eca9964..717659f6b 100644 --- a/templates/datamodel/ActionEmail/email-notification-preview.html.twig +++ b/templates/datamodel/ActionEmail/email-notification-preview.html.twig @@ -1,3 +1,4 @@ +{% apply spaceless %} {% UIAlert ForWarning{sTitle:'', sContent: '', sId: null} %}
@@ -8,4 +9,5 @@ {% EndUIAlert %}
-
\ No newline at end of file +
+{% endapply %} \ No newline at end of file diff --git a/templates/pages/backoffice/ajaxpage/layout.html.twig b/templates/pages/backoffice/ajaxpage/layout.html.twig index 25f4c18be..17ab28b70 100644 --- a/templates/pages/backoffice/ajaxpage/layout.html.twig +++ b/templates/pages/backoffice/ajaxpage/layout.html.twig @@ -1,202 +1,214 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -{% set sId = oLayout.GetId() | sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) %} -{% set bHasOnInitOrOnDomReadyScripts = aPage.aJsInlineOnInit is not empty or aPage.aJsInlineOnDomReady is not empty %} -{% if bEscapeContent %} - {{- render_block(oLayout, {aPage: aPage})|escape -}} -{% else %} - {{- render_block(oLayout, {aPage: aPage}) -}} -{% endif %} -{% block iboPageJsInlineEarly %} - {% for sJsInline in aPage.aJsInlineEarly %} - {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #} - - {% endfor %} -{% endblock %} -{% block iboPageJsInlineLive %} - {% for sJsInline in aPage.aJsInlineLive %} - {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #} - - {% endfor %} -{% endblock %} -{% if bHasOnInitOrOnDomReadyScripts %} - -{% endif %} -{% set sPromiseId = aPage.sPromiseId %} -{% if aPage.aJsFiles is not empty %} - {% block iboPageJsFiles %} + + {% endfor %} + {% endblock %} + + {% block iboPageJsInlineLive %} + {% for sJsInline in aPage.aJsInlineLive %} + {# We put each scripts in a dedicated script tag to prevent massive failure if 1 script is broken (eg. missing semi-colon or non closed multi-line comment) #} + + {% endfor %} + {% endblock %} + + {% if bHasOnInitOrOnDomReadyScripts %} - {% endblock %} -{% else %} - {% if bHasOnInitOrOnDomReadyScripts %} - {% block iboPageJsInlineOnDomReady %} + {% endif %} + + {% set sPromiseId = aPage.sPromiseId %} + {% if aPage.aJsFiles is not empty %} + {% block iboPageJsFiles %} {% endblock %} + {% else %} + {% if bHasOnInitOrOnDomReadyScripts %} + {% block iboPageJsInlineOnDomReady %} + + {% endblock %} + {% endif %} {% endif %} -{% endif %} -{% if aDeferredBlocks is not empty %} - {% for oBlock in aDeferredBlocks %} - {{- render_block(oBlock, {aPage: aPage})|raw -}} - {% endfor %} -{% endif %} -{% if sDeferredContent %} - -{% endif %} -{% block iboPageCssFiles %} - {% if aPage.aCssFiles is not empty %} + + {% if aDeferredBlocks is not empty %} + {% for oBlock in aDeferredBlocks %} + {{ render_block(oBlock, {aPage: aPage})|raw }} + {% endfor %} + {% endif %} + + {% if sDeferredContent %} {% endif %} -{% endblock %} -{{- aPage.sCapturedOutput|raw -}} \ No newline at end of file + + {% block iboPageCssFiles %} + {% if aPage.aCssFiles is not empty %} + + {% endif %} + {% endblock %} + + {{ aPage.sCapturedOutput|raw }} + +{% endapply %} \ No newline at end of file diff --git a/templates/pages/backoffice/clilikewebpage/layout.html.twig b/templates/pages/backoffice/clilikewebpage/layout.html.twig index 37eaea827..65531fdc2 100644 --- a/templates/pages/backoffice/clilikewebpage/layout.html.twig +++ b/templates/pages/backoffice/clilikewebpage/layout.html.twig @@ -1,3 +1,5 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -{{ render_block(oLayout, {aPage: aPage}) }} \ No newline at end of file +{% apply spaceless %} + {{ render_block(oLayout, {aPage: aPage}) }} +{% endapply %} \ No newline at end of file diff --git a/templates/pages/backoffice/extension-blocks/banner.html.twig b/templates/pages/backoffice/extension-blocks/banner.html.twig index cded4991f..e1969b8aa 100644 --- a/templates/pages/backoffice/extension-blocks/banner.html.twig +++ b/templates/pages/backoffice/extension-blocks/banner.html.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} -
- {{- render_block(aLayouts.oBanner, {aPage: aPage}) -}} -
\ No newline at end of file +{% apply spaceless %} +
+ {{ render_block(aLayouts.oBanner, {aPage: aPage}) }} +
+{% endapply %} \ No newline at end of file diff --git a/templates/pages/backoffice/extension-blocks/footer.html.twig b/templates/pages/backoffice/extension-blocks/footer.html.twig index b36def948..433b97917 100644 --- a/templates/pages/backoffice/extension-blocks/footer.html.twig +++ b/templates/pages/backoffice/extension-blocks/footer.html.twig @@ -1,5 +1,9 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} - \ No newline at end of file +{% apply spaceless %} + + + +{% endapply %} \ No newline at end of file diff --git a/templates/pages/backoffice/extension-blocks/header.html.twig b/templates/pages/backoffice/extension-blocks/header.html.twig index bc776eeb8..f25dffedb 100644 --- a/templates/pages/backoffice/extension-blocks/header.html.twig +++ b/templates/pages/backoffice/extension-blocks/header.html.twig @@ -1,5 +1,7 @@ {# @copyright Copyright (C) 2010-2024 Combodo SAS #} {# @license http://opensource.org/licenses/AGPL-3.0 #} +{% apply spaceless %}
- {{- render_block(aLayouts.oHeader, {aPage: aPage}) -}} -
\ No newline at end of file + {{ render_block(aLayouts.oHeader, {aPage: aPage}) }} +
+{% endapply %} \ No newline at end of file