mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-08 12:15:02 +02:00
parent
c402ec40a5
commit
b0322b4c03
1 changed files with 35 additions and 6 deletions
|
@ -26,6 +26,35 @@
|
||||||
href="{{ path("scan_dialog") }}">{% trans %}navbar.scanner.link{% endtrans %}</a>
|
href="{{ path("scan_dialog") }}">{% trans %}navbar.scanner.link{% endtrans %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if is_granted("@parts.create") %}
|
||||||
|
{% set show_parts_create_dropdown = is_granted('@info_providers.create_parts') or is_granted('@parts.import') %}
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link d-inline-block {% if show_parts_create_dropdown %}pe-0{% endif %}"
|
||||||
|
href="{{ path("part_new") }}">{% trans %}tree.tools.edit.part{% endtrans %}</a>
|
||||||
|
|
||||||
|
{% if show_parts_create_dropdown %}
|
||||||
|
<a class="nav-link dropdown-toggle d-inline-block ps-0" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
{% if is_granted('@info_providers.create_parts') %}
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item" href="{{ path('info_providers_search') }}">
|
||||||
|
<i class="fa-fw fa-solid fa-cloud-arrow-down"></i>
|
||||||
|
{% trans %}info_providers.search.title{% endtrans %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if is_granted('@parts.import') %}
|
||||||
|
<li><a class="dropdown-item" href="{{ path('parts_import') }}">
|
||||||
|
<i class="fa-fw fa-solid fa-file-import"></i>
|
||||||
|
{% trans %}parts.import.title{% endtrans %}
|
||||||
|
</a></li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% if is_granted('@parts.read') %}
|
{% if is_granted('@parts.read') %}
|
||||||
|
@ -68,14 +97,14 @@
|
||||||
<li role="separator" class="dropdown-divider"></li>
|
<li role="separator" class="dropdown-divider"></li>
|
||||||
|
|
||||||
{% if impersonation_active() %}
|
{% if impersonation_active() %}
|
||||||
<a class="dropdown-item" href="{{ impersonation_exit_path() }}" data-turbo="false" data-turbo-frame="_top">
|
<a class="dropdown-item" href="{{ impersonation_exit_path() }}" data-turbo="false" data-turbo-frame="_top">
|
||||||
<i class="fa fa-turn-up fa-fw" aria-hidden="true"></i> {% trans %}user.stop_impersonation{% endtrans %}
|
<i class="fa fa-turn-up fa-fw" aria-hidden="true"></i> {% trans %}user.stop_impersonation{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a class="dropdown-item" href="{{ path('logout') }}" data-turbo="false" data-turbo-frame="_top">
|
<a class="dropdown-item" href="{{ path('logout') }}" data-turbo="false" data-turbo-frame="_top">
|
||||||
<i class="fa fa-sign-out-alt fa-fw" aria-hidden="true"></i> {% trans %}user.logout{% endtrans %}
|
<i class="fa fa-sign-out-alt fa-fw" aria-hidden="true"></i> {% trans %}user.logout{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="dropdown-item"
|
<a class="dropdown-item"
|
||||||
href="{{ path('login', {'_target_path': app.request.pathinfo | remove_locale_from_path}) }}"
|
href="{{ path('login', {'_target_path': app.request.pathinfo | remove_locale_from_path}) }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue