Changeset 7811 for main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
- 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/viewlets.py
r7736 r7811 23 23 from zope.location.interfaces import ISite 24 24 from zope.traversing.browser import absoluteURL 25 from waeup. sirp.browser.pages import (25 from waeup.kofa.browser.pages import ( 26 26 UniversityPage, FacultiesContainerPage, DatacenterPage, FacultyPage, 27 27 DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage, 28 28 UsersContainerPage, UserManageFormPage) 29 from waeup. sirp.browser.interfaces import (29 from waeup.kofa.browser.interfaces import ( 30 30 IFacultiesContainer, IFaculty, IDepartment, ICourse, ICertificate, 31 31 ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer) 32 from waeup. sirp.interfaces import (33 I SIRPUtils, ISIRPObject, ISIRPXMLExporter,34 I SIRPXMLImporter, IDataCenter, IUserAccount)35 from waeup. sirp.browser.layout import SIRPPage, default_primary_nav_template36 from waeup. sirp.utils.helpers import get_user_account37 38 from waeup. sirp.interfaces import MessageFactory as _32 from waeup.kofa.interfaces import ( 33 IKOFAUtils, IKOFAObject, IKOFAXMLExporter, 34 IKOFAXMLImporter, IDataCenter, IUserAccount) 35 from waeup.kofa.browser.layout import KOFAPage, default_primary_nav_template 36 from waeup.kofa.utils.helpers import get_user_account 37 38 from waeup.kofa.interfaces import MessageFactory as _ 39 39 40 40 grok.templatedir('templates') 41 grok.context(I SIRPObject) # Make ISIRPObject the default context41 grok.context(IKOFAObject) # Make IKOFAObject the default context 42 42 43 43 class LeftSidebar(grok.ViewletManager): … … 85 85 """ 86 86 grok.baseclass() 87 grok.context(I SIRPObject)87 grok.context(IKOFAObject) 88 88 grok.viewletmanager(ActionBar) 89 89 icon = 'actionicon_modify.png' # File must exist in static/ … … 126 126 # local to the derived class' module. As we often like to 127 127 # get the icons from here 128 # (i.e. waeup. sirp.browser/static), we set the directory128 # (i.e. waeup.kofa.browser/static), we set the directory 129 129 # resource appropiately. 130 130 # … … 134 134 # TODO: notes in here should go to general documentation. 135 135 static = queryAdapter( 136 self.request, Interface, name='waeup. sirp.browser')136 self.request, Interface, name='waeup.kofa.browser') 137 137 return static[self.icon]() 138 138 … … 196 196 197 197 class BreadCrumbs(grok.Viewlet): 198 grok.context(I SIRPObject)198 grok.context(IKOFAObject) 199 199 grok.viewletmanager(BreadCrumbManager) 200 200 grok.order(1) … … 216 216 """ 217 217 grok.viewletmanager(LanguageManager) 218 grok.context(I SIRPObject)218 grok.context(IKOFAObject) 219 219 grok.require('waeup.Public') 220 220 title = u'Languages' 221 221 222 222 def render(self): 223 preferred_languages = getUtility(I SIRPUtils).PREFERRED_LANGUAGES_DICT223 preferred_languages = getUtility(IKOFAUtils).PREFERRED_LANGUAGES_DICT 224 224 html = u'' 225 225 for key, value in sorted( … … 257 257 grok.baseclass() 258 258 grok.viewletmanager(LeftSidebar) 259 grok.context(I SIRPObject)259 grok.context(IKOFAObject) 260 260 grok.order(5) 261 261 grok.require('waeup.manageUniversity') … … 278 278 # local to the derived class' module. As we often like to 279 279 # get the icons from here 280 # (i.e. waeup. sirp.browser/static), we set the directory280 # (i.e. waeup.kofa.browser/static), we set the directory 281 281 # resource appropiately. 282 282 # … … 286 286 # TODO: notes in here should go to general documentation. 287 287 static = queryAdapter( 288 self.request, Interface, name='waeup. sirp.browser')288 self.request, Interface, name='waeup.kofa.browser') 289 289 return static[self.icon]() 290 290 return … … 310 310 311 311 # 312 # waeup. sirp.app.University viewlets...312 # waeup.kofa.app.University viewlets... 313 313 # 314 314 class Login(grok.Viewlet): … … 316 316 """ 317 317 grok.viewletmanager(LeftSidebar) 318 grok.context(I SIRPObject)318 grok.context(IKOFAObject) 319 319 grok.view(Interface) 320 320 grok.order(2) … … 350 350 """ 351 351 grok.viewletmanager(LeftSidebar) 352 grok.context(I SIRPObject)352 grok.context(IKOFAObject) 353 353 grok.view(Interface) 354 354 grok.order(5) … … 520 520 class BrowseActionButton(ActionButton): 521 521 grok.baseclass() 522 grok.context(I SIRPObject)522 grok.context(IKOFAObject) 523 523 grok.template('actionbutton') 524 524 grok.viewletmanager(ActionBar) … … 686 686 target_viewname = 'datacenter' 687 687 688 # The SubobjectLister and its viewlets below are not used in SIRP.688 # The SubobjectLister and its viewlets below are not used in KOFA. 689 689 690 690 class SubobjectLister(grok.ViewletManager):
Note: See TracChangeset for help on using the changeset viewer.