Revert "N°8579 - remove "spaceless" in twig files"

This reverts commit ee993ef80a.
This commit is contained in:
Anne-Cath
2025-09-03 10:37:26 +02:00
parent 0f39106b56
commit f5cce23bb4
45 changed files with 635 additions and 480 deletions

View File

@@ -1,17 +1,18 @@
<span id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }}{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}"
data-role="ibo-button-group"
{% if oUIBlock.GetDataAttributes() %}
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
data-{{ sName }}="{{ sValue }}"
{% endfor %}
{% endif %}
{% apply spaceless %}
<span id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }}{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}"
data-role="ibo-button-group"
{% if oUIBlock.GetDataAttributes() %}
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
data-{{ sName }}="{{ sValue }}"
{% endfor %}
{% endif %}
>
{% for oButton in oUIBlock.GetButtons() %}
{{- render_block(oButton) -}}
{{ render_block(oButton) }}
{% endfor %}
</span>
{% for oExtraBlock in oUIBlock.GetExtraBlocks() %}
{{- render_block(oExtraBlock) -}}
{% endfor %}
{% for oExtraBlock in oUIBlock.GetExtraBlocks() %}
{{ render_block(oExtraBlock) }}
{% endfor %}
{% endapply %}

View File

@@ -1,31 +1,33 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<div class="ibo-dashlet-badge--body{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" id="{{ oUIBlock.GetId() }}"
data-role="ibo-dashlet-badge--body"
{% if oUIBlock.HasClassDescription() %}
{# Display both class name and description as the name could be truncated if too long #}
data-tooltip-content="{{ '<div class="ibo-dashlet-badge--body--tooltip-title">'|escape }}{{ oUIBlock.GetClassLabel() }}{{ '</div><div class="ibo-dashlet-badge--body--tooltip-description">'|escape }}{{ oUIBlock.GetClassDescription() }}{{ '</div>'|escape }}"
data-tooltip-html-enabled="true"
{% else %}
{# Display only class name as it could be truncated if too long #}
data-tooltip-content="{{ oUIBlock.GetClassLabel() }}"
{% endif %}
{# Delay display to avoid having all tooltips appearing when mouse is just passing through the tabs #}
data-tooltip-show-delay="300">
<div class="ibo-dashlet-badge--icon-container">
{# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #}
<img class="ibo-dashlet-badge--icon" src="{{ oUIBlock.GetClassIconUrl() }}" alt="">
</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>
{% apply spaceless %}
<div class="ibo-dashlet-badge--body{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" id="{{ oUIBlock.GetId() }}"
data-role="ibo-dashlet-badge--body"
{% if oUIBlock.HasClassDescription() %}
{# Display both class name and description as the name could be truncated if too long #}
data-tooltip-content="{{ '<div class="ibo-dashlet-badge--body--tooltip-title">'|escape }}{{ oUIBlock.GetClassLabel() }}{{ '</div><div class="ibo-dashlet-badge--body--tooltip-description">'|escape }}{{ oUIBlock.GetClassDescription() }}{{ '</div>'|escape }}"
data-tooltip-html-enabled="true"
{% else %}
{# Display only class name as it could be truncated if too long #}
data-tooltip-content="{{ oUIBlock.GetClassLabel() }}"
{% endif %}
{# Delay display to avoid having all tooltips appearing when mouse is just passing through the tabs #}
data-tooltip-show-delay="300">
<div class="ibo-dashlet-badge--icon-container">
{# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #}
<img class="ibo-dashlet-badge--icon" src="{{ oUIBlock.GetClassIconUrl() }}" alt="">
</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>
{% endif %}
{% 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>
</div>
{% endapply %}

View File

@@ -1,15 +1,17 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<div id="{{ oUIBlock.GetId() }}" class="ibo-dashlet-header-static {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}" data-role="ibo-dashlet-header-static">
<div class="ibo-dashlet-header-static--body">
{% if oUIBlock.GetIconUrl() is not empty %}
<div class="ibo-dashlet-header-static--icon-container">
{# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #}
<img class="ibo-dashlet-header-static--icon" src="{{ oUIBlock.GetIconUrl()|raw }}" alt="">
</div>
{% endif %}
{% if oUIBlock.GetTitle() is not empty %}
<div class="ibo-dashlet-header-static--title">{{ oUIBlock.GetTitle() }}</div>
{% endif %}
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="ibo-dashlet-header-static {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}" data-role="ibo-dashlet-header-static">
<div class="ibo-dashlet-header-static--body">
{% if oUIBlock.GetIconUrl() is not empty %}
<div class="ibo-dashlet-header-static--icon-container">
{# Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/ #}
<img class="ibo-dashlet-header-static--icon" src="{{ oUIBlock.GetIconUrl()|raw }}" alt="">
</div>
{% endif %}
{% if oUIBlock.GetTitle() is not empty %}
<div class="ibo-dashlet-header-static--title">{{ oUIBlock.GetTitle() }}</div>
{% endif %}
</div>
</div>
</div>
{% endapply %}

View File

@@ -1,6 +1,8 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<div id="{{ oUIBlock.GetId() }}" class="ibo-dashlet-text {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}" data-role="ibo-dashlet-text">
{# |raw filter is ok here as the escaping is already done by the \DashletPlainText class itself #}
{{- oUIBlock.GetText()|raw -}}
</div>
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="ibo-dashlet-text {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}" data-role="ibo-dashlet-text">
{# |raw filter is ok here as the escaping is already done by the \DashletPlainText class itself #}
{{ oUIBlock.GetText()|raw }}
</div>
{% endapply %}

View File

@@ -1,2 +1,5 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
{% endapply %}

View File

@@ -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 %}
</form>

View File

@@ -1,13 +1,15 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<div id="{{ oUIBlock.GetId() }}-container"
class="ibo-input-file-select--container {% if oUIBlock.GetAdditionalCSSClassesAsString() %}{{ oUIBlock.GetAdditionalCSSClassesAsString() }}{% endif %}
{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}">
<label class="ibo-input-file-select">
<input id="{{ oUIBlock.GetId() }}" class="ibo-input-file-select--file-input" type="file" name="{{ oUIBlock.GetName() }}">
<span class="ibo-button ibo-is-regular ibo-is-primary">{{ oUIBlock.GetButtonText() }}</span>
{% if oUIBlock.GetShowFilename() %}
<span id="{{ oUIBlock.GetId() }}-file-name" class="ibo-input-file-select--file-name">{{ oUIBlock.GetFileName() }}</span>
{% endif %}
</label>
</div>
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}-container"
class="ibo-input-file-select--container {% if oUIBlock.GetAdditionalCSSClassesAsString() %}{{ oUIBlock.GetAdditionalCSSClassesAsString() }}{% endif %}
{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}">
<label class="ibo-input-file-select">
<input id="{{ oUIBlock.GetId() }}" class="ibo-input-file-select--file-input" type="file" name="{{ oUIBlock.GetName() }}">
<span class="ibo-button ibo-is-regular ibo-is-primary">{{ oUIBlock.GetButtonText() }}</span>
{% if oUIBlock.GetShowFilename() %}
<span id="{{ oUIBlock.GetId() }}-file-name" class="ibo-input-file-select--file-name">{{ oUIBlock.GetFileName() }}</span>
{% endif %}
</label>
</div>
{% endapply %}

View File

@@ -1,5 +1,6 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }}" data-role="ibo-medallion-icon">
{% if oUIBlock.GetImageUrl() != '' %}
<img class="ibo-medallion-icon--image" src="{{ oUIBlock.GetImageUrl() }}" />
@@ -10,4 +11,5 @@
{% if oUIBlock.GetDescription() != '' %}
<div class="ibo-medallion-icon--description">{{ oUIBlock.GetDescription() }}</div>
{% endif %}
</div>
</div>
{% endapply %}

View File

@@ -1,12 +1,14 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<div id="{{ oUIBlock.GetId() }}" class="ibo-spinner ibo-is-{{ oUIBlock.GetSize() }}
{% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}
{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }}
{{ oUIBlock.GetAdditionalCSSClassesAsString() }}"
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="ibo-spinner ibo-is-{{ oUIBlock.GetSize() }}
{% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}
{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }}
{{ oUIBlock.GetAdditionalCSSClassesAsString() }}"
data-role="ibo-spinner">
<i class="ibo-spinner--icon fas fa-sync-alt fa-spin" aria-hidden="true"></i>
{% if oUIBlock.HasDescription() %}
<div class="ibo-spinner--description"> {{ oUIBlock.GetDescription() }} </div>
{% endif %}
</div>
</div>
{% endapply %}

View File

@@ -1,7 +1,9 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<template id="{{ oUIBlock.GetId() }}" data-role="ibo-template">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{- render_block(oSubBlock, {aPage: aPage}) -}}
{% endfor %}
</template>
{% apply spaceless %}
<template id="{{ oUIBlock.GetId() }}" data-role="ibo-template">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</template>
{% endapply %}

View File

@@ -1,3 +1,5 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{{ oUIBlock.GetText() }}
{% apply spaceless %}
{{ oUIBlock.GetText() }}
{% endapply %}

View File

@@ -1,16 +1,18 @@
<div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.HasIcon() %}ibo-has-icon{% endif %}{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" data-role="ibo-title">
{% if oUIBlock.HasIcon() %}
<div class="ibo-title--icon">
<div class="ibo-title--icon-background ibo-title--icon-background--must-{{ oUIBlock.GetIconCoverMethod() }} ibo-title--icon-level-{{ oUIBlock.GetLevel() }}" style="background-image: url('{{ oUIBlock.GetIconUrl()|raw }}');"></div>
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.HasIcon() %}ibo-has-icon{% endif %}{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" data-role="ibo-title">
{% if oUIBlock.HasIcon() %}
<div class="ibo-title--icon">
<div class="ibo-title--icon-background ibo-title--icon-background--must-{{ oUIBlock.GetIconCoverMethod() }} ibo-title--icon-level-{{ oUIBlock.GetLevel() }}" style="background-image: url('{{ oUIBlock.GetIconUrl()|raw }}');"></div>
</div>
{% endif %}
<div class="ibo-title--content">
{% block iboPageTitleText %}
<h{{ oUIBlock.GetLevel() }} class="ibo-title--text is-size-{{ oUIBlock.GetLevel() + 2 }}">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</h{{ oUIBlock.GetLevel() }}>
{% endblock %}
</div>
{% endif %}
<div class="ibo-title--content">
{% block iboPageTitleText %}
<h{{ oUIBlock.GetLevel() }} class="ibo-title--text is-size-{{ oUIBlock.GetLevel() + 2 }}">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{- render_block(oSubBlock, {aPage: aPage}) -}}
{% endfor %}
</h{{ oUIBlock.GetLevel() }}>
{% endblock %}
</div>
</div>
{% endapply %}

View File

@@ -1,10 +1,14 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{# Toolbar #}
<div id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
data-role="ibo-toolbar">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{- render_block(oSubBlock, {aPage: aPage}) -}}
{% endfor %}
</div>
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
data-role="ibo-toolbar"
>
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</div>
{% endapply %}

View File

@@ -1,8 +1,9 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<span id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }}
{% if oUIBlock.GetAdditionalCSSClassesAsString() %}{{ oUIBlock.GetAdditionalCSSClassesAsString() }}{% endif %}
{% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
data-role="ibo-toolbar-vertical-separator">
</span>
{% apply spaceless %}
<span id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }}
{% if oUIBlock.GetAdditionalCSSClassesAsString() %}{{ oUIBlock.GetAdditionalCSSClassesAsString() }}{% endif %}
{% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
data-role="ibo-toolbar-vertical-separator">
</span>
{% endapply %}

View File

@@ -1,4 +1,6 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
<div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}">
</div>
{% apply spaceless %}
<div id="{{ oUIBlock.GetId() }}" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}">
</div>
{% endapply %}

View File

@@ -32,6 +32,7 @@
</div>
</div>
<div class="ibo-activity-entry--sub-information" data-role="ibo-activity-entry--sub-information">
{% apply spaceless %}
{% block iboActivityEntrySubInformation %}
{% if oUIBlock.GetOrigin() is not null and oUIBlock.GetOrigin != constant('Combodo\\iTop\\Core\\CMDBChange\\CMDBChangeOrigin::INTERACTIVE') %}
<span class="ibo-activity-entry--origin" data-role="ibo-activity-entry--origin" data-tooltip-content="{{ ('Class:CMDBChange/Attribute:origin/Value:' ~ oUIBlock.GetOrigin())|dict_s }}" data-tooltip-placement="bottom">
@@ -47,6 +48,7 @@
data-raw-datetime="{{ oUIBlock.GetRawDateTime() }}"
data-formatted-datetime="{{ oUIBlock.GetFormattedDateTime() }}">{{ oUIBlock.GetFormattedDateTime() }}</span>
{% endblock %}
{% endapply %}
</div>
{% endblock %}
</div>

View File

@@ -1,3 +1,4 @@
{% apply spaceless %}
<form id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsSubmitAutonomous() and (bInitOpened == false) %}ibo-is-closed{% endif %}"
data-role="ibo-caselog-entry-form"
@@ -14,17 +15,17 @@
<div class="ibo-caselog-entry-form--action-buttons--extra-actions"
data-role="ibo-caselog-entry-form--action-buttons--extra-actions">
{% for TextInputActionButton in oUIBlock.GetExtraActionButtons() %}
{{- render_block(TextInputActionButton, {aPage: aPage}) -}}
{{ render_block(TextInputActionButton, {aPage: aPage}) }}
{% endfor %}
</div>
<div class="ibo-caselog-entry-form--action-buttons--main-actions" data-role="ibo-caselog-entry-form--action-buttons--main-actions">
{% for FormActionButton in oUIBlock.GetMainActionButtons() %}
{{- render_block(FormActionButton, {aPage: aPage}) -}}
{{ render_block(FormActionButton, {aPage: aPage}) }}
{% endfor %}
</div>
</div>
<div class="ibo-caselog-entry-form--text-input" data-role="ibo-caselog-entry-form--text-input">
{{- render_block(oUIBlock.GetTextInput(), {aPage: aPage}) -}}
{{ render_block(oUIBlock.GetTextInput(), {aPage: aPage}) }}
</div>
<div class="ibo-caselog-entry-form--extra-inputs" data-role="ibo-caselog-entry-form--extra-inputs">
</div>
@@ -34,4 +35,5 @@
</span>
<span class="ibo-caselog-entry-form--lock-message" data-role="ibo-caselog-entry-form--lock-message"></span>
</div>
</form>
</form>
{% endapply %}

