Added apply_mentor view to GHOPOrganization view.
--- a/app/soc/modules/ghop/views/models/organization.py Thu Sep 17 22:13:08 2009 +0200
+++ b/app/soc/modules/ghop/views/models/organization.py Thu Sep 17 22:24:59 2009 +0200
@@ -107,6 +107,8 @@
'slots_desired', 'ideas',
'task_quota_limit']
+ new_params['mentor_role_name'] = 'ghop_mentor'
+
params = dicts.merge(params, new_params, sub_merge=True)
super(View, self).__init__(params=params)
@@ -286,6 +288,7 @@
view = View()
admin = decorators.view(view.admin)
+apply_mentor = decorators.view(view.applyMentor)
create = decorators.view(view.create)
delete = decorators.view(view.delete)
edit = decorators.view(view.edit)
--- a/app/soc/views/models/organization.py Thu Sep 17 22:13:08 2009 +0200
+++ b/app/soc/views/models/organization.py Thu Sep 17 22:24:59 2009 +0200
@@ -159,6 +159,8 @@
'clean': cleaning.clean_refs(new_params, ['home_link_id'])
}
+ new_params['mentor_role_name'] = 'mentor'
+
params = dicts.merge(params, new_params)
super(View, self).__init__(params=params)
@@ -192,7 +194,8 @@
"""
list_params = params.copy()
- list_params['list_action'] = (redirects.getRequestRedirectForRole, 'mentor')
+ list_params['list_action'] = (redirects.getRequestRedirectForRole,
+ params['mentor_role_name'])
list_params['list_description'] = ugettext('Choose an Organization which '
'you want to become a Mentor for.')