Files
kimai2/templates/partials/user-shortcuts.html.twig
Kevin Papst 02bcd45116 Release 2.5.0 (#4454)
- added command to list users
- corrected wrong german translation
- work contract validations
- prevent error with missing params
- use collapsible, minor UI improvement
- added classes to target menu buttons in custom rules
- disable webpack notifier, incompatible with mac arm
- use explicit menu service to generate menu
- bump to fontawesome 6 and replace restart icon
- change repeat icon for recent activities
- moved user bookmarks (favorites) to top nav
- fix totp seconds window (leeway)
- new migration to fix remaining user preferences with dots in name
- remove duplicate named column in user screen
- unify and added translations
- added missing filter and tags to InvoiceSecurity
2023-12-01 11:38:17 +01:00

37 lines
1.9 KiB
Twig

{% set user_shortcuts = user_shortcuts(app.user) %}
{% if user_shortcuts|length > 0 %}
<div class="nav-item dropdown d-flex me-1 user-shortcuts">
<a class="nav-link px-0 user-shortcuts-toggle" href="javascript:void(0);" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="true">
{{ icon('far fa-bookmark', true) }}
</a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow dropdown-menu-card" data-bs-popper="static">
<div class="card">
<div class="card-header text-nowrap">{{ 'favorite_routes'|trans }}</div>
<div class="card-body user-shortcuts-list scrollable-container p-0 pb-2">
<div class="row overflow-visible g-0">
{% for menu in user_shortcuts %}
{% if not loop.first and loop.index0 % 2 == 0 %}
</div>
<div class="row overflow-visible g-0">
{% endif %}
<div class="text-center pt-3 px-3 col">
<a href="{{ path(menu.route) }}" class="text-decoration-none">
<span class="user-shortcuts-icon rounded-circle mb-2">
<i class="{{ menu.icon|icon }} fs-2"></i>
</span>
</a>
<a href="{{ path(menu.route) }}" class="nav-link">
{{- menu.label|trans -}}
</a>
</div>
{% endfor %}
{% if user_shortcuts|length > 1 and user_shortcuts|length % 2 == 1 %}
<div class="pt-3 px-3 col"></div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endif %}