Changeset 7453 for main/waeup.sirp
- Timestamp:
- 12 Jan 2012, 11:43:29 (13 years ago)
- Location:
- main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/static/waeup-base.css
r7451 r7453 41 41 } 42 42 43 .container { 44 width: 700px; 45 } 46 43 47 h2 { 44 48 margin-bottom: 12px; … … 57 61 border-top-left-radius: 3px; 58 62 border-top-right-radius: 3px; 63 border-bottom-left-radius: 3px; 64 border-bottom-right-radius: 3px; 59 65 } 60 66 … … 83 89 84 90 /* SIRP stuff */ 85 86 .container {87 width: 700px;88 }89 91 90 92 .actionbar { … … 118 120 line-height: 16px; 119 121 } 122 123 .student-info-bar{ 124 padding: 7px 14px; 125 margin-left: -20px; 126 margin-right: -20px; 127 margin-bottom: 14px; 128 padding-left: 20px; 129 padding-right: 20px; 130 width: 700px; 131 background-color: #FFFFFF; 132 background-image: None; 133 border: 0px; 134 border-top-left-radius: 3px; 135 border-top-right-radius: 3px; 136 border-bottom-left-radius: 3px; 137 border-bottom-right-radius: 3px; 138 } 139 140 .student-info-bar li { 141 display: inline; 142 text-shadow: 0 1px 0 #ffffff; 143 } 144 .student-info-bar .divider { 145 padding: 0 5px; 146 color: #bfbfbf; 147 } 148 .student-info-bar .active a { 149 color: #404040; 150 } 151 .wfstatus { 152 float: right; 153 line-height: 18px; 154 } -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/templates/studentsitelayout.pt
r7450 r7453 45 45 </div> 46 46 </div> 47 48 47 <div class="container"> 48 <ul class="student-info-bar"> 49 <tal:breadcrumbs 50 tal:condition="python: layout.isAuthenticated()" 51 tal:content="structure provider:breadcrumbs" /> 52 <span tal:condition="layout/getStudentName" class="wfstatus"> 53 Student Id: 54 <span tal:replace="python:context.getStudent().student_id">Id 55 </span> 56 State: 57 <span tal:replace="python:context.getStudent().state">State 58 </span> 59 </span> 60 </ul> 49 61 <div class="content"> 50 62 <div tal:define="message context/@@messages" … … 65 77 </div> 66 78 </div> 67 68 79 </body> 69 80 </html> -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/viewlets.py
r7442 r7453 195 195 breadcrumbs = IBreadcrumbContainer(self.view) 196 196 for breadcrumb in breadcrumbs: 197 yield dict( 198 title = breadcrumb.title, 199 url = self.view.url(breadcrumb.context, breadcrumb.target) 200 ) 197 if breadcrumb.target: 198 yield dict( 199 title = breadcrumb.title, 200 url = self.view.url(breadcrumb.context, breadcrumb.target) 201 ) 201 202 202 203 -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser.py
r7451 r7453 36 36 SIRPPage, SIRPEditFormPage, SIRPAddFormPage, SIRPDisplayFormPage, 37 37 ContactAdminForm, SIRPForm) 38 from waeup.sirp.browser.interfaces import ICaptchaManager 38 from waeup.sirp.browser.interfaces import ICaptchaManager, IBreadcrumbIgnorable 39 39 from waeup.sirp.browser.breadcrumbs import Breadcrumb 40 40 from waeup.sirp.browser.resources import datepicker, datatable, tabs, warning … … 64 64 from waeup.sirp.applicants.interfaces import IApplicantBaseData 65 65 from waeup.sirp.hostels.hostel import NOT_OCCUPIED 66 from waeup.sirp.utils.helpers import get_current_principal 66 67 67 68 def write_log_message(view, message): … … 96 97 grok.context(IStudentsContainer) 97 98 title = 'Students' 99 #grok.implements(IBreadcrumbIgnorable) 100 101 @property 102 def target(self): 103 user = get_current_principal() 104 #import pdb; pdb.set_trace() 105 if getattr(user, 'user_type', None) == 'student': 106 return None 107 return self.viewname 98 108 99 109 class StudentBreadcrumb(Breadcrumb): … … 131 141 grok.context(IStudentAccommodation) 132 142 title = 'Accommodation' 133 134 #@property135 #def target(self):136 # prm = get_principal_role_manager()137 # principal = get_current_principal()138 # roles = [x[0] for x in prm.getRolesForPrincipal(principal.id)]139 # if 'waeup.Student' in roles:140 # return 'index'141 # else:142 # return 'manage'143 143 144 144 class BedTicketBreadcrumb(Breadcrumb): -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/tests/test_browser.py
r7452 r7453 807 807 self.browser.getLink("Clear student").click() 808 808 self.assertTrue('Student has been cleared' in self.browser.contents) 809 self.assertTrue(' State: <span>cleared</span>' in self.browser.contents)809 self.assertTrue('cleared' in self.browser.contents) 810 810 self.browser.getLink("Reject clearance").click() 811 811 self.assertTrue('Clearance has been annulled' in self.browser.contents) … … 814 814 self.assertEqual(self.browser.url, self.student_path + 815 815 '/contactstudent?subject=%s' % urlmessage) 816 self.assertTrue('State: <span>clearance started</span>' 817 in self.browser.contents) 816 self.assertTrue('clearance started' in self.browser.contents) 818 817 IWorkflowInfo(self.student).fireTransition('request_clearance') 819 818 self.browser.open(self.clearance_student_path) … … 821 820 self.assertTrue('Clearance request has been rejected' 822 821 in self.browser.contents) 823 self.assertTrue('State: <span>clearance started</span>' 824 in self.browser.contents) 822 self.assertTrue('clearance started' in self.browser.contents) 825 823 # CO does now also see the contact form and can send a message 826 824 self.browser.getControl(name="form.subject").value = 'Important subject' … … 917 915 self.browser.getLink("Validate courses").click() 918 916 self.assertTrue('Course list has been validated' in self.browser.contents) 919 self.assertTrue(' State: <span>courses validated</span>' in self.browser.contents)917 self.assertTrue('courses validated' in self.browser.contents) 920 918 self.browser.getLink("Reject courses").click() 921 919 self.assertTrue('Course list request has been annulled'
Note: See TracChangeset for help on using the changeset viewer.