Changeset 5427
- Timestamp:
- 12 Aug 2010, 13:20:48 (14 years ago)
- Location:
- main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/templates/sitelayout.pt
r5407 r5427 52 52 <ul id="user-navigation" 53 53 tal:condition="layout/isAuthenticated"> 54 <li> 55 <a href="#" 56 tal:attributes="href python: view.url(context, 57 '@@search')">Search</a> 58 </li> 59 <li> 60 <a href="#" 61 tal:attributes="href python: view.url(context, 62 '@@contactadmin')">Contact</a> 63 </li> 54 64 <li> 55 65 <a href="#" -
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/viewlets.py
r5414 r5427 529 529 return self.view.application_url('faculties') 530 530 531 class SearchTab(PrimaryNavTab): 532 """Search tab in primary navigation. 533 """ 534 grok.order(3) 535 grok.require('waeup.View') 536 grok.template('primarynavtab') 537 538 pnav = 2 539 tab_title = u'Search' 540 541 @property 542 def link_target(self): 543 return self.view.application_url('@@search') 544 531 545 532 class ContactTab(PrimaryNavTab): 546 533 """Contact tab in primary navigation. 547 534 """ 548 535 grok.order(4) 549 grok.require('waeup. Public')536 grok.require('waeup.Anonymous') 550 537 grok.template('primarynavtab') 551 538 552 539 pnav = 3 553 540 def tab_title(self): 554 """Return True if the calling user is authenticated. 541 """Display tab only for anonymous. Authenticated users can call the 542 form from the user navigation bar. 555 543 """ 556 544 userid = self.request.principal.id 557 545 if userid != 'zope.anybody': 558 tt = u' Contact'546 tt = u'' 559 547 else: 560 548 tt = u'Enquiries'
Note: See TracChangeset for help on using the changeset viewer.