mirror of
https://github.com/kevinpapst/kimai2.git
synced 2025-03-17 14:32:38 +00:00
190 lines
7.4 KiB
Twig
190 lines
7.4 KiB
Twig
{% extends '@AdminLTE/layout/default-layout.html.twig' %}
|
|
|
|
{% 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 %}
|
|
{% endblock %}
|
|
|
|
{% block page_content_before %}
|
|
{% set event = trigger(constant('App\\Event\\ThemeEvent::CONTENT_BEFORE')) %}
|
|
{{ event.content|raw }}
|
|
<div class="toolbar-pad no-print">
|
|
{% block main_before %}{% endblock %}
|
|
</div>
|
|
{% 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 %}
|
|
{{ 'browser.title'|trans }}
|
|
{% endblock %}
|
|
|
|
{% block page_subtitle %}{% endblock %}
|
|
|
|
{% block logo_mini %}
|
|
<b>K</b>TT
|
|
{% endblock %}
|
|
|
|
{% block logo_large %}
|
|
<b>Kimai</b> - Time Tracking
|
|
{% endblock %}
|
|
|
|
{% block footer %}
|
|
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
|
|
{% endblock %}
|
|
|
|
{% block navbar_messages %}
|
|
{% if app.user is not null and is_granted('IS_AUTHENTICATED_REMEMBERED') %}
|
|
{% if is_granted('view_own_timesheet') %}
|
|
<li class="visible-xs-inline-block">
|
|
<a href="{{ path('timesheet') }}" class="ddt-large">
|
|
<i class="{{ 'timesheet'|icon }} fa-2x"></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('view_invoice') %}
|
|
<li class="visible-xs-inline-block">
|
|
<a href="{{ path('invoice') }}" class="ddt-large">
|
|
<i class="{{ 'invoice'|icon }} fa-2x"></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('view_export') %}
|
|
<li class="visible-xs-inline-block">
|
|
<a href="{{ path('export') }}" class="ddt-large">
|
|
<i class="{{ 'export'|icon }} fa-2x"></i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% block navbar_extensions %}{% endblock %}
|
|
{{ render(controller('App\\Controller\\TimesheetController::activeEntriesAction')) }}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block navbar_notifications %}
|
|
{% if app.user is not null and is_granted('IS_AUTHENTICATED_REMEMBERED') %}
|
|
{{ render(controller('App\\Controller\\NavbarController::recentActivitiesAction')) }}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{# deactivated blocks #}
|
|
{% block navbar_tasks %}{% endblock %}
|
|
{% block sidebar_user %}{% endblock %}
|
|
{% block sidebar_search %}{% endblock %}
|
|
|
|
{% block navbar_user %}
|
|
{% import "macros/widgets.html.twig" as widgets %}
|
|
<li class="dropdown user-menu">
|
|
<a href="#" class="dropdown-toggle ddt-large" data-toggle="dropdown">
|
|
<i class="{{ 'user'|icon }} fa-2x"></i>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
{% if app.user is not null %}
|
|
<li>
|
|
<a href="{{ path('user_profile', {'username' : app.user.username}) }}">
|
|
<h4 class="control-sidebar-subheading">
|
|
<i class="{{ 'profile-stats'|icon }}"></i>
|
|
{{ widgets.username(app.user) }}
|
|
</h4>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_profile_edit', {'username' : app.user.username}) }}">
|
|
<h4 class="control-sidebar-subheading">
|
|
<i class="{{ 'profile'|icon }}"></i>
|
|
{{ 'profile.title'|trans }}
|
|
</h4>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('user_profile_preferences', {'username' : app.user.username}) }}">
|
|
<h4 class="control-sidebar-subheading">
|
|
<i class="{{ 'settings'|icon }}"></i>
|
|
{{ 'profile.preferences'|trans }}
|
|
</h4>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('fos_user_security_logout') }}">
|
|
<h4 class="control-sidebar-subheading">
|
|
<i class="{{ 'logout'|icon }}"></i>
|
|
{{ 'menu.logout'|trans }}
|
|
</h4>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if kimai_context.show_about %}
|
|
<li class="divider"></li>
|
|
<li>
|
|
<a href="{{ path('about') }}">
|
|
<h4 class="control-sidebar-subheading">
|
|
<i class="{{ 'about'|icon }}"></i>
|
|
{{ 'about.title'|trans({}, 'about') }}
|
|
</h4>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</li>
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
{% block page_actions %}{% endblock %}
|
|
{% endblock %}
|
|
|
|
{% block stylesheets %}
|
|
{# we do not call parent() as we use a custom built for the frontend assets and don't want the default <stylesheet> #}
|
|
<link rel="stylesheet" href="{{ asset('build/app.css') }}">
|
|
{% set event = trigger(constant('App\\Event\\ThemeEvent::STYLESHEET')) %}
|
|
{{ event.content|raw }}
|
|
{% endblock %}
|
|
|
|
{% block head %}
|
|
{{ parent() }}
|
|
<script src="{{ asset('build/app.js') }}"></script>
|
|
{% include 'partials/head.html.twig' %}
|
|
{% set event = trigger(constant('App\\Event\\ThemeEvent::HTML_HEAD')) %}
|
|
{{ event.content|raw }}
|
|
{% endblock %}
|
|
|
|
{% block javascripts %}
|
|
{# no call to parent(), as we use a custom built for the frontend assets and don't want the default <script> #}
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$.kimai.init({
|
|
locale: '{{ app.request.locale }}',
|
|
apply: '{{ 'daterangepicker.apply'|trans({}, 'daterangepicker') }}',
|
|
cancel: '{{ 'daterangepicker.cancel'|trans({}, 'daterangepicker') }}',
|
|
today: '{{ 'daterangepicker.today'|trans({}, 'daterangepicker') }}',
|
|
yesterday: '{{ 'daterangepicker.yesterday'|trans({}, 'daterangepicker') }}',
|
|
lastWeek: '{{ 'daterangepicker.lastWeek'|trans({}, 'daterangepicker') }}',
|
|
thisWeek: '{{ 'daterangepicker.thisWeek'|trans({}, 'daterangepicker') }}',
|
|
lastMonth: '{{ 'daterangepicker.lastMonth'|trans({}, 'daterangepicker') }}',
|
|
thisMonth: '{{ 'daterangepicker.thisMonth'|trans({}, 'daterangepicker') }}',
|
|
lastYear: '{{ 'daterangepicker.lastYear'|trans({}, 'daterangepicker') }}',
|
|
thisYear: '{{ 'daterangepicker.thisYear'|trans({}, 'daterangepicker') }}',
|
|
customRange: '{{ 'daterangepicker.customRange'|trans({}, 'daterangepicker') }}',
|
|
twentyFourHours: {{ 'true'|hour24('false') }}
|
|
});
|
|
{# $.kimai.pauseRecord('li.messages-menu ul.menu li'); #}
|
|
});
|
|
</script>
|
|
{% set event = trigger(constant('App\\Event\\ThemeEvent::JAVASCRIPT')) %}
|
|
{{ event.content|raw }}
|
|
{% endblock %}
|