View File

@@ -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 %}
<div id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
{% if oUIBlock.GetDataAttributes() %}
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
data-{{ sName }}="{{ sValue }}"
{% endfor %}
{% endif %}
> {% endif %}
{% for oSubBlock in oUIBlock.GetSubBlocks() %} {{ render_block(oSubBlock, {aPage: aPage}) }} {% endfor %}
{% if bHasDiv %} </div> {% endif %}
{% endblock %}
{% 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 %}
<div id="{{ oUIBlock.GetId() }}"
class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}"
{% if oUIBlock.GetDataAttributes() %}
{% for sName, sValue in oUIBlock.GetDataAttributes() %}
data-{{ sName }}="{{ sValue }}"
{% endfor %}
{% endif %}
> {% endif %}
{% for oSubBlock in oUIBlock.GetSubBlocks() %} {{ render_block(oSubBlock, {aPage: aPage}) }} {% endfor %}
{% if bHasDiv %} </div> {% endif %}
{% endblock %}
{% endapply %}

View File

@@ -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 %}
<div class="ibo-dashboard--grid-column ibo-dashboard--grid-cell {{ sCellClass }}"
data-role="ibo-dashboard--grid-cell"
data-dashboard-grid-column-index="{{ oUIBlock.GetColumnIndex() }}"
data-dashboard-grid-cell-index="{{ oUIBlock.GetCellIndex() }}">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{- render_block(oSubBlock, {aPage: aPage}) -}}
{% endfor %}
</div>
<div class="ibo-dashboard--grid-column ibo-dashboard--grid-cell {{ sCellClass }}"
data-role="ibo-dashboard--grid-cell"
data-dashboard-grid-column-index="{{ oUIBlock.GetColumnIndex() }}"
data-dashboard-grid-cell-index="{{ oUIBlock.GetCellIndex() }}">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</div>
{% endapply %}

