diff --git a/InvenTree/templates/InvenTree/settings/mixins/settings.html b/InvenTree/templates/InvenTree/settings/mixins/settings.html new file mode 100644 index 0000000000..9cd34639e8 --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/mixins/settings.html @@ -0,0 +1,14 @@ +{% load i18n %} +{% load plugin_extras %} + +

{% trans "Settings" %}

+{% plugin_settings plugin_key as plugin_settings %} + + + {% include "InvenTree/settings/header.html" %} + + {% for setting in plugin_settings %} + {% include "InvenTree/settings/setting.html" with key=setting%} + {% endfor %} + +
\ No newline at end of file diff --git a/InvenTree/templates/InvenTree/settings/mixins/urls.html b/InvenTree/templates/InvenTree/settings/mixins/urls.html new file mode 100644 index 0000000000..1f317b5dc0 --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/mixins/urls.html @@ -0,0 +1,25 @@ +{% load i18n %} +{% load inventree_extras %} + +

{% trans "URLs" %}

+{% define plugin.base_url as base %} +

{% blocktrans %}The Base-URL for this plugin is {{ base }}.{% endblocktrans %}

+ + + + + + + + + + + {% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %} + + + + + + {% endif %}{% endfor %} + +
{% trans "Name" %}{% trans "URL" %}
{{key}}{{entry.1}}{% trans 'open in new tab' %}
diff --git a/InvenTree/templates/InvenTree/settings/plugin_settings.html b/InvenTree/templates/InvenTree/settings/plugin_settings.html index 4a96e7e2e2..5f7e36e9af 100644 --- a/InvenTree/templates/InvenTree/settings/plugin_settings.html +++ b/InvenTree/templates/InvenTree/settings/plugin_settings.html @@ -77,43 +77,12 @@ {% mixin_enabled plugin 'settings' as settings %} {% if settings %} -

{% trans "Settings" %}

-{% plugin_settings plugin_key as plugin_settings %} - - - {% include "InvenTree/settings/header.html" %} - - {% for setting in plugin_settings %} - {% include "InvenTree/settings/setting.html" with key=setting%} - {% endfor %} - -
+ {% include 'InvenTree/settings/mixins/settings.html' %} {% endif %} {% mixin_enabled plugin 'urls' as urls %} {% if urls %} -

{% trans "URLs" %}

- {% define plugin.base_url as base %} -

{% blocktrans %}The Base-URL for this plugin is {{ base }}.{% endblocktrans %}

- - - - - - - - - - - {% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %} - - - - - - {% endif %}{% endfor %} - -
{% trans "Name" %}{% trans "URL" %}
{{key}}{{entry.1}}{% trans 'open in new tab' %}
+ {% include 'InvenTree/settings/mixins/urls.html' %} {% endif %} {% endblock %}