Allow to add a part to a project from a parts info page

This commit is contained in:
Jan Böhmer 2022-12-29 13:15:26 +01:00
parent 15677937a2
commit 3f82d0967a
4 changed files with 42 additions and 10 deletions

View file

@ -25,6 +25,11 @@
{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</table>
<a class="btn btn-success" {% if not is_granted('@devices.edit') %}disabled{% endif %}
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.requestUri}) }}">
<i class="fa-solid fa-magnifying-glass-plus fa-fw"></i>
{% trans %}part.info.add_part_to_project{% endtrans %}
</a>

View file

@ -51,4 +51,10 @@
</div>
</form>
{{ dropdown.profile_dropdown('part', part.id) }}
{{ dropdown.profile_dropdown('part', part.id) }}
<a class="btn btn-success mt-2" {% if not is_granted('@devices.edit') %}disabled{% endif %}
href="{{ path('project_add_parts_no_id', {"parts": part.id, "_redirect": app.request.requestUri}) }}">
<i class="fa-solid fa-magnifying-glass-plus fa-fw"></i>
{% trans %}part.info.add_part_to_project{% endtrans %}
</a>