* improved dev fixtures with more diversity, more data, better testcases, user avatars #42 * added customer stats to dashboard, fixed column length for 3 widgets #42 * fixed empty alias - display empty message for new user #42 * unified-ui for "new" toolbar icon #42 * use kimai2_ as database prefix #42 * added customer stats to dashboard, fixed column length for 3 widgets #42 * fix long project/customer names in "currently active" navbar flyout" #42 * added services config for dev environment #42 * added command to run unit tests #42 * added command to run integration tests #42 * added command to run code sniffer #42 * added phpcs and phpunit to composer #42 * created tests directory #42 * fixed code sniffer warnings #42 * added function to switch result type from Pagerfanta to QueryBuilder #42 * dramatically reduced database calls by using custom joined query #42 * added command to install kimai dependencies #42 * added dev:reset command #42
28 lines
1019 B
Twig
28 lines
1019 B
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 main %}
|
|
|
|
{% for settings in dashboard_widgets %}
|
|
{% if settings.header %}
|
|
{{ widgets.page_header(settings.header) }}
|
|
{% endif %}
|
|
|
|
{% set width = settings.widgets|length %}
|
|
{% set rawWidth = 12 / width %}
|
|
{% set columnWidth = rawWidth|round(0, 'floor') %}
|
|
<div class="row">
|
|
{% for widgetTemplate in settings.widgets %}
|
|
<div class="col-md-{{ columnWidth }} col-sm-{{ columnWidth * 2 }} col-xs-{{ columnWidth * 4 }}">
|
|
{% set widgetString = '{% import "macros/widgets.html.twig" as widgets %}' ~ widgetTemplate %}
|
|
{{ include(template_from_string(widgetString)) }}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|