Changeset 659 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 11 Oct 2006, 23:22:16 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r656 r659 22 22 info = {} 23 23 info['is_manager'] = context.isManager 24 info['is_student'] = context.isStudent() 24 25 member_id = str(member) 25 26 if student is None: … … 58 59 else: 59 60 info['acco'] = None 60 61 items = [] 62 sos = context.portal_catalog(container_path=student_path, 63 review_state = ['opened', 'closed']) 61 62 items = [] 63 sos = context.portal_catalog(container_path=student_path) 64 64 for so in sos: 65 65 row = {} … … 69 69 row['title'] = sod.Title() 70 70 row['url'] = soo.absolute_url() 71 row['type'] = so.portal_type 71 72 row['is_editable'] = mtool.checkPermission('Modify portal content', soo) 73 row['review_state'] = so.review_state 72 74 items.append(row) 73 75 info['items'] = items -
WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
r652 r659 8 8 current = DateTime.DateTime() 9 9 pr = context.portal_registration 10 wftool = context.portal_workflow 10 11 11 12 info = context.getStudentInfo() … … 15 16 pr = context.portal_registration 16 17 session = current.year() 17 acco_id = ' Acco_%s' % session18 acco_id = 'accommodation_%s' % session 18 19 info = context.getStudentInfo() 19 20 student = info['student'] … … 27 28 layout_mode='create', 28 29 formaction = "reserve_accommodation", 29 button = " book Bed",30 button = "Book", 30 31 ) 31 32 if psm == 'invalid': … … 47 48 s_id = ds.get('s_id') 48 49 pin = str(ds.get('acco_res_ac_pin')) 49 50 50 51 pa = context.portal_accommodation 51 52 code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) … … 59 60 student.invokeFactory('StudentAccommodation',acco_id) 60 61 acco = getattr(student,acco_id) 62 wftool.doActionFor(acco,'open',dest_container=acco) 61 63 ds.set('acco_res_date', current) 62 64 ds.set('bed', bed) -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r607 r659 48 48 use_session=True) 49 49 action = "/passport_entry_view" 50 if is_valid andapp_doc.passport is not None:50 if app_doc.passport is not None: 51 51 psm = 'You successfully uploaded your passport image.' 52 52 args = {'apply_button': 'Apply',} -
WAeUP_SRP/trunk/skins/waeup_student/student_index.py
r655 r659 21 21 22 22 if context.isManager(): 23 return redirect("%s/ academics_contents" % context.absolute_url())23 return redirect("%s/student_view" % context.absolute_url()) 24 24 if context.isStudent(): 25 25 info = context.getStudentInfo() 26 26 student = info['student'] 27 # doc = info['app_doc'] 28 # state = context.getStudentInfo()['review_state'] 29 # if state == 'admission_applied': 30 # elif state == 'application_pin_entered': 31 # return redirect("%s/passport_entry_view" % student.absolute_url()) 32 33 return redirect("%s/student_view" % student.absolute_url()) 27 doc = info['app_doc'] 28 state = context.getStudentInfo()['review_state'] 29 if state == 'admission_applied': 30 return redirect("%s/application_view" % student.absolute_url()) 31 elif state == 'application_pin_entered': 32 return redirect("%s/passport_entry_view" % student.absolute_url()) 34 33 35 34 -
WAeUP_SRP/trunk/skins/waeup_student/student_view.pt
r656 r659 1 1 <metal:html tal:define="info context/getStudentInfo; 2 is_manager info/is_manager|nothing;"> 2 is_manager info/is_manager|nothing; 3 is_student info/is_student|nothing"> 3 4 <metal:body use-macro="here/main_template/macros/master"> 4 5 <metal:main fill-slot="main"> … … 9 10 tal:define="review_state info/review_state; 10 11 rows python: info['items']"> 12 13 <a href="" tal:condition="is_manager" 14 tal:attributes="href string:${here/academicsParent}"> 15 <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/> 16 Up one level 17 </a> 11 18 12 <h3 >My Study Data</h3>19 <h3 tal:content="info/student/Title" /> 13 20 <br /> 14 21 15 <table tal:condition=" python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">22 <table tal:condition="is_manager" class="contentListing" width="100%" summary="content layout" id="folder_content"> 16 23 <tr tal:repeat="row rows" 17 24 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> 18 <td align="left" valign="middle" style="width: 5px;"19 tal:condition="is_manager">20 21 </td>22 25 <td><a href="view" tal:attributes="href string:${row/url}"> 23 26 <strong tal:content="row/title" /></a> </td> 24 25 27 <td> 26 28 <a tal:condition="row/is_editable" … … 31 33 </a> 32 34 </td> 33 34 35 </tr> 35 36 </table> 37 38 <table tal:condition="is_student" class="contentListing" width="100%" summary="content layout" id="folder_content"> 39 <span tal:repeat="row rows"> 40 <tr tal:condition="python:row['type'] == 'StudentApplication' and row['review_state'] in ['opened', 'closed']" 41 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> 42 <td><a href="view" tal:attributes="href string:${row/url}/application_view"> 43 <strong tal:content="row/title" /></a> </td> 44 <td> 45 <a tal:condition="row/is_editable" 46 href="edit" tal:attributes="href string:${here/absolute_url}/passport_entry_view"> 47 [edit] 48 </a> 49 </td> 50 </tr> 51 52 <tr tal:condition="python:row['type'] == 'StudentAccommodation' and row['review_state'] in ['opened', 'closed']" 53 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> 54 <td><a href="view" tal:attributes="href string:${row/url}/accommodation_view"> 55 <strong tal:content="row/title" /></a> </td> 56 <td> 57 </td> 58 </tr> 59 60 </span> 61 </table> 62 36 63 37 64 </span>
Note: See TracChangeset for help on using the changeset viewer.