mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added links to bom import to project edit and info page
This commit is contained in:
parent
f3449babc1
commit
e550918d7c
3 changed files with 31 additions and 5 deletions
|
@ -51,5 +51,12 @@
|
|||
{% form_theme form.bom_entries with ['form/collection_types_layout.html.twig'] %}
|
||||
{{ form_errors(form.bom_entries) }}
|
||||
{{ form_widget(form.bom_entries) }}
|
||||
{% if entity.id %}
|
||||
<a href="{{ path('project_import_bom', {'id': entity.id}) }}" class="btn btn-secondary mb-2"
|
||||
{% if not is_granted('edit', entity) %}disabled="disabled"{% endif %}>
|
||||
<i class="fa-solid fa-file-import fa-fw"></i>
|
||||
{% trans %}project.edit.bom.import_bom{% endtrans %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -4,8 +4,21 @@
|
|||
|
||||
{{ datatables.datatable(datatable, 'elements/datatables/datatables', 'projects') }}
|
||||
|
||||
<a class="btn btn-success" {% if not is_granted('@projects.edit') %}disabled{% endif %}
|
||||
href="{{ path('project_add_parts', {"id": project.id, "_redirect": app.request.requestUri}) }}">
|
||||
<i class="fa-solid fa-square-plus fa-fw"></i>
|
||||
{% trans %}project.info.bom_add_parts{% endtrans %}
|
||||
</a>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" {% if not is_granted('@projects.edit') %}disabled{% endif %}
|
||||
href="{{ path('project_add_parts', {"id": project.id, "_redirect": app.request.requestUri}) }}">
|
||||
<i class="fa-solid fa-square-plus fa-fw"></i>
|
||||
{% trans %}project.info.bom_add_parts{% endtrans %}
|
||||
</a>
|
||||
<button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ path('project_import_bom', {'id': project.id}) }}" {% if not is_granted('edit', project) %}disabled="disabled"{% endif %}>
|
||||
<i class="fa-solid fa-file-import fa-fw"></i>
|
||||
{% trans %}project.edit.bom.import_bom{% endtrans %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -11181,5 +11181,11 @@ Element 3</target>
|
|||
<target>Import BOM for project</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="sPZbhUL" name="project.edit.bom.import_bom">
|
||||
<segment>
|
||||
<source>project.edit.bom.import_bom</source>
|
||||
<target>Import BOM</target>
|
||||
</segment>
|
||||
</unit>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue