Changeset 7647 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 14 Feb 2012, 10:38:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7600 r7647 33 33 IPrincipalRoleManager, IPrincipalRoleMap) 34 34 from zope.component import ( 35 getUtility, createObject,getAllUtilitiesRegisteredFor)35 getUtility, queryUtility, createObject, getAllUtilitiesRegisteredFor) 36 36 #from zope.component.interfaces import Invalid 37 37 from zope.event import notify … … 59 59 from waeup.sirp.authentication import get_principal_role_manager 60 60 from waeup.sirp.utils.helpers import get_user_account 61 from waeup.sirp.browser.layout import jsaction, action 61 from waeup.sirp.browser.layout import jsaction, action, UtilityView 62 62 63 63 grok.context(ISIRPObject) … … 316 316 def entries(self): 317 317 return () 318 319 class ReindexPage(UtilityView, grok.View): 320 """ Reindex view. 321 322 Reindexes a catalog. For managers only. 323 """ 324 grok.context(IUniversity) 325 grok.name('reindex') 326 grok.require('waeup.manageUniversity') 327 328 def update(self,ctlg=None): 329 if ctlg is None: 330 self.flash('No catalog name provided.') 331 return 332 cat = queryUtility(ICatalog, name='%s_catalog' % ctlg) 333 if cat is None: 334 self.flash('%s_catalog does not exist' % ctlg) 335 return 336 cat.updateIndexes() 337 self.flash('%s reindexed.' % ctlg.capitalize()) 338 return 339 340 def render(self): 341 self.redirect(self.url(self.context, '@@index')) 342 return 318 343 319 344 #
Note: See TracChangeset for help on using the changeset viewer.