mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 00:59:34 +00:00
Added permissions for the new functions.
This commit is contained in:
parent
d2bae3a4f2
commit
da14ee942d
14 changed files with 213 additions and 64 deletions
|
|
@ -1,12 +1,13 @@
|
|||
{% set delete_btn %}
|
||||
<button type="button" class="btn btn-danger lot_btn_delete" onclick="delete_lot_entry(this);">
|
||||
<button type="button" class="btn btn-danger lot_btn_delete" onclick="delete_lot_entry(this);"
|
||||
{% if not is_granted('lots.delete', part) %}disabled{% endif %}>
|
||||
<i class="fas fa-trash-alt fa-fw"></i>
|
||||
{% trans %}part_lot.delete{% endtrans %}
|
||||
</button>
|
||||
{% endset %}
|
||||
|
||||
|
||||
<table class="table table-striped table-sm" id="lots_table" data-prototype="{{ form_widget(form.partLots.vars.prototype)|e('html_attr') }}">
|
||||
<table class="table table-striped table-sm" id="lots_table" data-prototype="{% if form.partLots.vars.prototype is defined %}{{ form_widget(form.partLots.vars.prototype)|e('html_attr') }}{% endif %}">
|
||||
<tbody>
|
||||
{% for lot in form.partLots %}
|
||||
<tr>
|
||||
|
|
@ -21,7 +22,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<button type="button" class="btn btn-success" onclick="create_lot_entry(this)">
|
||||
<button type="button" class="btn btn-success" onclick="create_lot_entry(this)"
|
||||
{% if not is_granted('lots.create', part) %}disabled{% endif %}>
|
||||
<i class="fas fa-plus-square fa-fw"></i>
|
||||
{% trans %}part_lot.create{% endtrans %}
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue