- Timestamp:
- 9 Aug 2010, 21:36:42 (14 years ago)
- Location:
- main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/layout.py
r5407 r5414 121 121 return usertitle 122 122 123 def getUserId(self): 124 """Return id of current user. 125 """ 126 userid = self.request.principal.id 127 return userid 128 123 129 def update(self): 124 130 yui.reset_fonts_grids.need() -
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/pages.py
r5386 r5414 293 293 self.hitlist = search(query=self.query, view=self) 294 294 return 295 296 # 297 # Contact forms... 298 # 299 class ContactAdminForm(WAeUPPage): 300 grok.context(IUniversity) 301 grok.name('contactadmin') 302 grok.template('contactadminform') 303 grok.require('waeup.Public') 304 pnav = 3 305 306 def title(self): 307 """Return True if the calling user is authenticated. 308 """ 309 userid = self.request.principal.id 310 if userid != 'zope.anybody': 311 tt = u'Contact' 312 else: 313 tt = u'Enquiries' 314 return tt 295 315 296 316 # -
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/viewlets.py
r5404 r5414 542 542 def link_target(self): 543 543 return self.view.application_url('@@search') 544 545 class ContactTab(PrimaryNavTab): 546 """Contact tab in primary navigation. 547 """ 548 grok.order(4) 549 grok.require('waeup.Public') 550 grok.template('primarynavtab') 551 552 pnav = 3 553 def tab_title(self): 554 """Return True if the calling user is authenticated. 555 """ 556 userid = self.request.principal.id 557 if userid != 'zope.anybody': 558 tt = u'Contact' 559 else: 560 tt = u'Enquiries' 561 return tt 562 563 @property 564 def link_target(self): 565 return self.view.application_url('contactadmin') 566 567 544 568 545 569 #
Note: See TracChangeset for help on using the changeset viewer.