Changeset 5427 for main/waeup.sirp


Ignore:
Timestamp:
12 Aug 2010, 13:20:48 (14 years ago)
Author:
Henrik Bettermann
Message:

Show 'Enquiries' tab only for anonymous user. Move 'Search' and 'Contact' to the right user navigation bar.

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  
    5252            <ul id="user-navigation"
    5353                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>
    5464              <li>
    5565                <a href="#"
  • main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/viewlets.py

    r5414 r5427  
    529529        return self.view.application_url('faculties')
    530530
    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   
    545532class ContactTab(PrimaryNavTab):
    546533    """Contact tab in primary navigation.
    547534    """
    548535    grok.order(4)
    549     grok.require('waeup.Public')
     536    grok.require('waeup.Anonymous')
    550537    grok.template('primarynavtab')
    551538   
    552539    pnav = 3
    553540    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.
    555543        """
    556544        userid = self.request.principal.id
    557545        if userid != 'zope.anybody':
    558             tt = u'Contact'
     546            tt = u''
    559547        else:
    560548            tt = u'Enquiries'         
Note: See TracChangeset for help on using the changeset viewer.