Changeset 4700 for waeup/branches/ulif-layout/src
- Timestamp:
- 7 Jan 2010, 18:37:02 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-layout/src/waeup/browser/viewlets.py
r4680 r4700 8 8 from waeup.browser.pages import (UniversityPage, FacultyContainerPage, 9 9 DatacenterPage) 10 from waeup.browser.interfaces import IBreadcrumbContainer 10 11 from waeup.interfaces import (IUniversity, IWAeUPObject, IWAeUPXMLExporter, 11 12 IWAeUPXMLImporter, IFacultyContainer, IFaculty, 12 13 IDepartment, ICourse, ICertificate, 13 14 ICertificateCourse, IDataCenter) 14 from waeup.utils.helpers import getInnerHTMLPart15 15 from waeup.viewlets import LeftSidebar, ActionBar 16 16 … … 18 18 grok.context(IWAeUPObject) # Make IWAeUPObject the default context 19 19 20 #grok.context(zope.interface.Interface) 20 class BreadCrumbManager(grok.ViewletManager): 21 grok.name('breadcrumbs') 22 23 class BreadCrumbs(grok.Viewlet): 24 grok.context(IWAeUPObject) 25 grok.viewletmanager(BreadCrumbManager) 26 grok.order(1) 27 28 def getEntries(self): 29 result = [] 30 site = grok.getSite() 31 context = self.context 32 breadcrumbs = IBreadcrumbContainer(self.view) 33 for breadcrumb in breadcrumbs: 34 yield dict( 35 title = breadcrumb.title, 36 url = self.view.url(breadcrumb.context, breadcrumb.viewname) 37 ) 21 38 22 39 #
Note: See TracChangeset for help on using the changeset viewer.