{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% block page_title %}{{ 'timesheet.title'|trans }}{% endblock %} {% block page_subtitle %}{{ 'timesheet.subtitle'|trans }}{% endblock %} {% block main %} {% if entries.count == 0 %} {{ widgets.callout('warning', 'error.no_entries_found') }} {% endif %} {{ tables.data_table_header({ 'label.date': '', 'label.starttime': '', 'label.endtime': '', 'label.duration': 'hidden-xs', 'label.rate': 'hidden-xs', 'label.activity': 'hidden-xs hidden-sm', 'label.description': 'hidden-xs hidden-sm', 'label.actions': '', }, toolbarForm, {'plus-square': path('timesheet_create')}) }} {% for entry in entries %} {{ entry.begin|date(kimai_context.date_1) }} {{ entry.begin|date("H:i") }} {% if entry.end %} {{ entry.end|date("H:i") }} {{ entry.duration|duration }} {{ entry.rate|money(entry.activity.project.customer.currency) }} {% else %} ‐ {{ entry.duration|duration }} ‐ {% endif %} {{ widgets.label_activity(entry.activity) }} {{ entry.description }} {% set actionButtons = {'edit': path('timesheet_edit', {'id' : entry.id, 'page': page})} %} {% if entry.end %} {% if is_granted('start', entry.activity) %} {% set actionButtons = {'repeat': path('timesheet_start', {'id' : entry.activity.id})}|merge(actionButtons) %} {% endif %} {% else %} {% if is_granted('stop', entry) %} {% set actionButtons = {'stop': path('timesheet_stop', {'id' : entry.id})}|merge(actionButtons) %} {% endif %} {% endif %} {% set actionButtons = actionButtons|merge({'trash': path('timesheet_delete', {'id' : entry.id, 'page': page})}) %} {{ widgets.button_group(actionButtons) }} {% endfor %} {{ tables.data_table_footer(entries, 'timesheet_paginated') }} {% endblock %}