{% extends "stock/item_base.html" %} {% load static %} {% load i18n %} {% block details %} {% include "stock/tabs.html" with tab='attachments' %}

{% trans "Stock Item Attachments" %}

{% for attachment in item.attachments.all %} {% endfor %}
{% trans "File" %} {% trans "Comment" %}
{{ attachment.basename }} {{ attachment.comment }}
{% endblock %} {% block js_ready %} {{ block.super }} $("#new-attachment").click(function() { launchModalForm("{% url 'stock-item-attachment-create' %}?item={{ item.id }}", { reload: true, }); }); $("#attachment-table").on('click', '.attachment-edit-button', function() { var button = $(this); launchModalForm(button.attr('url'), { reload: true, }); }); $("#attachment-table").on('click', '.attachment-delete-button', function() { var button = $(this); launchModalForm(button.attr('url'), { success: function() { location.reload(); } }); }); $("#attachment-table").inventreeTable({ }); {% endblock %}