Changeset 182
- Timestamp:
- 16 Nov 2005, 23:30:12 (19 years ago)
- Location:
- waeup_product/trunk/skins
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r179 r182 908 908 'is_i18n': 0, 909 909 'readonly_layout_modes': [], 910 'hidden_layout_modes': [ ],910 'hidden_layout_modes': ['create','edit'], 911 911 'hidden_readonly_layout_modes': [], 912 912 'hidden_empty': 0, … … 922 922 }###) 923 923 924 student_eligibility = { ###( 925 'widgets': { 924 eli_widgets = { ###( 926 925 'jamb_results': { 927 926 'type': 'String Widget', … … 1010 1009 }, 1011 1010 'schoolresults': schoolresults, 1012 }, 1011 }###) 1012 1013 1014 student_eligibility = { ###( 1015 'widgets': eli_widgets, 1013 1016 'layout': { 1014 1017 'style_prefix': 'layout_waeup_', 1018 'flexible_widgets': (), 1019 'ncols': 1, 1020 'rows': [ 1021 [{'widget_id': 'jamb_results', 'ncols': 1},], 1022 [{'widget_id': 'jamb_aggregate', 'ncols': 1},], 1023 [{'widget_id': 'jamb_listing_date', 'ncols': 1},], 1024 [{'widget_id': 'faculty', 'ncols': 1},], 1025 [{'widget_id': 'course', 'ncols': 1},], 1026 [{'widget_id': 'schoolresults', 'ncols': 1},], 1027 ] 1028 }, 1029 }###) 1030 1031 student_eligibility_edit = { ###( 1032 'widgets': eli_widgets, 1033 'layout': { 1034 'style_prefix': 'layout_eligibility_', 1015 1035 'flexible_widgets': (), 1016 1036 'ncols': 1, … … 2379 2399 layouts['student_personal_addon'] = student_personal_addon 2380 2400 layouts['student_eligibility'] = student_eligibility 2401 layouts['student_eligibility_edit'] = student_eligibility_edit 2381 2402 layouts['student_schoolresults'] = student_schoolresults 2382 2403 layouts['accommodation'] = accommodation -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r181 r182 427 427 'permission': (ModifyPortalContent,), 428 428 'category': 'object', 429 'visible': True,}, 429 'visible': True, 430 }, 430 431 {'id': 'metadata', 431 432 'name': 'action_metadata', … … 468 469 {'id': 'edit', 469 470 'name': 'action_edit', 470 'action': 'string:${object_url}/ student_eligibility_edit_form',471 'action': 'string:${object_url}/eligibility', 471 472 'permission': (ModifyPortalContent,), 472 473 'category': 'object', 473 'visible': False,},474 'visible': True,}, 474 475 {'id': 'metadata', 475 476 'name': 'action_metadata', -
waeup_product/trunk/skins/waeup_faculty/get_departments_voc.py
r173 r182 5 5 6 6 """ 7 academics = context.sections.portal.academics 7 #academics = context.sections.portal.academics 8 academics = context.portal_catalog(id = 'academics')[0].getObject() 8 9 faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty'] 9 10 … … 12 13 departments = [d for d in context.filterContents(items=faculty.contentValues()) if d.portal_type == 'Department'] 13 14 deplist.extend(departments) 14 if key is None:15 if not key: 15 16 return [(d.getId(),d.title_or_id(),) for d in deplist] 16 17 return [d.title_or_id() for d in deplist if d.getId() == key][0] -
waeup_product/trunk/skins/waeup_faculty/get_faculties_voc.py
r173 r182 5 5 6 6 """ 7 academics = context. sections.portal.academics7 academics = context.portal_catalog(id = 'academics')[-1].getObject() 8 8 items = [i for i in context.filterContents(items=academics.contentValues()) if i.portal_type == 'Faculty'] 9 if key is None: 9 context.REQUEST.set('items', items) 10 context.REQUEST.set('key', key) 11 if not key: 10 12 return [(f.getId(),f.title_or_id(),) for f in items] 11 13 return [f.title_or_id() for f in items if f.getId() == key][0] -
waeup_product/trunk/skins/waeup_student/eligibility.py
r179 r182 9 9 rset = request.set 10 10 fget = request.form.get 11 form = request.form 11 12 fhas = request.form.has_key 12 13 … … 18 19 sr = eli.schoolresults 19 20 20 res,psm,ds = lt.renderLayout(layout_id= 'student_schoolresults', 21 validate = fhas('add') or fhas('change') or fhas('delete') 22 23 form['widget__jamb_results'] = eli.jamb_results 24 form['widget__jamb_aggregate'] =eli.jamb_aggregate 25 form['widget__faculty'] =eli.faculty 26 form['widget__course'] =eli.course 27 res,psm,ds = lt.renderLayout(layout_id= 'student_eligibility_edit', 21 28 schema_id= 'student_eligibility', 22 29 context=context, … … 29 36 30 37 inr = 0 38 rset('ds',ds) 31 39 if fhas('add') and (fget('type') or fget('subject') or fget('result')): 32 40 sr.append((fget('type'),fget('subject'),fget('result'))) … … 48 56 else: 49 57 psm = '' 50 eli.edit(mapping={'schoolresults': sr}) 51 res,dummy,ds = lt.renderLayout(layout_id= 'student_schoolresults', 58 ds.set('schoolresults',sr) 59 eli.edit(mapping={'schoolresults':sr, 60 'jamb_aggregate': fget('widget__aggregate'), 61 }) 62 #eli.edit(mapping=ds) 63 res,dummy,ds = lt.renderLayout(layout_id= 'student_eligibility_edit', 52 64 schema_id= 'student_eligibility', 53 65 context=context, -
waeup_product/trunk/skins/waeup_student/layout_eligibility_create.pt
r165 r182 10 10 edit_form python:ti and ti.getActionById('edit', 'cpsdocument_edit_form') or 'cpsdocument_edit_form'; 11 11 metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata'; 12 formaction string:check_admission_form;12 formaction options/formaction; 13 13 first_layout options/first_layout|python:0; 14 14 last_layout options/last_layout|python:0; 15 15 is_flexible options/is_flexible; 16 16 cpsmcat nocall:here/translation_service; 17 results options/schoolresults; 17 18 " 18 19 > 19 <form action='eligibility' method='post' 20 <form action='eligibility' method='post' tal:attributes="action formaction" 20 21 enctype='multipart/form-data' class='workflow'> 21 22 <div class='group'> … … 76 77 </tr> 77 78 </table> 78 <input type="submit" class="standalone" name="cpsdocument_edit_button" value="submit" /> 79 </div> 80 </div> 79 <table cellspacing="0" cellpadding="2" border="0" width="100%" tal:condition="results|nothing"> 80 <tr> 81 <td align="left" valign="top"> 82 83 </td> 84 <td align="left" valign="top"> 85 <div class="label">Type</div> 86 </td> 87 <td align="left" valign="top"> 88 <div class="label">Subject</div> 89 </td> 90 <td align="left" valign="top"> 91 <div class="label">Result</div> 92 </td> 93 </tr> 94 <span tal:repeat="row results" tal:omit-tag=""> 95 <tr tal:define="rindex repeat/row/index"> 96 <td align="left" valign="top"> 97 <input type="checkbox" name="keys:list" value="100" tal:attributes="value string:${repeat/row/index}"/> 98 </td> 99 <td align="left" valign="top"> 100 <div class="field"> 101 <input type="text" name="key_0" value="100" size="20" 102 tal:attributes="name string:type_${rindex};value python:row[0]" /> 103 </div> 104 </td> 105 <td align="left"> 106 <div class="field"> 107 <input type="text" name="label_0" value="Year 1 (100 Level)" size="40" 108 tal:attributes="name string:subject_${rindex};value python:row[1]" /> 109 </div> 110 </td> 111 <td align="left"> 112 <div class="field"> 113 <input type="text" name="msgid_0" value="" size="10" 114 tal:attributes="name string:result_${rindex};value python:row[2]" /> 115 </div> 116 </td> 117 </tr> 118 </span> 119 <tr> 120 <td align="left" colspan="3"> 121 <input class="standalone" type="submit" name="change" value=" Change " /> 122 <input class="standalone" type="submit" name="delete" value=" Delete " /> 123 </td> 124 </tr> 125 </table> 126 <table cellspacing="0" cellpadding="2" border="0" width="100%"> 127 <tr> 128 <td align="left" valign="top" colspan="2"> 129 <div>Add a new postprimary school result</div> 130 </td> 131 </tr> 132 <tr> 133 <td align="left" valign="top"> 134 135 </td> 136 <td align="left" valign="top"> 137 <div class="label">Type</div> 138 </td> 139 <td align="left" valign="top"> 140 <div class="label">Subject</div> 141 </td> 142 <td align="left" valign="top"> 143 <div class="label">Result</div> 144 </td> 145 </tr> 146 <tr> 147 <td align="left" valign="top"> 148 149 </td> 150 <td align="left" valign="top"> 151 <div class="field"> 152 <input type="text" name="type" value="" size="20" /> 153 </div> 154 </td> 155 <td align="left"> 156 <div class="field"> 157 <input type="text" name="subject" value="" size="40" /> 158 </div> 159 </td> 160 <td align="left"> 161 <div class="field"> 162 <input type="text" name="result" value="" size="10" /> 163 </div> 164 </td> 165 </tr> 166 <tr> 167 <td align="left" colspan="3"> 168 <input class="standalone" type="submit" name="add" value=" Add " /> 169 </td> 170 </tr> 171 </table> 81 172 </form> 82 173 </metal:block> -
waeup_product/trunk/skins/waeup_student/process_waeup_login.py
r179 r182 53 53 context.notifyCPSDocumentCreation(ob=pd) 54 54 55 return response.redirect("%s /personal_addon" % ma.absolute_url())55 return response.redirect("%s" % ma.absolute_url()) 56 56 #return ma.personal_addon(REQUEST=context.REQUEST) 57 57
Note: See TracChangeset for help on using the changeset viewer.