2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00
InvenTree/InvenTree/templates/attachment_table.html
Oliver 12fcccb5a6
Fix API endpoint permission for the "AttachmentMixin" class (#3218)
* Fix API endpoint permission for the "AttachmentMixin" class

- Any authenticated user could perform CREATE and UPDATE operations on attachments
- Could be performed via the browsable DRF API
- Could also be performed via the front-end (with some advaned jiggering of OPTIONS code)

* Show or hide buttons depending on the permissions of the user

* Add shortcut for table permission check
2022-06-18 14:48:09 +10:00

26 lines
1017 B
HTML

{% load i18n %}
<div id='attachment-buttons'>
<div class='btn-group' role='group'>
<div class='btn-group' id='multi-attachment-actions'>
<button class='btn btn-primary dropdown-toggle' type='button' data-bs-toggle='dropdown' title='{% trans "Actions" %}'>
<span class='fas fa-tools'></span> <span class='caret'></span>
</button>
<ul class='dropdown-menu'>
<li>
<a class='dropdown-item' href='#' id='multi-attachment-delete' title='{% trans "Delete selected attachments" %}'>
<span class='fas fa-trash-alt icon-red'></span> {% trans "Delete Attachments" %}
</a>
</li>
</ul>
</div>
{% include "filter_list.html" with id="attachments" %}
</div>
</div>
<div class='dropzone' id='attachment-dropzone'>
<table class='table table-striped table-condensed' data-toolbar='#attachment-buttons' id='attachment-table'>
</table>
</div>