mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Adds a new InvenTreePluginMixin mixin class for enabling custom plugin rendering on a page
- Any view which needs custom plugin code must implement this mixin - Initially implement for the PartDetail page
This commit is contained in:
@ -397,9 +397,11 @@
|
||||
</div>
|
||||
<table class='table table-condensed table-striped' id='manufacturer-part-table' data-toolbar='#manufacturer-button-toolbar'></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "panel/plugin_panels.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
@ -1083,4 +1085,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
{% include "panel/plugin_javascript.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -58,3 +58,5 @@
|
||||
{% include "sidebar_item.html" with label="part-attachments" text=text icon="fa-paperclip" %}
|
||||
{% trans "Notes" as text %}
|
||||
{% include "sidebar_item.html" with label="part-notes" text=text icon="fa-clipboard" %}
|
||||
|
||||
{% include "panel/plugin_menu_items.html" %}
|
@ -49,7 +49,7 @@ from order.models import PurchaseOrderLineItem
|
||||
|
||||
from InvenTree.views import AjaxView, AjaxCreateView, AjaxUpdateView, AjaxDeleteView
|
||||
from InvenTree.views import QRCodeView
|
||||
from InvenTree.views import InvenTreeRoleMixin
|
||||
from InvenTree.views import InvenTreeRoleMixin, InvenTreePluginMixin
|
||||
|
||||
from InvenTree.helpers import str2bool
|
||||
|
||||
@ -365,7 +365,7 @@ class PartImportAjax(FileManagementAjaxView, PartImport):
|
||||
return PartImport.validate(self, self.steps.current, form, **kwargs)
|
||||
|
||||
|
||||
class PartDetail(InvenTreeRoleMixin, DetailView):
|
||||
class PartDetail(InvenTreeRoleMixin, InvenTreePluginMixin, DetailView):
|
||||
""" Detail view for Part object
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user