{% extends "base.html" %}

{% load i18n %}
{% load static %}
{% load inventree_extras %}
{% load plugin_extras %}

{% block breadcrumb_list %}
{% endblock breadcrumb_list %}

{% block page_title %}
{% inventree_title %} | {% trans "Settings" %}
{% endblock page_title %}

{% block sidebar %}
{% include "InvenTree/settings/sidebar.html" %}
{% endblock sidebar %}

{% block content %}

{% include "InvenTree/settings/user.html" %}
{% include "InvenTree/settings/user_settings.html" %}
{% include "InvenTree/settings/user_display.html" %}
{% include "InvenTree/settings/user_homepage.html" %}
{% include "InvenTree/settings/user_search.html" %}
{% include "InvenTree/settings/user_notifications.html" %}
{% include "InvenTree/settings/user_reporting.html" %}

{% if user.is_staff %}

{% include "InvenTree/settings/global.html" %}
{% include "InvenTree/settings/login.html" %}
{% include "InvenTree/settings/barcode.html" %}
{% include "InvenTree/settings/project_codes.html" %}
{% include "InvenTree/settings/physical_units.html" %}
{% include "InvenTree/settings/notifications.html" %}
{% include "InvenTree/settings/label.html" %}
{% include "InvenTree/settings/report.html" %}
{% include "InvenTree/settings/part.html" %}
{% include "InvenTree/settings/part_parameters.html" %}
{% include "InvenTree/settings/part_stocktake.html" %}
{% include "InvenTree/settings/category.html" %}
{% include "InvenTree/settings/pricing.html" %}
{% include "InvenTree/settings/stock.html" %}
{% include "InvenTree/settings/build.html" %}
{% include "InvenTree/settings/po.html" %}
{% include "InvenTree/settings/so.html" %}
{% include "InvenTree/settings/returns.html" %}

{% include "InvenTree/settings/plugin.html" %}
{% plugin_list as pl_list %}
{% for plugin_key, plugin in pl_list.items %}
    {% if plugin.registered_mixins %}
        {% include "InvenTree/settings/plugin_settings.html" %}
    {% endif %}
{% endfor %}

{% endif %}

{% endblock content %}

{% block js_load %}
{{ block.super }}
{% endblock js_load %}

{% block js_ready %}
{{ block.super }}

{% include "InvenTree/settings/settings_js.html" %}

{% if user.is_staff %}
    {% include "InvenTree/settings/settings_staff_js.html" %}
{% endif %}

enableSidebar('settings');

{% endblock js_ready %}
