Admin Configuration
*******************

.. important::

    All of the settings in this section manipulate the admin section of the
    sidebar.

    However, by default, the admin sidebar section is only shown on
    `Django Admin pages <https://docs.djangoproject.com/en/dev/ref/contrib/admin/>`_
    . If you would like to change this behavior so that the admin sidebar
    section is available on all pages, please see the
    :ref:`configuration/menu:ADMINLTE2_INCLUDE_ADMIN_NAV_ON_MAIN_PAGES` section for
    more information.


ADMINLTE2_INCLUDE_ADMIN_HOME_LINK
=================================

By default, the admin menu sidebar will not have a link to the admin index page.
If you would like to append a link to the admin index page in the sidebar,
set this value to ``True``.

.. note::

    In essence, this is another admin link and as such will be treated like
    all other admin links. If you do not see this link in your sidebar after
    enabling, please refer to the
    :ref:`configuration/menu:ADMINLTE2_INCLUDE_ADMIN_NAV_ON_MAIN_PAGES`
    setting for more information.

:Type: ``bool``
:Default: ``False``

Example::

    ADMINLTE2_INCLUDE_ADMIN_HOME_LINK = {True|False}


ADMINLTE2_ADMIN_INDEX_USE_APP_LIST
==================================

By default, Django-AdminLTE2-PDQ will put the Apps on the Admin Index page
into AdminLTE Info Boxes. Setting this to ``True`` will change that look
to the traditional Django list view, but still within the main AdminLTE site
styling.

.. note::

    If you do not see a link for the admin index page in the sidebar, please
    refer to the :ref:`configuration/admin:ADMINLTE2_INCLUDE_ADMIN_HOME_LINK`
    setting for information on how to enable it.

:Type: ``bool``
:Default: ``False``

Example::

    ADMINLTE2_ADMIN_INDEX_USE_APP_LIST = {True|False}


ADMINLTE2_ADMIN_MENU_IN_TREE
============================

When displaying the admin menu on the navigation sidebar, it will render a root
entry for each app in the project. Each of these entries will be a
:ref:`menu/building_blocks:tree` that can be collapsed and expanded to reveal
entries for the models in that app.

Additionally, the entire admin sidebar section can be grouped into a single,
larger tree, which will allow the entire admin menu section to be collapsible.
To enable this "larger tree" behavior, set this value to ``True``.

:Type: ``bool``
:Default: ``False``

Example::

    ADMINLTE2_ADMIN_MENU_IN_TREE = {True|False}


ADMINLTE2_ADMIN_CONTROL_SIDEBAR_TABS
====================================

This setting controls the visibility of sections and tabs for the
:ref:`menu/admin:admin tri-cog` page element. Since the control sidebar can
contain between zero and three sections/tabs, this single setting controls the
visibility of all three of those tabs.

The main setting is called ``ADMINLTE2_ADMIN_CONTROL_SIDEBAR_TABS``, which is
a dictionary of additional sub-settings. Each of which will either turn on or
off one of the tabs in the sidebar.

The additional sub-settings consist of:

* ``SHOW_RECENT_ACTIVITY_TAB`` - Shows the "Recent Activity" section of the
  admin.
* ``SHOW_SETTINGS_TAB`` - A good place for any admin-related additional
  settings.
* ``SHOW_EXTRA_TABS`` - An extra tab for whatever else you might need.

The **RECENT_ACTIVITY_TAB** content is automatically generated by the admin.
The content for the other optional tabs must be created by overriding some of
the templates that come with this package. The templates that you would need to
look at and potentially override are:

* ``admin/partials/_control_sidebar.html``
* ``admin/partials/_control_sidebar/_tabs.html``
* ``admin/partials/_control_sidebar/_recent_activity_tab_pane.html``
* ``admin/partials/_control_sidebar/_settings_tab_pane.html``
* ``admin/partials/_control_sidebar/_extra_tab_panes.html``

See the project
`GitHub files <https://github.com/DJBarnes/django-adminlte2-pdq/tree/master/adminlte2_pdq/templates>`_
for the current implementation.


:Type: ``dict``
:Default: ``{'SHOW_RECENT_ACTIVITY_TAB': True,}``

Example::

    ADMINLTE2_ADMIN_CONTROL_SIDEBAR_TABS = {
        'SHOW_RECENT_ACTIVITY_TAB': {True|False},
        'SHOW_SETTINGS_TAB': {True|False},
        'SHOW_EXTRA_TABS': {True|False},
    }