View File

@@ -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() %}
<div class="ibo-dashboard--top-bar" data-role="ibo-dashboard--top-bar">
<div class="ibo-dashboard--top-bar-title" data-role="ibo-dashboard--top-bar-title">{{ oUIBlock.GetTitle() }}</div>
{{ render_block(oUIBlock.GetToolbar(), {aPage: aPage}) }}
{% apply spaceless %}
{% if oUIBlock.HasTitle() or oUIBlock.HasToolbar() %}
<div class="ibo-dashboard--top-bar" data-role="ibo-dashboard--top-bar">
<div class="ibo-dashboard--top-bar-title" data-role="ibo-dashboard--top-bar-title">{{ oUIBlock.GetTitle() }}</div>
{{ render_block(oUIBlock.GetToolbar(), {aPage: aPage}) }}
</div>
{% endif %}
<div class="ibo-dashboard--grid" data-role="ibo-dashboard--grid">
{% for oSubBlock in oUIBlock.GetDashboardRows() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</div>
{% endif %}
<div class="ibo-dashboard--grid" data-role="ibo-dashboard--grid">
{% for oSubBlock in oUIBlock.GetDashboardRows() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</div>
{% endapply %}

View File

@@ -1,8 +1,10 @@
{# @copyright Copyright (C) 2010-2024 Combodo SAS #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{# Dashboard Row #}
<div class="ibo-dashboard--grid-row" data-role="ibo-dashboard--grid-row" data-dashboard-grid-row-index="{{ oUIBlock.GetRowIndex() }}">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{- render_block(oSubBlock, {aPage: aPage}) -}}
{% endfor %}
</div>
{% apply spaceless %}
<div class="ibo-dashboard--grid-row" data-role="ibo-dashboard--grid-row" data-dashboard-grid-row-index="{{ oUIBlock.GetRowIndex() }}">
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</div>
{% endapply %}