|
|
| version 1.75, 2006/02/07 20:29:31 | version 1.76, 2006/03/29 18:48:00 |
|---|---|
| Line 298 class ImageDigilib(Folder,Persistent,Imp | Line 298 class ImageDigilib(Folder,Persistent,Imp |
| user=getSecurityManager().getUser() | user=getSecurityManager().getUser() |
| roles=user.getRoles() | roles=user.getRoles() |
| if self.getRightsQuery()=="": | |
| #query empty then always true | |
| return True | |
| if 'Authenticated' in roles: | if 'Authenticated' in roles: |
| return True | return True |
| Line 1604 class ImageCollection(Folder, Persistent | Line 1609 class ImageCollection(Folder, Persistent |
| security.declareProtected('View','index_html') | security.declareProtected('View','index_html') |
| def index_html(self,fn=None,generic=None): | def index_html(self,fn=None,generic='No'): |
| """main template collection""" | """main template collection""" |
| if fn: | if fn: |
| Line 1623 class ImageCollection(Folder, Persistent | Line 1628 class ImageCollection(Folder, Persistent |
| overview=self.ZopeFind(self,obj_ids=['overview_selected.html']) | overview=self.ZopeFind(self,obj_ids=['overview_selected.html']) |
| if overview and (generic is None): | |
| if overview and (generic =='No'): | |
| return overview[0][1]() | return overview[0][1]() |
| else: | else: |
| pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','overview_selected.zpt')).__of__(self) | pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','overview_selected.zpt')).__of__(self) |
| Line 1644 class ImageCollection(Folder, Persistent | Line 1650 class ImageCollection(Folder, Persistent |
| overview=self.ZopeFind(self,obj_ids=['overview.html']) | overview=self.ZopeFind(self,obj_ids=['overview.html']) |
| if overview and (generic is None): | if overview and (generic == 'No'): |
| return overview[0][1]() | return overview[0][1]() |
| elif hasattr(self,'templates'): | elif hasattr(self,'templates'): |
| pt=self.templates.imgcoll_main.__of__(self) | pt=self.templates.imgcoll_main.__of__(self) |