diff --git a/HISTORY.rst b/HISTORY.rst index e90ce46bff..723055927d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -82,6 +82,8 @@ cabinet create permission or the cabinet view permission for any cabinet. - Update forum link in the about menu. +- Only show the settings namespace list link where it is + relevant. 3.0.1 (2018-07-08) ================= diff --git a/mayan/apps/smart_settings/apps.py b/mayan/apps/smart_settings/apps.py index ee6eefee74..465b185c49 100644 --- a/mayan/apps/smart_settings/apps.py +++ b/mayan/apps/smart_settings/apps.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ -from common import MayanAppConfig, menu_secondary, menu_setup, menu_object +from common import MayanAppConfig, menu_sidebar, menu_setup, menu_object from navigation import SourceColumn from .classes import Namespace, Setting @@ -43,7 +43,11 @@ class SmartSettingsApp(MayanAppConfig): menu_object.bind_links( links=(link_setting_edit,), sources=(Setting,) ) - menu_secondary.bind_links(links=(link_namespace_root_list,)) + menu_sidebar.bind_links( + links=(link_namespace_root_list,), sources=( + Namespace, Setting, 'settings:namespace_list', + ) + ) menu_setup.bind_links(links=(link_namespace_list,)) Setting.save_last_known_good() diff --git a/mayan/apps/smart_settings/views.py b/mayan/apps/smart_settings/views.py index 73f34515be..527b843d47 100644 --- a/mayan/apps/smart_settings/views.py +++ b/mayan/apps/smart_settings/views.py @@ -29,6 +29,7 @@ class NamespaceDetailView(SingleObjectListView): def get_extra_context(self): return { 'hide_object': True, + 'object': self.get_namespace(), 'title': _('Settings in namespace: %s') % self.get_namespace(), } @@ -59,6 +60,7 @@ class SettingEditView(FormView): def get_extra_context(self): return { 'hide_link': True, + 'object': self.get_object(), 'title': _('Edit setting: %s') % self.get_object(), }