35 lines
1.1 KiB
Twig
35 lines
1.1 KiB
Twig
{% extends 'base.html.twig' %}
|
|
{% import "macros/widgets.html.twig" as widgets %}
|
|
|
|
{% block page_title %}{{ 'dashboard.title'|trans }}{% endblock %}
|
|
{% block page_subtitle %}{{ 'dashboard.subtitle'|trans }}{% endblock %}
|
|
|
|
{% block page_content_class %}{{ parent() }} dashboard{% endblock %}
|
|
|
|
{% block main %}
|
|
|
|
{% for row in widget_rows %}
|
|
{% if row.title %}
|
|
{{ widgets.page_header(row.title) }}
|
|
{% endif %}
|
|
|
|
{% set width = row.widgets|length %}
|
|
{% set rawWidth = 12 / width %}
|
|
{% set columnWidth = rawWidth|round(0, 'floor') %}
|
|
<div class="row">
|
|
{% for widgetTemplate in row.widgets %}
|
|
<div class="col-md-{{ columnWidth }} col-sm-{{ columnWidth * 2 }} col-xs-{{ columnWidth * 4 }}">
|
|
{{
|
|
include(
|
|
template_from_string(
|
|
'{% import "macros/widgets.html.twig" as widgets %}' ~ widgetTemplate
|
|
)
|
|
)
|
|
}}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|