Fixed missing parameters in program view due to change in _getTimeDependentEntries in r1943.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 14 Feb 2009 19:03:38 +0000
changeset 1321 0e587b1d0c1d
parent 1320 a5913d46e97e
child 1322 5153bd89147f
Fixed missing parameters in program view due to change in _getTimeDependentEntries in r1943. Also the sidebar once more shows "Apply to become an Organization" even if you are not logged in. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/program.py
--- a/app/soc/views/models/program.py	Sat Feb 14 16:44:14 2009 +0000
+++ b/app/soc/views/models/program.py	Sat Feb 14 19:03:38 2009 +0000
@@ -200,7 +200,7 @@
         if entity.status == 'invisible':
           # still add the document links so hosts can see how it looks like
           items += document_view.view.getMenusForScope(entity, params)
-          items += self._getTimeDependentEntries(entity, params)
+          items += self._getTimeDependentEntries(entity, params, id, user)
 
         items += [(redirects.getReviewOverviewRedirect(
             entity, {'url_name': 'org_app'}),
@@ -239,16 +239,18 @@
     #TODO(ljvderijk) Add more timeline dependent entries
     timeline_entity = program_entity.timeline
 
-    if user and timeline_helper.isActivePeriod(timeline_entity, 'org_signup'):
+    if timeline_helper.isActivePeriod(timeline_entity, 'org_signup'):
       # add the organization signup link
       items += [
           (redirects.getApplyRedirect(program_entity, {'url_name': 'org_app'}),
           "Apply to become an Organization", 'any_access')]
 
-      # add the 'list my orgs' link
-      items += [
-          (redirects.getListSelfRedirect(program_entity, {'url_name' : 'org_app'}),
-           "List my Org Applications", 'any_access')]
+      if user:
+        # add the 'List my Org Applications' link
+        items += [
+            (redirects.getListSelfRedirect(program_entity, 
+                                           {'url_name' : 'org_app'}),
+             "List my Org Applications", 'any_access')]
 
     return items