templates/partials/layout/_page_header.html.twig line 1

Open in your IDE?
  1. <div class="row align-items-center">
  2.     <div class="col"><h1 class="mb-0">{{ block('title') }}</h1></div>
  3.     {% if list_actions is defined %}
  4.         <div class="col-auto">
  5.             <div class="row row-sm row-sm-h">
  6.                 {% for action in list_actions %}
  7.                     <div class="col-auto">
  8.                         {% set class = action.custom_class is defined ? ' ' ~ action.custom_class : '' %}
  9.                         {% if action.type is defined %}
  10.                             {% if action.type == 'add' %}
  11.                                 {% set class = class ~ " btn btn-lg btn-icon btn-tertiary rounded-circle" %}
  12.                             {% elseif action.type == 'return' %}
  13.                                 {% set class = class ~ " link text-white text-hover-tertiary" %}
  14.                             {% endif %}
  15.                         {% endif %}
  16.                         <a href="{{ action.path }}" class="{{ class }}"
  17.                             {% if action.link_attributes_custom is defined %}
  18.                                 {% for key, value in action.link_attributes_custom %}
  19.                                     {{ key }}="{{ value }}"
  20.                                 {% endfor %}
  21.                             {% endif %}
  22.                         >
  23.                             {% if action.icon is defined %}<i class="mai{{ action.title is defined ? ' me-2' : '' }}">{{ action.icon }}</i>{% endif %}{{ action.title is defined ? action.title : '' }}
  24.                         </a>
  25.                     </div>
  26.                 {% endfor %}
  27.             </div>
  28.         </div>
  29.     {% endif %}
  30. </div>