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>
|
||||
</li>
|
||||
{% 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>
|
||||
|
||||
{% if is_granted('@parts.read') %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue