Add delete inventory item endpoint and enhance breadcrumb template with save/delete buttons
This commit is contained in:
parent
a3c069a126
commit
ebd2060fd8
3 changed files with 77 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
{% import "fragments/_icon_fragment.html" as icons %}
|
||||
|
||||
{% macro breadcrumb_header(breadcrumbs=[], title=None, submit_button=False) %}
|
||||
{% macro breadcrumb_header(breadcrumbs=[], title=None, save_button=False, delete_button=False) %}
|
||||
<!-- Breadcrumb Fragment -->
|
||||
|
||||
<nav class="row d-flex mb-3 justify-content-between">
|
||||
|
@ -25,10 +25,17 @@
|
|||
{% endif %}
|
||||
</ol>
|
||||
</div>
|
||||
{% if submit_button %}
|
||||
<div class="col text-end">
|
||||
<button type="submit" class="btn btn-primary" id="saveButton">Save</button>
|
||||
</div>
|
||||
{% if save_button or delete_button %}
|
||||
<div class="col text-end">
|
||||
<div class="btn-group">
|
||||
{% if save_button %}
|
||||
<button type="submit" class="btn btn-primary" id="saveButton">{{ icons.render_icon('floppy', 16) }}</button>
|
||||
{% endif %}
|
||||
{% if delete_button %}
|
||||
<button type="submit" class="btn btn-danger" id="deleteButton">{{ icons.render_icon('trash', 16) }}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endmacro %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue