{% extends '@AdminLTE/layout/default-layout.html.twig' %} {% block body_start %} data-title="{{- get_title()|e('html_attr') -}}" {% endblock %} {% block after_body_start %} {% embed 'embeds/modal.html.twig' %} {% block modal_id %}remote_form_modal{% endblock %} {% block modal_title %}{% endblock %} {% block modal_body %}{% endblock %} {% block modal_footer %}{% endblock %} {% endembed %} {% block page_search %}{% endblock %} {% endblock %} {% block page_content_start %} {% if app.session and app.session.started and app.session.flashbag.peekAll|length > 0 %} {% set domain = 'flashmessages' %} {% endif %} {% endblock %} {% block page_content_before %} {% set event = trigger(constant('App\\Event\\ThemeEvent::CONTENT_BEFORE')) %} {{ event.content|raw }}
{% endblock %} {% block page_content_after %} {% block main_after %}{% endblock %} {% set event = trigger(constant('App\\Event\\ThemeEvent::CONTENT_AFTER')) %} {{ event.content|raw }} {% endblock %} {% block page_content %} {% set event = trigger(constant('App\\Event\\ThemeEvent::CONTENT_START')) %} {{ event.content|raw }} {% block main %}{% endblock %} {% set event = trigger(constant('App\\Event\\ThemeEvent::CONTENT_END')) %} {{ event.content|raw }} {% endblock %} {% block title %} {{- get_title() -}} {% endblock %} {% block page_subtitle %}{% endblock %} {% block logo_mini %} {% set mini = config('theme.branding.mini') %} {% if mini is not empty %} {{ mini|raw }} {% else %} KTT {% endif %} {% endblock %} {% block logo_large %} {% set company = config('theme.branding.company') %} {% if company is not empty %} {{ company|raw }} {% else %} Kimai - Time Tracking {% endif %} {% endblock %} {% block footer %} {% endblock %} {# {% block navbar_toggle %} {{ 'Toggle navigation'|trans({}, 'AdminLTEBundle') }} {% if app.user is not null and is_granted('IS_AUTHENTICATED_REMEMBERED') and is_granted('view_own_timesheet') %} {% endif %} {% endblock %} #} {% block navbar_start %} {% if app.user is not null and is_granted('IS_AUTHENTICATED_REMEMBERED') %} {% block navbar_extensions %}{% endblock %} {% if is_granted('create_own_timesheet') %} {% set active_timesheets = active_timesheets(app.user) %} {% set hasActiveRecords = active_timesheets is not empty %} {% if not hasActiveRecords %} {# fake entry, because at least one html template node is needed #} {% set active_timesheets = [{'id': '000', 'begin': create_date('now'), 'activity': {'name': ''}, 'project': {'name': '', 'customer': {'name': ''}}}] %} {% endif %} {% set active_limit = kimai_config.timesheetActiveEntriesHardLimit %} {% endif %} {% endif %} {% endblock %} {# these blocks and the hook-in logic by the AdminTheme could be re-used by Kimai or an extension at some point #} {# {% block navbar_messages %}{% endblock %} {% block navbar_notifications %}{% endblock %} {% block navbar_tasks %}{% endblock %} {% block navbar_end %}{% endblock %} #} {# deactivated blocks, as Kimai does not ship the sidebar for UX reasons #} {% block sidebar_user %}{% endblock %} {% block sidebar_search %}{% endblock %} {% block navbar_user %} {% if app.user is not null and is_granted('IS_AUTHENTICATED_REMEMBERED') %} {% include 'navbar/recent-activities.html.twig' %} {% endif %} {% import "macros/widgets.html.twig" as widgets %}