Disable "New part" button if a category is marked as not selectable.

Fixes issue #36.
This commit is contained in:
Jan Böhmer 2020-04-06 18:07:23 +02:00
parent e654c46e11
commit a50fec2e8b

View file

@ -1,6 +1,6 @@
<div class="row mb-3">
<div class="col">
<a href="{{ url('part_new', url_options) }}" class="btn btn-success float-left"><i class="fas fa-plus-square fa-fw"></i>
<a href="{{ url('part_new', url_options) }}" class="btn btn-success float-left {% if not is_granted("@parts.create") or entity.notSelectable %}disabled{% endif %}"><i class="fas fa-plus-square fa-fw"></i>
{% trans%}part.create.btn{% endtrans %}</a>
</div>
</div>