Changeset 12620 for main/waeup.kofa/trunk/src/waeup/kofa/utils/browser.py
- Timestamp:
- 16 Feb 2015, 11:27:24 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/browser.py
r12610 r12620 25 25 from waeup.kofa.interfaces import IObjectHistory 26 26 from waeup.kofa.interfaces import IUniversity 27 from waeup.kofa.university.interfaces import IDepartment 27 from waeup.kofa.university.interfaces import IDepartment, ICertificate 28 28 29 29 def replaceStudentMessages(old, new): … … 227 227 self.redirect(self.url(self.context, '@@index')) 228 228 return 229 230 class MoveCertificate(UtilityView, grok.View): 231 """ View to move a certificate. 232 233 """ 234 grok.context(ICertificate) 235 grok.name('move_certificate') 236 grok.require('waeup.managePortal') 237 238 def update(self,fac=None, dep=None, cert=None): 239 if None in (fac, dep, cert): 240 self.flash('Syntax: /move_certificate?fac=[new faculty code]&dep=[new department code]&cert=[new certificate code]') 241 return 242 oldcode = self.context.code 243 try: 244 self.context.moveCertificate(fac, dep, cert) 245 except: 246 self.flash('Error') 247 return 248 grok.getSite().logger.info( 249 "Certificate %s moved to %s/%s/%s" % (oldcode, fac, dep, cert)) 250 self.flash('Finished') 251 return 252 253 def render(self): 254 self.redirect(self.url(self.context, '@@index')) 255 return
Note: See TracChangeset for help on using the changeset viewer.