Changeset 535 for WAeUP_SRP/trunk/skins
- Timestamp:
- 19 Sep 2006, 07:53:21 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 12 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r524 r535 13 13 $Id: logged_in.py 34693 2006-03-23 17:44:22Z ogrisel $ 14 14 """ 15 import DateTime 16 current = DateTime.DateTime() 15 17 16 18 from urllib import unquote … … 26 28 return to_member_home, to_workspaces 27 29 30 request = context.REQUEST 31 response = request.RESPONSE 28 32 utool = context.portal_url 29 33 mtool = context.portal_membership … … 43 47 if not is_anon: 44 48 if "Student" in member.getRoles(): 45 member_id = str(member) 46 student = getattr(context.campus.students,member_id,) 47 if context.portal_workflow.getInfoFor(student, 48 'review_state', 49 None) == "created": 49 to_waeup_student_home = True 50 info = context.getStudentInfo() 51 student = info['student'] 52 ## member_id = str(member) 53 ## student = getattr(context.campus.students,member_id,) 54 ## if context.portal_workflow.getInfoFor(student, 55 ## 'review_state', 56 ## None) == "created": 57 if info['review_state'] == "created": 50 58 student.content_status_modify(workflow_action="enter_application_pin") 51 59 da = {} … … 53 61 da['app_ac_pin'] = pin 54 62 da['app_ac_date'] = current 55 application.getContent().edit(mapping = da) 56 to_waeup_student_home = True 63 info['app_doc'].edit(mapping = da) 57 64 elif "Manager" in member.getRoles(): 58 65 pass -
WAeUP_SRP/trunk/skins/waeup_custom/standard_error_message.pt
r531 r535 15 15 <tal:haserror condition="error_type"> 16 16 <tal:NotFound condition="python:error_type == 'NotFound'"> 17 <metal:block use-macro="here/ not_found/macros/not_found" />17 <metal:block use-macro="here/error_not_found/macros/not_found" /> 18 18 </tal:NotFound> 19 19 20 <tal:default condition="python: 0 anderror_type != 'NotFound'">21 <metal:block use-macro="here/error_ lib_other/macros/other" />20 <tal:default condition="python:error_type != 'NotFound'"> 21 <metal:block use-macro="here/error_other/macros/other" /> 22 22 </tal:default> 23 23 24 <tal:debugging condition="python: 0 andcheckPerm('Manage portal', here)">24 <tal:debugging condition="python:checkPerm('Manage portal', here)"> 25 25 <table width="100%" cellpadding="2" cellspacing="2"> 26 26 <tr> -
WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt
r486 r535 4 4 roles member/getRoles; 5 5 backend python:'Manager' in roles or 'SectionManager' in roles; 6 frontend python:'Student' in roles or isAnon;" 6 frontend python:'Student' in roles or isAnon; 7 info context/getStudentInfo;" 7 8 > 8 9 <tal:block condition="not:isAnon"> 9 <strong> <span tal:content="python:member.getProperty('fullname',None)" /> 10 <strong> <span tal:condition="info" tal:content="python:info['per_doc'].lastname" /> 11 <span tal:condition="not: info" tal:content="python:member.getProperty('fullname',None)" /> 10 12 </strong> 11 13 </tal:block> -
WAeUP_SRP/trunk/skins/waeup_student/home_student.pt
r530 r535 1 <metal:html tal:define="info context/get _student_info">1 <metal:html tal:define="info context/getStudentInfo"> 2 2 3 <metal:body use-macro="here/main_template/macros/master">3 <metal:body use-macro="here/main_template/macros/master"> 4 4 5 <metal:main fill-slot="main"> 6 <span tal:condition="isAnon"> 7 <h2>Welcome to the 8 9 <br />Student Registration Portal of the University of Benin, Nigeria</h2> 10 11 <br /> 12 13 <p>This is the frontpage of Uniben's Student Registration Portal (SRP) which is part of the West African e-University Project. 14 For further information see 15 <a href="" tal:attributes="href string:http://waeup.org">waeup.org</a>.</p> 16 17 <p><strong>Fresh Students</strong>, who register for the first time, proceed to the respective application 18 entrance page (UME, DE or Local Programmes). Later they can login to check their admission status and to 19 proceed with the admission and clearance process.</p> 20 21 <p><strong>Returning Students</strong> can login to check the course results of the previous session, 22 to register courses for the current session, to pay their school fees and to book accommodation.</p> 23 24 <p>This site is best seen in Firefox browser.</p> 25 </span> 26 <span tal:condition="python:not isAnon and info"> 27 <h3 tal:content="info/review_state|nothing"></h3> 28 <span tal:omit-tag="" tal:condition="python:info['review_state'] == 'admission_applied'" 29 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 30 layout_mode='view', 31 layout_id='student_application_fe')" /> 32 33 34 </span> 35 </metal:main> 36 </metal:body> 5 <metal:main fill-slot="main"> 6 <span tal:condition="isAnon"> 7 <h2>Welcome to the 8 <br />Student Registration Portal of the University of Benin, Nigeria</h2> 9 <br /> 10 <p>This is the frontpage of Uniben's Student Registration Portal (SRP) which is part of the West African e-University Project. 11 For further information see 12 <a href="" tal:attributes="href string:http://waeup.org">waeup.org</a>.</p> 13 <p><strong>Fresh Students</strong>, who register for the first time, proceed to the respective application 14 entrance page (UME, DE or Local Programmes). Later they can login to check their admission status and to 15 proceed with the admission and clearance process.</p> 16 <p><strong>Returning Students</strong> can login to check the course results of the previous session, 17 to register courses for the current session, to pay their school fees and to book accommodation.</p> 18 <p>This site is best seen in Firefox browser.</p> 19 </span> 20 <span tal:condition="python:not isAnon and info" 21 tal:define="review_state info/review_state"> 22 <h3 tal:content="info/review_state|nothing"></h3> 23 <span tal:omit-tag="" tal:condition="python:review_state == 'admission_applied'" 24 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 25 layout_mode='view', 26 layout_id='student_application_fe')" 27 /> 28 <span tal:omit-tag="" tal:condition="python: review_state == 'application_pin_entered'" 29 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 30 layout_mode='edit', 31 layout_id='student_application_fe')" 32 /> 33 </span> 34 <span tal:condition="python:not isAnon and not info"> 35 <table tal:define="students python: context.objectValues()"> 36 <tr tal:repeat="student students"> 37 <span tal:omit-tag="" tal:define="info python: context.getStudentInfo(student)"> 38 <td><span tal:replace="python: info['per_doc'].lastname" /></td> 39 <td><span tal:replace="python: info['app_doc'].jamb_reg_no" /></td> 40 <td><span tal:replace="info/review_state" /></td> 41 </span> 42 </tr> 43 </table> 44 </span> 45 </metal:main> 46 </metal:body> 37 47 </metal:html> -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt
r502 r535 12 12 ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None); 13 13 cpsmcat nocall:here/translation_service; 14 apply request/apply_button|nothing; 14 15 "> 15 16 … … 72 73 <br /> 73 74 <input type="submit" class="standalone" name="cpsdocument_edit_button" 74 value="button_change" i18n:attributes="value" id="cpsdocument_edit_button" 75 tal:condition="not:creation" /> 76 <input type="submit" class="standalone" name="cpsdocument_edit_and_view_button" 77 value="button_change_and_view" i18n:attributes="value" 78 id="cpsdocument_edit_and_view_button" 79 tal:condition="python:0 and not creation" /> 75 value="button_change" 76 id="cpsdocument_edit_button" 77 tal:condition="not:creation" /> 78 <input type="submit" class="standalone" name="apply_admission" 79 value="apply for admission" 80 id="cpsdocument_edit_and_view_button" 81 tal:condition="apply" 82 tal:attributes="value apply"/> 80 83 <input type="submit" 81 84 class="standalone" … … 87 90 </form> 88 91 </metal:block> 89 90 -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_view.pt
r524 r535 1 1 <!-- a layout_lib macro --> 2 2 <!-- $Id: layout_lib_default_view.pt 34052 2006-03-06 14:59:24Z atchertchian $ --> 3 4 3 <metal:block define-macro="default_view" 5 4 tal:define="layout options/layout; 6 5 dm options/datastructure/getDataModel; 7 6 widgets python:context.getRenderedWidgets(layout); 8 "> 9 <span tal:condition="nothing" tal:replace="structure widgets" /> 10 <table width="100%" cellpadding="2" cellspacing="2" summary="layout"> 11 <tr tal:repeat="row layout/rows"> 12 <td tal:repeat="cell row" tal:attributes="colspan cell/ncols"> 13 <tal:block define="widget cell/widget"> 14 <div tal:attributes="class cell/widget_css_class|nothing; 15 id python:widget.getHtmlWidgetId()+'_widget'; 16 "> 17 <tal:block condition="widget/label"> 18 <span class="dlabel" i18n:translate="" tal:condition="widget/is_i18n" 19 tal:content="widget/label">label</span> 20 <span class="dlabel" tal:condition="not:widget/is_i18n" 21 tal:content="widget/label">label</span> 7 fields python:('jamb_reg_no', 8 'app_ac_pin', 9 'app_ac_date', 10 'jamb_lastname', 11 'jamb_sex', 12 'jamb_first_cos', 13 'jamb_second_cos',)" 14 > 15 <span tal:condition="nothing" tal:replace="structure widgets" /> 16 <table width="100%" cellpadding="2" cellspacing="2" summary="layout"> 17 <tr tal:repeat="field fields"> 18 <td tal:define="cell python: widgets[field]"> 19 <tal:block define="widget cell/widget"> 20 <div tal:attributes="class cell/widget_css_class|nothing; 21 id python:widget.getHtmlWidgetId()+'_widget';" 22 > 23 <tal:block condition="widget/label"> 24 <span class="dlabel" 25 tal:content="widget/label">label</span> 26 </tal:block> 27 <tal:block replace="structure cell/widget_rendered" /> 28 </div> 22 29 </tal:block> 23 <tal:block replace="structure cell/widget_rendered" /> 24 </div> 25 </tal:block> 26 </td> 27 </tr> 28 </table> 30 </td> 31 </tr> 32 <tr> 33 <td tal:define="cell widgets/passport"> 34 <tal:block define="widget cell/widget"> 35 <div tal:attributes="class cell/widget_css_class|nothing; 36 id python:widget.getHtmlWidgetId()+'_widget';" 37 > 38 <tal:block condition="widget/label"> 39 <span class="dlabel" 40 tal:content="widget/label">label</span> 41 </tal:block> 42 <img src="img" tal:attributes="src string:${context/aq_parent/absolute_url}/passport" /> 43 </div> 44 </tal:block> 45 </td> 46 </tr> 47 </table> 29 48 </metal:block> -
WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt
r522 r535 5 5 roles member/getRoles; 6 6 item nocall:options/context_obj; 7 info item/get _student_info;"7 info item/getStudentInfo;" 8 8 condition="python:'Student' in roles 9 9 "> -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r523 r535 33 33 # Validate the document and write it if it's valid 34 34 # (We don't call getEditableContent here, validate does it when needed.) 35 doc = context.getContent()35 info = context.getStudentInfo() 36 36 37 if context.portal_type == "StudentApplication": 38 student = context.aq_parent 39 state = context.portal_workflow.getInfoFor(student,'review_state',None) 37 student = info['student'] 38 app = info['app'] 39 app_doc = info['app_doc'] 40 state = context.getStudentInfo()['review_state'] 41 42 if context.portal_type == "Student": 40 43 if state == "application_pin_entered": 41 44 student.content_status_modify(workflow_action="apply_for_admission") 42 if doc.passport is None:43 is_valid, ds = doc.validate(request=REQUEST,44 proxy= context,45 if app_doc.passport is None: 46 is_valid, ds = app_doc.validate(request=REQUEST, 47 proxy=app_doc, 45 48 layout_id = "student_application_fe", 46 49 layout_mode = 'edit', 47 50 use_session=True) 48 51 49 action = '/application_form'52 action = "/student_edit" 50 53 if is_valid: 51 comments = REQUEST.get('comments')52 context.cpsdocument_notify_modification(comments=comments)53 if cpsdocument_edit_and_view_button is not None:54 action = ''55 54 psm = 'You successfully uploaded your passport image.' 56 55 args = {} 57 action = "/view"58 56 else: 59 57 psm = 'psm_content_error' 60 58 args = getFormUidUrlArg(REQUEST) 59 elif 'apply_admission' not in REQUEST.form: 60 is_valid, ds = app_doc.validate(request=REQUEST, 61 proxy=app_doc, 62 layout_id = "student_application_fe", 63 layout_mode = 'edit', 64 use_session=True) 65 action = "/passport_entry_view" 66 if is_valid: 67 args = {} 68 if 'apply_admission' not in REQUEST.form: 69 args = {'apply_button': 'Save and Apply',} 70 psm = 'You successfully uploaded your passport image.' 71 else: 72 psm = 'You applied for admission.' 73 else: 74 args = getFormUidUrlArg(REQUEST) 75 #psm = 'psm_content_error' 76 psm = '%s' % ds 61 77 else: 62 78 args = {} 63 psm = "You successfully applied for admission."64 action = "/ view"79 psm = 'You applied for admission.' 80 action = "/application_view" 65 81 else: 66 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,82 is_valid, ds = app_doc.validate(request=REQUEST, proxy=context, cluster=cluster, 67 83 use_session=True) 68 84 69 85 if action is None: 70 ti = doc.getTypeInfo()86 ti = app.getTypeInfo() 71 87 action = ti.queryMethodID('edit', 'cpsdocument_edit_form') 72 88 action = '/' + action
Note: See TracChangeset for help on using the changeset viewer.