# HG changeset patch # User Sverre Rabbelier # Date 1228657133 0 # Node ID 0d8515fb5314c699713eb4488c936ec39f13bc80 # Parent bc575b44755bc9a3fb6e827e242948f77e0a687f Make use of the 'sidebar' param for user_self Instead of overriding getSidebarLinks we use the sidebar param since user_self is now in it's own View. Patch by: Sverre Rabbelier diff -r bc575b44755b -r 0d8515fb5314 app/soc/views/models/user_self.py --- a/app/soc/views/models/user_self.py Sun Dec 07 13:06:26 2008 +0000 +++ b/app/soc/views/models/user_self.py Sun Dec 07 13:38:53 2008 +0000 @@ -111,7 +111,12 @@ new_params['url_name'] = "user" new_params['module_name'] = "user_self" - new_params['sidebar_heading'] = 'Users' + new_params['sidebar_heading'] = 'User (self)' + new_params['sidebar'] = [ + (users.create_login_url("user/edit"), 'Sign In', 'signIn'), + ('/' + new_params['url_name'] + '/edit', 'Profile', 'editSelf'), + ('/' + new_params['url_name'] + '/roles', 'Roles', 'roles'), + ] patterns = [] @@ -238,20 +243,6 @@ super(View, self)._editPost(request, entity, fields) - def getSidebarLinks(self, request, params=None): - """Returns an dictionary with the user sidebar entry. - """ - - params = {} - params['sidebar_heading'] = "User (self)" - params['sidebar'] = [ - (users.create_login_url(request.path), 'Sign In', 'signIn'), - ('/' + self._params['url_name'] + '/edit', 'Profile', 'editSelf'), - ('/' + self._params['url_name'] + '/roles', 'Roles', 'roles'), - ] - - return super(View, self).getSidebarLinks(request, params) - view = View()