Files
kimai2/templates/favorite/index.html.twig
Kevin Papst 31a8f887a5 Release 2.58 (#5952)
* bump version
* fix formatting locale reset after embedded controller sub-requests (#5944)
* fix GHSA-c6w6-57jj-62vh
* fix GHSA-m492-gv72-xvxj
* fix GHSA-jr9p-4h4j-6c58
* make sure to only use JS logic to call API endpoints
* fixes GHSA-r8vr-m544-qh4h
* make sure to only use JS logic to call API endpoints
* fix GHSA-rw46-qg69-vg6h
* fix GHSA-pj8j-p4g4-4vw8 - prevent kimai from rendering images via markdown
* fix GHSA-pj8j-p4g4-4vw8 - use a safe network client to prevent SSRF via images
* fix GHSA-xv4r-4885-gwpg
* fix GHSA-pgcc-vfmc-7cw5 - move GET routes to API with POST method to prevent CSRF
* fix tooltip survives page reload
* updated wizard images
* split wizard and password reset subscriber into two classes
* relax upper php limit
* added zizmor workflow scans and apply findings
* user permissions <name>_other_profile  now respect teams
* move all linting steps to new job
* updated docker image version names
* use .env.local for storing APP_SECRET
* improve build order and use given tag as ref for checkout, not default main branch
* improved APP_SECRET handling, see entrypoint.sh
* use local code for building the image for more flexibility, added dockerignore
2026-05-25 15:39:47 +02:00

40 lines
2.3 KiB
Twig

{% set favorites = favorite_timesheets(app.user, 10) %}
{% if favorites|length > 0 %}
{% from 'macros/widgets.html.twig' import label_customer, label_project, label_activity %}
<div class="list-group list-group-flush list-group-hoverable menu">
{% set counter = 0 %}
{% for favorite in favorites %}
{% set entry = favorite.getTimesheet() %}
{% if is_granted('start', entry) and counter < 7 %}
{% set counter = counter + 1 %}
<div class="list-group-item">
<div class="row align-items-center">
<div class="col text-truncate" >
<a class="api-link text-decoration-none text-body d-block" href="#" data-href="{{ path('restart_timesheet', {'id': entry.id}) }}"
data-event="kimai.timesheetStart kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.start.error"
data-msg-success="timesheet.start.success" data-bs-dismiss="modal">
{{ label_activity(entry.activity) }}
<div class="d-block text-truncate">
{{ label_project(entry.project) }}
{{ label_customer(entry.project.customer) }}
</div>
</a>
</div>
<div class="col-auto">
{% if favorite.isFavorite() %}
<a href="{{ path('favorites_timesheets_remove', {'id': favorite.timesheet.id}) }}" data-modal-class="p-0" class="list-group-item-actions show remote-modal-reload">
<i class="text-yellow {{ 'bookmarked'|icon }}"></i>
</a>
{% else %}
<a href="{{ path('favorites_timesheets_add', {'id': favorite.timesheet.id}) }}" data-modal-class="p-0" class="list-group-item-actions remote-modal-reload">
{{ icon('bookmark') }}
</a>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}