diff --git a/docs/docs/assets/images/plugin/panel_with_dropdown.png b/docs/docs/assets/images/plugin/panel_with_dropdown.png new file mode 100644 index 0000000000..75ef0b5680 Binary files /dev/null and b/docs/docs/assets/images/plugin/panel_with_dropdown.png differ diff --git a/docs/docs/extend/plugins/panel.md b/docs/docs/extend/plugins/panel.md index 2eb9c60f1a..3764cb54d4 100644 --- a/docs/docs/extend/plugins/panel.md +++ b/docs/docs/extend/plugins/panel.md @@ -187,14 +187,15 @@ class ExamplePanel(PanelMixin, InvenTreePlugin, UrlsMixin): AUTHOR = "Michael" DESCRIPTION = "This plugin passes user input from the panel to the plugin" -# Create the panel that will display on every view +# Create the panel that will display on build detail view def get_custom_panels(self, view, request): panels = [] - panels.append({ - 'title': 'Example Info', - 'icon': 'fa-industry', - 'content_template': 'example_panel/example.html', - }) + if isinstance(view, BuildDetail): + panels.append({ + 'title': 'Example Info', + 'icon': 'fa-industry', + 'content_template': 'example_panel/example.html', + }) return panels def setup_urls(self): @@ -221,10 +222,10 @@ Now the html template: {% raw %}