Only show the settings namespace list link where it is relevant.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -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)
|
||||
=================
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user