Changeset 7008 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 6 Nov 2011, 17:18:51 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/breadcrumbs.py
r6918 r7008 50 50 if self._parent is not 0: 51 51 return (self._parent, self.parent_viewname) 52 52 53 53 if self.viewname != 'index': 54 54 self._parent = self.context … … 61 61 return (self._parent, self.parent_viewname) 62 62 return None 63 64 @property 65 def target(self): 66 return self.viewname 63 67 64 68 class UniversityBreadcrumb(Breadcrumb): -
main/waeup.sirp/trunk/src/waeup/sirp/browser/interfaces.py
r5957 r7008 9 9 ICourseContainer, ICourse, ICourseAdd, ICertificateContainer, 10 10 ICertificate, ICertificateAdd, ICertificateCourse, ICertificateCourseAdd) 11 11 12 class IBreadcrumb(Interface): 12 13 """Provide breadcrumbs. 13 14 """ 14 title = schema.TextLine( 15 title = u'Context description', 16 readonly = True, 17 ) 18 viewname = schema.TextLine( 19 title = u'The viewname, for which the breadcrumb is provided.', 20 readonly = True, 21 default = u'index' 22 ) 23 parent_viewname = schema.TextLine( 24 title = u'The viewname of the parent to use.', 25 readonly = True, 26 default = u'index' 27 ) 15 title = Attribute("Context description") 16 viewname = Attribute("The viewname, for which the breadcrumb is provided.") 17 parent_viewname = Attribute("The viewname of the parent to use.") 28 18 parent = Attribute("The parent object.") 29 19 context = Attribute("The context of the breadcrumb.") 30 31 32 def getURL(view=None): 33 """Return a URL to the breadcrumb target. 34 """ 20 target = Attribute("The link target.") 35 21 36 22 class IBreadcrumbIgnorable(Interface): -
main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
r6953 r7008 180 180 yield dict( 181 181 title = breadcrumb.title, 182 url = self.view.url(breadcrumb.context, breadcrumb. viewname)182 url = self.view.url(breadcrumb.context, breadcrumb.target) 183 183 ) 184 184
Note: See TracChangeset for help on using the changeset viewer.