diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -2124,3 +2124,15 @@ def get_repo_view_type(request): } return route_to_view_type.get(route_name) + + +def is_active(menu_entry, selected): + """ + Returns active class for selecting menus in templates +
+ """ + if not isinstance(menu_entry, list): + menu_entry = [menu_entry] + + if selected in menu_entry: + return "active" diff --git a/rhodecode/templates/admin/defaults/defaults.mako b/rhodecode/templates/admin/defaults/defaults.mako --- a/rhodecode/templates/admin/defaults/defaults.mako +++ b/rhodecode/templates/admin/defaults/defaults.mako @@ -29,7 +29,7 @@