Added resign as club admin and club member links to the club entity menu.
authorLennard de Rijk <ljvderijk@gmail.com>
Thu, 29 Jan 2009 18:26:03 +0000
changeset 1069 e8bcc5a26532
parent 1068 8a06ebff014e
child 1070 1ff364d96b02
Added resign as club admin and club member links to the club entity menu. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/club.py
--- a/app/soc/views/models/club.py	Thu Jan 29 18:18:20 2009 +0000
+++ b/app/soc/views/models/club.py	Thu Jan 29 18:26:03 2009 +0000
@@ -278,7 +278,18 @@
           "Edit Club Profile", 'any_access')
       submenus.append(submenu)
 
-      # TODO(ljvderijk) add more usefull links, like resign as admin/member
+      # add a link to resign as club admin
+      submenu = (redirects.getManageRedirect(roles['club_admin'], 
+          {'url_name': 'club_admin'}), 
+          "Resign as Club Admin", 'any_access')
+      submenus.append(submenu)
+
+    if roles.get('club_member'):
+      # add a link to resign as club member
+      submenu = (redirects.getManageRedirect(roles['club_member'], 
+          {'url_name' : 'club_member'}), 
+          "Resign as Club Member", 'any_access')
+      submenus.append(submenu)
 
     return submenus