Changeset 12755 for main/waeup.ikoba/trunk
- Timestamp:
- 12 Mar 2015, 20:19:23 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/breadcrumbs.py
r12754 r12755 21 21 from grokcore.view.interfaces import IGrokView 22 22 from zope.component import getAdapter 23 from zope.publisher.browser import TestRequest 24 25 from waeup.ikoba.interfaces import ( 26 IConfigurationContainer, IExportJobContainer) 23 24 from waeup.ikoba.interfaces import IConfigurationContainer 27 25 from waeup.ikoba.interfaces import MessageFactory as _ 28 26 from waeup.ikoba.browser.interfaces import ( … … 34 32 from waeup.ikoba.reports import IReportsContainer 35 33 34 36 35 class Breadcrumb(grok.Adapter): 37 36 """A most general breadcrumb generator. … … 88 87 return self.viewname 89 88 89 90 90 class CompanyBreadcrumb(Breadcrumb): 91 91 """A breadcrumb for company index pages. … … 94 94 title = _(u'Home') 95 95 parent = None 96 96 97 97 98 class PortalSettingsBreadcrumb(Breadcrumb): … … 114 115 return (self.context, 'administration') 115 116 117 116 118 class AdministrationBreadcrumb(Breadcrumb): 117 119 """A breadcrumb for administration areas of Company instances. … … 122 124 viewname = 'administration' 123 125 126 124 127 class ConfigurationContainerBreadcrumb(Breadcrumb): 125 128 """A breadcrumb for the configuration container. … … 129 132 parent_viewname = 'administration' 130 133 134 131 135 class UsersContainerBreadcrumb(Breadcrumb): 132 136 """A breadcrumb for user containers. … … 136 140 parent_viewname = 'administration' 137 141 142 138 143 class DataCenterBreadcrumb(Breadcrumb): 139 144 """A breadcrumb for data centers. … … 142 147 title = _(u'Data Center') 143 148 parent_viewname = 'administration' 149 144 150 145 151 class ReportsBreadcrumb(Breadcrumb): … … 187 193 pass 188 194 return getAdapter(obj, IBreadcrumb, name='index') 195 189 196 190 197 def getBreadcrumbList(obj, viewname): … … 205 212 return result 206 213 214 207 215 def getBreadcrumbListForView(view): 208 216 """Get an ordered list of breadcrumbs a certain view. … … 214 222 return getBreadcrumbList(context, viewname) 215 223 224 216 225 class BreadcrumbContainer(grok.Adapter): 217 226 """An adapter to adapt grok views to list of breadcrumbs.
Note: See TracChangeset for help on using the changeset viewer.