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
--- 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()