pm-4.1.x-dev/templates/pm-dashboard.html.twig

templates/pm-dashboard.html.twig
{% set first_col = [] %}
{% set second_col = [] %}
{% for item in items %}
  {% set panel %}
    <div class="panel">
      <h3 class="panel__title">{{ item.label }}</h3>
      <div class="panel__content">
        <dl class="admin-list--panel admin-list">
          {% for sub_item in item.items %}
            <div class="admin-item">
              <a href="{{ sub_item.link.url }}" title="Configure default user account settings, including fields, registration requirements, and email messages." class="admin-item__link">{{ sub_item.link.label }}</a>
              <dt class="admin-item__title">{{ sub_item.label }}</dt>
              <dd class="admin-item__description">{{ sub_item.description }}</dd>
            </div>
          {% endfor %}
        </dl>
      </div>
    </div>
  {% endset %}
  {% if loop.index is odd %}
    {% set first_col = first_col|merge([{panel: panel}]) %}
  {% else %}
    {% set second_col = second_col|merge([{panel: panel}]) %}
  {% endif %}
{% endfor %}
<div class="layout-row clearfix">
  {% if first_col is not empty %}
    <div class="layout-column layout-column--half">
      {% for item in first_col %}
        {{ item.panel }}
      {% endfor %}
    </div>
  {% endif %}
  {% if second_col is not empty %}
    <div class="layout-column layout-column--half">
      {% for item in second_col %}
        {{ item.panel }}
      {% endfor %}
    </div>
  {% endif %}

</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc