{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% import "macros/toolbar.html.twig" as toolbar %} {% block page_title %}{{ 'admin_timesheet.title'|trans }}{% endblock %} {% block page_subtitle %}{{ 'admin_timesheet.subtitle'|trans }}{% endblock %} {% block page_actions %} {% set actions = {'filter': '#collapseTimesheetAdmin'} %} {% if is_granted('export_own_timesheet') %} {% set actions = actions|merge({'download': 'onclick:return exportTimesheet()'}) %} {% endif %} {% set actions = actions|merge({'visibility': '#modal_timesheet_admin'}) %} {% if is_granted('create_other_timesheet') %} {% set actions = actions|merge({'create': path('admin_timesheet_create')}) %} {% endif %} {{ widgets.page_actions(actions) }} {% endblock %} {% block main_before %} {{ toolbar.toolbar(toolbarForm, 'collapseTimesheetAdmin', showFilter) }} {% endblock %} {% block main %} {% if entries.count == 0 %} {{ widgets.callout('warning', 'error.no_entries_found') }} {% else %} {% set columns = {'date': ''} %} {% if not duration_only %} {% set columns = columns|merge({'starttime': 'hidden-xs', 'endtime': 'hidden-xs'}) %} {% endif %} {% set columns = columns|merge({ 'duration': '', 'rate': '', 'customer': 'hidden-xs hidden-sm', 'project': 'hidden-xs hidden-sm', 'activity': 'hidden-xs hidden-sm', 'username': 'hidden-xs', 'description': 'hidden-xs hidden-sm', 'actions': 'alwaysVisible', }) %} {% set tableName = 'timesheet_admin' %} {{ tables.data_table_header(tableName, columns) }} {% for entry in entries %}