{# Displays title and search form #} {% macro renderTitleAndButtons(pageTitle, buttons) %}
{% if pageTitle is iterable %}
{% for title in pageTitle%} {% if not loop.last %}
{{ title }}
/ {% else %}

{{ title|raw }}

{% endif %} {% endfor %}
{% else %}

{{ pageTitle }}

{% endif %}
{% if buttons is defined %} {% for button in buttons %} {{ button }} {% endfor %} {% endif %}
{% endmacro %} {# Render page scrollable data params: data - tree of current configuration form - form view of active group activeTabName - active tab name activeSubTabName - active subtab name routeName - route name for tabs switch routeParameters - additional route parameters #} {% macro renderScrollData(data, form, activeTabName = false, activeSubTabName = false, routeName = 'oro_config_configuration_system', routeParameters = {}) %} {% import 'OroUIBundle::macros.html.twig' as UI %}
{% if activeSubTabName and form != false %} {{ _self.renderTabs(data, activeTabName, activeSubTabName, routeName, routeParameters) }} {{ _self.renderTabContent(form) }} {% endif %}
{% endmacro %} {# Renders tab navigation item params: data.isActive - Tab is active data.name - Tab name data.title - Tab title data.icon - Tab icon data.url - Tab view url #} {% macro renderTabNavItem(data) %}
  • {% if data.icon is defined and data.icon != '' %}{% endif %} {{ data.title|trans }}
  • {% endmacro %} {# Renders submenu params: data - tree of current configuration activeTabName - Active tab name activeSubTabName - Active subtab name routeName - route name for tabs switch routeParameters - additional route parameters #} {% macro renderTabs(data, activeTabName = false, activeSubTabName = false, routeName = 'oro_config_configuration_system', routeParameters = {}) %}
    #}
    {{ _self.renderCollapseExpandActions('#sidebar-menu-tree') }}
    {% if data is iterable %} {% endif %} {% endmacro %} {# Renders tab form params: form - form view for active tab tree configuration #} {% macro renderTabContent(form) %} {% set data = { 'formErrors': form_errors(form), 'dataBlocks': form_data_blocks(form), 'hiddenData': form_rest(form) } %} {% set data = oro_form_process(data, form) %}
    {% if data.formErrors is defined and data.formErrors | length %}
    {{ data.formErrors|raw }}
    {% endif %} {% for scrollBlock in data.dataBlocks %} {% set accordionId = 'system-configuration-collapse' ~ loop.index %}
    {% if loop.first %}
    {{ _self.renderCollapseExpandActions('#configuration-options-block') }}
    {% endif %} {{ scrollBlock.title|trans }}
    {% if scrollBlock.description is defined and scrollBlock.description != '' %}

    {{ scrollBlock.description|trans }}

    {% endif %} {% for subblock in scrollBlock.subblocks %} {{ _self.renderFieldset(subblock) }} {% endfor %}
    {% endfor %}
    {{ data.hiddenData|raw }}
    {% endmacro %} {# Renders fieldset params: block.title - fieldset label block.description - fieldset description (optional) block.data - fields data block.tooltip - fieldset tooltip (optional) #} {% macro renderFieldset(block) %} {% import 'OroUIBundle::macros.html.twig' as ui %}
    {{ block.title|trans }} {% if block.tooltip is defined and block.tooltip != '' %} {% endif %}
    {% if block.description is defined and block.description != '' %}

    {{ block.description|trans }}

    {% endif %} {% for dataBlock in block.data %} {{ dataBlock|raw }} {% endfor %}
    {% endmacro %} {# Renders 'Expand All' and 'Collapse All' links params: target - CSS selector for accordions container #} {% macro renderCollapseExpandActions(target) %} {% endmacro %}