- Timestamp:
- 8 Mar 2012, 19:00:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py
r7700 r7811 23 23 from zope.publisher.browser import TestRequest 24 24 25 from waeup. sirp.interfaces import (25 from waeup.kofa.interfaces import ( 26 26 IConfigurationContainer, ISessionConfiguration) 27 from waeup. sirp.interfaces import MessageFactory as _28 from waeup. sirp.browser import interfaces29 from waeup. sirp.browser.interfaces import (IBreadcrumb,27 from waeup.kofa.interfaces import MessageFactory as _ 28 from waeup.kofa.browser import interfaces 29 from waeup.kofa.browser.interfaces import (IBreadcrumb, 30 30 IBreadcrumbIgnorable, IBreadcrumbContainer) 31 31 32 32 class Breadcrumb(grok.Adapter): 33 33 """A most general breadcrumb generator. 34 34 """ 35 35 grok.provides(IBreadcrumb) 36 grok.context(interfaces.I SIRPObject)36 grok.context(interfaces.IKOFAObject) 37 37 grok.name('index') 38 38 … … 42 42 parent_viewname = 'index' 43 43 viewname = 'index' 44 44 45 45 def __init__(self, context): 46 46 """Turn a context into a breadcrumb. … … 57 57 return self.context.title 58 58 if hasattr(self.context, 'name'): 59 return self.context.name 59 return self.context.name 60 60 return None 61 61 … … 151 151 class DataCenterBreadcrumb(Breadcrumb): 152 152 """A breadcrumb for data centers. 153 """ 153 """ 154 154 grok.context(interfaces.IDataCenter) 155 155 title = _(u'Data Center') … … 160 160 """ 161 161 grok.context(interfaces.IFaculty) 162 162 163 163 @property 164 164 def title(self): … … 169 169 """ 170 170 grok.context(interfaces.IDepartment) 171 171 172 172 class CourseBreadcrumb(FacultyBreadcrumb): 173 173 """A breadcrumb for courses. 174 174 """ 175 grok.context(interfaces.ICourse) 176 175 grok.context(interfaces.ICourse) 176 177 177 class CertificateBreadcrumb(FacultyBreadcrumb): 178 178 """A breadcrumb for certificates. 179 179 """ 180 grok.context(interfaces.ICertificate) 180 grok.context(interfaces.ICertificate) 181 181 182 182 class CoursesContainerBreadcrumb(Breadcrumb): … … 245 245 246 246 _breadcrumbs = None 247 247 248 248 def __init__(self, context): 249 249 self.context = context
Note: See TracChangeset for help on using the changeset viewer.