Changeset 4639 for waeup/branches/ulif-layout
- Timestamp:
- 2 Jan 2010, 16:21:02 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-layout/src/waeup/browser/pages.py
r4637 r4639 5 5 from waeup.browser import WAeUPPage, WAeUPEditFormPage, WAeUPAddFormPage 6 6 from waeup.interfaces import (IUniversity, IWAeUPObject, IUserContainer, 7 IUserAccount )7 IUserAccount, IFacultyContainer) 8 8 from waeup.widgets.interfaces import ITableProvider 9 9 from zope.app.security.interfaces import (IAuthentication, … … 182 182 self.redirect(self.url(self.context.__parent__)) 183 183 return 184 185 186 # 187 # FacultyContainer pages... 188 # 189 190 class FacultyContainerPage(WAeUPPage): 191 grok.context(IFacultyContainer) 192 grok.name('index') 193 title = 'Faculties' 194 195 def update(self): 196 self.table = ITableProvider(self.context).getTables(self)[0] 197 self.table.need() 198 199 def getFaculties(self): 200 """Convinience method to create a sorted list of faculties. 201 202 It provides a list of dicts with entries for all data needed by 203 usual list templates. 204 """ 205 result = [] 206 for key, val in self.context.items(): 207 result.append(dict(id=key, name=val.title)) 208 return result
Note: See TracChangeset for help on using the changeset viewer.