You are here

draggable-dashboard-view.html.twig in Draggable dashboard 8

Same filename and directory in other branches
  1. 8.2 templates/draggable-dashboard-view.html.twig
<div class="draggable-dashboard" data-id="{{ dashboard.id }}">
{% set column_num = columns|length %}
  {% for column in columns %}
      <div class="draggable-dashboard-column col-{{ 12 / column_num }}" id="column-{{ loop.index }}" data-id="{{ loop.index }}">
          {% for block in column %}
              <div class="draggable-dashboard-block" id="block-{{ block.id }}" data-id="{{ block.id }}">
                <div class="draggable-dashboard-block__header">
                  <h2>{{ block.title }}</h2>
                  <div class="draggable-dashboard-block__controls">
                    <button class="draggable-dashboard__icon draggable-dashboard__icon--toggle draggable-dashboard__icon--collapse" title="Collapse" id="draggable-dashboard__icon--toggle"></button>
                    <button class="draggable-dashboard__icon draggable-dashboard__icon--resize draggable-dashboard__icon--maximize" title="Maximize" id="draggable-dashboard__icon--resize"></button>
                  </div>
                </div>
                <div class="draggable-dashboard-block__content">
                  {{ block.view }}
                </div>
              </div>
          {% endfor %}
      </div>
  {% endfor %}
</div>

File

templates/draggable-dashboard-view.html.twig
View source
  1. <div class="draggable-dashboard" data-id="{{ dashboard.id }}">
  2. {% set column_num = columns|length %}
  3. {% for column in columns %}
  4. <div class="draggable-dashboard-column col-{{ 12 / column_num }}" id="column-{{ loop.index }}" data-id="{{ loop.index }}">
  5. {% for block in column %}
  6. <div class="draggable-dashboard-block" id="block-{{ block.id }}" data-id="{{ block.id }}">
  7. <div class="draggable-dashboard-block__header">
  8. <h2>{{ block.title }}</h2>
  9. <div class="draggable-dashboard-block__controls">
  10. <button class="draggable-dashboard__icon draggable-dashboard__icon--toggle draggable-dashboard__icon--collapse" title="Collapse" id="draggable-dashboard__icon--toggle"></button>
  11. <button class="draggable-dashboard__icon draggable-dashboard__icon--resize draggable-dashboard__icon--maximize" title="Maximize" id="draggable-dashboard__icon--resize"></button>
  12. </div>
  13. </div>
  14. <div class="draggable-dashboard-block__content">
  15. {{ block.view }}
  16. </div>
  17. </div>
  18. {% endfor %}
  19. </div>
  20. {% endfor %}
  21. </div>