Added two menu items to the program menu.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 11 Apr 2009 13:42:12 +0000
changeset 2156 0f5f68891822
parent 2155 8e26887b6d15
child 2157 139cd2731412
Added two menu items to the program menu. The first addition is a link to redirect to the Host's view for showing duplicates. The second addition is a link for Students to an overview of all their projects in the current program. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/program.py
--- a/app/soc/views/models/program.py	Sat Apr 11 13:37:31 2009 +0000
+++ b/app/soc/views/models/program.py	Sat Apr 11 13:42:12 2009 +0000
@@ -626,10 +626,13 @@
             "Review Organization Applications", 'any_access')]
         # add link to edit Program Profile
         items += [(redirects.getEditRedirect(entity, params),
-            'Edit Program Profile','any_access')]
+            'Edit Program Profile', 'any_access')]
         # add link to Assign Slots
         items += [(redirects.getAssignSlotsRedirect(entity, params),
-            'Assign Slots','any_access')]
+            'Assign Slots', 'any_access')]
+        # add link to Show Duplicate project assignments
+        items += [(redirects.getShowDuplicatesRedirect(entity, params),
+            'Show Duplicate Project Assignments', 'any_access')]
         # add link to edit Program Timeline
         items += [(redirects.getEditRedirect(entity, {'url_name': 'timeline'}),
             "Edit Program Timeline", 'any_access')]
@@ -741,11 +744,18 @@
     if timeline_helper.isAfterEvent(timeline_entity, 'student_signup_start'):
       items += [(redirects.getListSelfRedirect(student_entity,
           {'url_name':'student_proposal'}),
-         "List my Student Proposals", 'any_access')]
+          "List my Student Proposals", 'any_access')]
 
     items += [(redirects.getEditRedirect(student_entity, 
-                                         {'url_name': 'student'}),
-              "Edit my Student Profile", 'any_access')]
+        {'url_name': 'student'}),
+        "Edit my Student Profile", 'any_access')]
+
+    if timeline_helper.isAfterEvent(timeline_entity,
+                                   'accepted_students_announced_deadline'):
+      # add a link to show all projects
+      items += [(redirects.getListProjectsRedirect(program_entity,
+          {'url_name':'student'}),
+          "List my Student Projects", 'any_access')]
 
     return items