diff --git a/InvenTree/part/templates/part/category_detail.html b/InvenTree/part/templates/part/category_detail.html
index d7897f8ac8..13b2eadac9 100644
--- a/InvenTree/part/templates/part/category_detail.html
+++ b/InvenTree/part/templates/part/category_detail.html
@@ -17,8 +17,8 @@
{% endif %}
{% if category.has_parts %}
-
Parts
-{% include "part/category_parts.html" with parts=category.parts.all %}
+
{% endif %}
@@ -29,6 +29,7 @@
+
{% include 'modals.html' %}
@@ -40,7 +41,6 @@
{% endblock %}
{% block js_ready %}
- $('#part-list').footable();
$("#edit-category").click(function () {
launchModalForm("#modal-form",
@@ -84,4 +84,11 @@
follow: true
});
});
+
+ {% include "part/category_parts.html" with category=category %}
+
+ $("#get-rows").click( function() {
+ alert($("#part-table").bootstrapTable('getSelections'));
+ });
+
{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/part/templates/part/category_parts.html b/InvenTree/part/templates/part/category_parts.html
index 94d8af8676..ed87b275ee 100644
--- a/InvenTree/part/templates/part/category_parts.html
+++ b/InvenTree/part/templates/part/category_parts.html
@@ -1,24 +1,58 @@
-
-
-
- Part |
- Description |
- Category |
- Stock |
-
-
-
-{% for part in parts %}
-
- {{ part.name }} |
- {{ part.description }} |
-
- {% if part.category %}
- {{ part.category_path }}
+ $("#part-table").bootstrapTable({
+ sortable: true,
+ search: true,
+ sortName: 'description',
+ idField: 'pk',
+ method: 'get',
+ pagination: true,
+ rememberOrder: true,
+ {% if category %}
+ queryParams: function(p) {
+ return {
+ category: {{ category.id }},
+ }
+ },
{% endif %}
- |
- {{ part.total_stock }} |
-
-{% endfor %}
-
-
+ columns: [
+ {
+ checkbox: true,
+ title: 'Select',
+ searchable: false,
+ },
+ {
+ field: 'pk',
+ title: 'ID',
+ visible: false,
+ },
+ {
+ field: 'name',
+ title: 'Part',
+ sortable: true,
+ formatter: function(value, row, index, field) {
+ return renderLink(value, row.url);
+ }
+ },
+ {
+ sortable: true,
+ field: 'description',
+ title: 'Description',
+ },
+ {% if category == None %}
+ {
+ sortable: true,
+ field: 'category_name',
+ title: 'Category',
+ formatter: function(value, row, index, field) {
+ return renderLink(value, row.category_url)
+ }
+ },
+ {% endif %}
+ {
+ field: 'total_stock',
+ title: 'Stock',
+ searchable: false,
+ sortable: true,
+ }
+ ],
+ url: 'http://127.0.0.1:8000/api/part/',
+ });
\ No newline at end of file
diff --git a/InvenTree/part/templates/part/index.html b/InvenTree/part/templates/part/index.html
index 9265ef52ac..65c4ac0ded 100644
--- a/InvenTree/part/templates/part/index.html
+++ b/InvenTree/part/templates/part/index.html
@@ -16,8 +16,7 @@
{% include "part/category_subcategories.html" with children=children %}
{% endif %}
-Parts
-{% include "part/category_parts.html" with parts=parts %}
+