app/soc/views/models/program.py
changeset 1325 8368086dd3a7
parent 1321 0e587b1d0c1d
child 1343 4ba39392c854
equal deleted inserted replaced
1324:8cf30dee8048 1325:8368086dd3a7
   189       if entity.status == 'visible':
   189       if entity.status == 'visible':
   190         # show the documents for this program, even for not logged in users
   190         # show the documents for this program, even for not logged in users
   191         items += document_view.view.getMenusForScope(entity, params)
   191         items += document_view.view.getMenusForScope(entity, params)
   192         items += self._getTimeDependentEntries(entity, params, id, user)
   192         items += self._getTimeDependentEntries(entity, params, id, user)
   193 
   193 
       
   194         url = redirects.getPublicListRedirect(entity, {'url_name': 'org'})
       
   195         items += [(url, "List Organizations", 'any_access')]
       
   196 
   194       try:
   197       try:
   195         # check if the current user is a host for this program
   198         # check if the current user is a host for this program
   196         rights.doCachedCheck('checkIsHostForProgram', 
   199         rights.doCachedCheck('checkIsHostForProgram', 
   197             {'scope_path': entity.scope_path,
   200                              {'scope_path': entity.scope_path,
   198             'link_id': entity.link_id}, [])
   201                               'link_id': entity.link_id}, [])
   199 
   202 
   200         if entity.status == 'invisible':
   203         if entity.status == 'invisible':
   201           # still add the document links so hosts can see how it looks like
   204           # still add the document links so hosts can see how it looks like
   202           items += document_view.view.getMenusForScope(entity, params)
   205           items += document_view.view.getMenusForScope(entity, params)
   203           items += self._getTimeDependentEntries(entity, params, id, user)
   206           items += self._getTimeDependentEntries(entity, params, id, user)