{% set showUserColumn = true %} {% set showRateColumn = true %} {% if query.user %} {# this is only triggered, if a user exports from his personal timesheet screen#} {% set showUserColumn = false %} {% set showRateColumn = is_granted('view_rate_own_timesheet') %} {# TODO if exporting via the admin screen, users without view_rate_own_timesheet might still see their own rates, maybe merge view_rate_own_timesheet and view_rate_other_timesheet into a new view_rate permission? #} {% endif %}
{{ 'export.period'|trans }}: {{ query.begin|date_short }} - {{ query.end|date_short }}
{{ 'label.customer'|trans }} | {{ 'label.project'|trans }} | {{ 'label.duration'|trans }} | {% if showRateColumn %}{{ 'label.rate'|trans }} | {% endif %}
{{ customerDuration|duration }} | {% if showRateColumn %}{{ customerRate|money(customerCurrency) }} | {% endif %}||
{{ summary.customer }} | {{ summary.project }} | {{ summary.duration|duration }} | {% if showRateColumn %}{{ summary.rate|money(summary.currency) }} | {% endif %}
{{ customerDuration|duration }} | {% if showRateColumn %}{{ customerRate|money(customerCurrency) }} | {% endif %}
{{ 'label.date'|trans }} | {% if showUserColumn %}{{ 'label.user'|trans }} | {% endif %}{{ 'label.description'|trans }} | {{ 'label.duration'|trans }} | {% if showRateColumn %}{{ 'label.rate'|trans }} | {% endif %}||
{{ entry.begin|date_time }}
{% if entry.end %}
{{ entry.end|date_time }} {% endif %} |
{% if showUserColumn %}
{{ entry.user.displayName }} | {% endif %}
{{ entry.project.customer.name }} - {{ entry.project.name }}{% if entry.activity is not null %} - {{ entry.activity.name }}{% endif %}
{% if entry.description is not empty %}
{{ entry.description|escape|desc2html }} {% endif %} |
{{ entry.duration|duration }} | {% if showRateColumn %}{% if is_granted('view_rate', entry) %} {% set rate = rate + entry.rate %} {{ entry.rate|money(entry.project.customer.currency) }} {% else %} – {% endif %} | {% endif %}||
{% else %} | {% endif %} | {{ duration|duration }} | {% if showRateColumn %}{% if currency is not null %}{{ rate|money(currency) }}{% endif %} | {% endif %}