Changeset 7184 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 24 Nov 2011, 09:20:13 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7179 r7184 1128 1128 """ 1129 1129 grok.context(IFacultyContainer) 1130 grok.require('waeup. View')1130 grok.require('waeup.viewAcademics') 1131 1131 grok.name('index') 1132 1132 title = 'Academics' … … 1206 1206 """ 1207 1207 grok.context(IFaculty) 1208 grok.require('waeup. View')1208 grok.require('waeup.viewAcademics') 1209 1209 grok.name('index') 1210 1210 pnav = 1 … … 1327 1327 """ 1328 1328 grok.context(IDepartment) 1329 grok.require('waeup. View')1329 grok.require('waeup.viewAcademics') 1330 1330 grok.name('index') 1331 1331 pnav = 1 … … 1547 1547 grok.context(ICourse) 1548 1548 grok.name('index') 1549 grok.require('waeup. View')1549 grok.require('waeup.viewAcademics') 1550 1550 pnav = 1 1551 1551 #form_fields = grok.AutoFields(ICourse) … … 1594 1594 grok.context(ICertificate) 1595 1595 grok.name('index') 1596 grok.require('waeup. View')1596 grok.require('waeup.viewAcademics') 1597 1597 pnav = 1 1598 1598 form_fields = grok.AutoFields(ICertificate) … … 1702 1702 grok.context(ICertificateCourse) 1703 1703 grok.name('index') 1704 grok.require('waeup. View')1704 grok.require('waeup.viewAcademics') 1705 1705 pnav = 1 1706 1706 #form_fields = grok.AutoFields(ICertificateCourse) -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/studentsitelayout.pt
r7129 r7184 29 29 </span> </h1> 30 30 <div id="navigation" class="yui-navset" style="text-align:right;"> 31 <ul id="primary-navigation" tal:condition="layout/isAuthenticated"> 31 <ul id="primary-navigation"> 32 <tal:primary_nav content="structure provider:primary_nav" /> 32 33 <tal:primary_nav content="structure provider:primary_nav_student" /> 33 </ul>34 <ul id="primary-navigation" tal:condition="not: layout/isAuthenticated">35 <tal:primary_nav content="structure provider:primary_nav" />36 34 </ul> 37 35 <ul id="user-navigation"> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
r7179 r7184 551 551 grok.viewletmanager(PrimaryNavManager) 552 552 grok.order(1) 553 grok.require('waeup. View')553 grok.require('waeup.Public') 554 554 555 555 pnav = 0 # This is a kind of id of a tab. If some page provides … … 590 590 """ 591 591 grok.order(2) 592 grok.require('waeup. View')592 grok.require('waeup.viewAcademics') 593 593 grok.template('primarynavtab') 594 594 … … 603 603 class ContactTab(PrimaryNavTab): 604 604 """Contact tab in primary navigation. 605 606 Display tab only for anonymous. Authenticated users can call the 607 form from the user navigation bar. 605 608 """ 606 609 grok.order(6) 607 610 grok.require('waeup.Anonymous') 608 611 grok.template('primarynavtab') 609 612 tab_title = u'Enquiries' 610 613 pnav = 2 611 def tab_title(self): 612 """Display tab only for anonymous. Authenticated users can call the613 form from the user navigation bar.614 """615 userid = self.request.principal.id616 if userid != 'zope.anybody':617 tt = u''618 else:619 tt = u'Enquiries'620 return tt621 622 @property623 def active(self):624 view_pnav = getattr(self.view, 'pnav', 0)625 userid = self.request.principal.id626 if view_pnav == self.pnav and userid == 'zope.anybody':627 return 'active'628 return ''614 615 # Also zope.manager has role Anonymous. 616 # To avoid displaying this tab, uncomment the following. 617 #def tab_title(self): 618 # userid = self.request.principal.id 619 # if userid != 'zope.anybody': 620 # tt = u'' 621 # else: 622 # tt = u'Enquiries' 623 # return tt 624 625 #@property 626 #def active(self): 627 # view_pnav = getattr(self.view, 'pnav', 0) 628 # userid = self.request.principal.id 629 # if view_pnav == self.pnav and userid == 'zope.anybody': 630 # return 'active' 631 # return '' 629 632 630 633 @property … … 717 720 grok.viewletmanager(SubobjectLister) 718 721 grok.context(IFacultyContainer) 719 grok.require('waeup. View')722 grok.require('waeup.viewAcademics') 720 723 721 724 def render(self): … … 728 731 grok.viewletmanager(SubobjectLister) 729 732 grok.context(IFaculty) 730 grok.require('waeup. View')733 grok.require('waeup.viewAcademics') 731 734 732 735 def render(self): … … 740 743 grok.viewletmanager(SubobjectLister) 741 744 grok.context(IFaculty) 742 grok.require('waeup. View')745 grok.require('waeup.viewAcademics') 743 746 744 747 def render(self):
Note: See TracChangeset for help on using the changeset viewer.