0
0
mirror of https://github.com/kevinpapst/kimai2.git synced 2024-10-31 06:08:11 +00:00
kevinpapst_kimai2/templates/dashboard/index.html.twig

38 lines
966 B
Twig

{% extends 'base.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% block page_class %}dashboard{% endblock %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('chart') }}
{% endblock %}
{% block head %}
{{ parent() }}
{{ encore_entry_script_tags('chart') }}
{% endblock %}
{% block footer %}
{% if 'dashboard' in app.request.attributes.get('_route') %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block main %}
{% if widgets is empty %}
{{ widgets.nothing_found() }}
{% else %}
<div class="row row-deck row-cards">
{% for widget in widgets %}
{% set columnSize = widget.width %}
<div class="col-md-{{ columnSize * 3 }}{% if columnSize <= 2 %} col-sm-{{ columnSize * 6 }}{% endif %}" id="{{ widget.id }}">
{{ render_widget(widget) }}
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}