Show More
@@ -19,7 +19,6 b'' | |||
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | |
|
22 | from rhodecode.apps.admin.navigation import NavigationRegistry | |
|
23 | 22 | from rhodecode.apps._base import ADMIN_PREFIX |
|
24 | 23 | from rhodecode.lib.utils2 import str2bool |
|
25 | 24 | |
@@ -310,12 +309,10 b' def admin_routes(config):' | |||
|
310 | 309 | |
|
311 | 310 | |
|
312 | 311 | def includeme(config): |
|
313 | settings = config.get_settings() | |
|
312 | from rhodecode.apps.admin.navigation import includeme as nav_includeme | |
|
314 | 313 | |
|
315 | 314 | # Create admin navigation registry and add it to the pyramid registry. |
|
316 | labs_active = str2bool(settings.get('labs_settings_active', False)) | |
|
317 | navigation_registry = NavigationRegistry(labs_active=labs_active) | |
|
318 | config.registry.registerUtility(navigation_registry) | |
|
315 | nav_includeme(config) | |
|
319 | 316 | |
|
320 | 317 | # main admin routes |
|
321 | 318 | config.add_route(name='admin_home', pattern=ADMIN_PREFIX) |
@@ -26,6 +26,7 b' from zope.interface import implementer' | |||
|
26 | 26 | |
|
27 | 27 | from rhodecode.apps.admin.interfaces import IAdminNavigationRegistry |
|
28 | 28 | from rhodecode.lib.utils import get_registry |
|
29 | from rhodecode.lib.utils2 import str2bool | |
|
29 | 30 | from rhodecode.translation import _ |
|
30 | 31 | |
|
31 | 32 | |
@@ -137,3 +138,11 b' def navigation_list(request):' | |||
|
137 | 138 | Helper that returns the admin navigation as list of NavListEntry objects. |
|
138 | 139 | """ |
|
139 | 140 | return navigation_registry(request).get_navlist(request) |
|
141 | ||
|
142 | ||
|
143 | def includeme(config): | |
|
144 | # Create admin navigation registry and add it to the pyramid registry. | |
|
145 | settings = config.get_settings() | |
|
146 | labs_active = str2bool(settings.get('labs_settings_active', False)) | |
|
147 | navigation_registry = NavigationRegistry(labs_active=labs_active) | |
|
148 | config.registry.registerUtility(navigation_registry) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now