diff --git a/InvenTree/part/templates/part/attachments.html b/InvenTree/part/templates/part/attachments.html new file mode 100644 index 0000000000..04041dd7b4 --- /dev/null +++ b/InvenTree/part/templates/part/attachments.html @@ -0,0 +1,21 @@ +{% extends "part/part_base.html" %} +{% load static %} + +{% block details %} + +{% include 'part/tabs.html' with tab='attachments' %} + +

Attachments

+ +
+
+ + +
+ +{% endblock %} + +{% block js_ready %} +{{ block.super }} + +{% endblock %} \ No newline at end of file diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index aa9d798bb7..5aee846ebd 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -31,4 +31,7 @@ {% endif %} {% endif %} + + Attachments {% if part.attachments.all|length > 0 %}{{ part.attachments.all|length }}{% endif %} + \ No newline at end of file diff --git a/InvenTree/part/urls.py b/InvenTree/part/urls.py index 96c830f556..2218b7b8a1 100644 --- a/InvenTree/part/urls.py +++ b/InvenTree/part/urls.py @@ -24,6 +24,7 @@ part_detail_urls = [ url(r'^delete/?', views.PartDelete.as_view(), name='part-delete'), url(r'^track/?', views.PartDetail.as_view(template_name='part/track.html'), name='part-track'), url(r'^bom-export/?', views.BomDownload.as_view(), name='bom-export'), + url(r'^attachments/?', views.PartDetail.as_view(template_name='part/attachments.html'), name='part-attachments'), url(r'^bom/?', views.PartDetail.as_view(template_name='part/bom.html'), name='part-bom'), url(r'^build/?', views.PartDetail.as_view(template_name='part/build.html'), name='part-build'), url(r'^stock/?', views.PartDetail.as_view(template_name='part/stock.html'), name='part-stock'),