{% extends "part/part_base.html" %} {% load static %} {% block details %} {% include 'part/tabs.html' with tab='stock' %}

Part Stock

{% endblock %} {% block js_load %} {{ block.super }} {% endblock %} {% block js_ready %} {{ block.super }} $('#add-stock-item').click(function () { launchModalForm("#modal-form", "{% url 'stock-item-create' %}", { reload: true, data: { part: {{ part.id }} } }); }); $("#stock-table").bootstrapTable({ sortable: true, search: true, queryParams: function(p) { return { part: {{ part.id }}, in_stock: true, } }, columns: [ { field: 'pk', title: 'ID', visible: false, }, { checkbox: true, }, { field: 'location', title: 'Location', sortable: true, formatter: function(value, row, index, field){ return renderLink(value.pathstring, value.url); } }, { field: 'quantity', title: 'Stock', searchable: false, sortable: true, } ], url: "{% url 'api-stock-list' %}" }); {% endblock %}