source: WAeUP_SRP/base/skins/waeup_student/study_level_view.pt @ 3090

Last change on this file since 3090 was 2956, checked in by Henrik Bettermann, 17 years ago

change condition for link to slip

  • Property svn:keywords set to Id
File size: 17.1 KB
Line 
1<metal:body use-macro="here/main_template/macros/master">
2  <metal:main fill-slot="main"
3          tal:define="info context/getStudyLevelInfo;">
4  <metal:block define-macro="edit_form">   
5             
6    <span tal:condition="not: info">
7      <span tal:content="here/illegal_view" />
8    </span>
9    <span tal:condition="info">
10    <span tal:define= "is_so context/isSectionOfficer;
11                       is_ca info/is_ca;
12                       show_check_boxes info/show_check_boxes;
13                       has_verdict info/has_verdict;
14                       submission_allowed info/submission_allowed;
15                       rejection_allowed info/rejection_allowed;
16                       is_current_level info/is_current_level;
17                       is_student info/is_student;
18                       ">       
19    <div style="text-align: right"
20         tal:condition="rejection_allowed">
21    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
22        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
23        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
24        Course Registration Slip
25    </a>
26    </div>
27   
28    <div style="text-align: right"
29         tal:condition="info/gpa">
30    <a href="" target="slip" tal:attributes="href string:new_session_results_slip"
31        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
32        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
33        Session Results Slip
34    </a>
35    </div>   
36
37         
38    <a href=""
39       tal:attributes="href string:${here/academicsParent}">
40      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
41      Up one level
42    </a>
43
44    <h3>
45      <span tal:condition="python: is_so or is_ca">
46        <span tal:content="info/student/name" />:
47      </span>
48      <span tal:condition="is_student">My </span>
49     
50      Course Registration Form for <span tal:content="here/Title" />
51    </h3>
52   
53        <br />
54        <table>
55          <tr>
56            <th  width="220px">Session:</th>
57            <td><span tal:content="info/session" /></td>
58          </tr>
59          <tr>
60            <th>Total Credits:</th>
61            <td tal:content="info/total_credits" />
62          </tr>
63          <tr tal:condition="has_verdict">
64            <th>Verdict:</th>
65            <td><span tal:content="info/verdict" /></td>
66          </tr>     
67          <tr tal:condition="info/gpa">
68            <th>GPA:</th>
69            <td><span tal:content="info/gpa" /></td>
70          </tr>
71        </table>           
72   
73             
74    <form action="." method="post" class="group" onsubmit="return submit_once()">
75      <span tal:condition="info/carry_overs" tal:omit-tag="">
76      <h3>Carryover Courses</h3>
77      <br />
78      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
79
80        <tr>
81        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')">Both Semesters</th>
82        <th align='center'></th>
83        <th align='center'>sm</th>
84        <th align='center'>cr</th>
85        <th align='center'>sc</th>
86        <th align='center'>gr</th>
87        <th align='center'>wt</th>
88        <th align='center'></th>
89        <th tal:condition="submission_allowed" align='center'></th>   
90           
91        </tr>         
92        <tr tal:repeat="row info/carry_overs"
93            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
94     
95          <td align="left" valign="middle" style="width: 5%;"
96              tal:condition="show_check_boxes">
97            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
98                   tal:define="id row/id"
99                   tal:attributes="value id;
100                   id python:'cb_' + id;
101                   checked python:id in info['choosen_ids'];"
102                   />
103          </td>
104
105          <td width="58%" tal:content="row/title"></td>
106          <td align="center" width="10%" tal:content="row/code"></td>
107          <td align="center" width="2%"><span tal:content="row/semester" /></td>
108          <td align="center" width="2%" tal:content="row/credits"></td>
109          <td align="center" width="4%" tal:content="row/score"></td>
110          <td align="center" width="2%" tal:content="row/grade"></td>
111          <td align="center" width="2%" tal:content="row/weight"></td>
112          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
113         
114          <td tal:condition="submission_allowed" align="center" width="5%">&nbsp;</td>
115       
116        </tr>
117      </table>
118      </span>
119
120      <div class="" tal:condition="python: info['data_missing'] and not info['spillover']">
121        <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
122        <br /><br />
123      </div>
124       
125      <span tal:condition="not:info/data_missing" tal:omit-tag="">
126      <h3>Session Courses</h3>
127      <br />
128
129      <table class="contentListing" width="100%" id="folder_content">
130       
131        <span tal:repeat="sem python:('1','2')">       
132                   
133        <tr>
134        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
135            tal:content="python: test(sem == '1','First Semester', 'Second Semester')" />
136        <th align='center'></th>
137        <th align='center'>sm</th>
138        <th align='center'>cr</th>
139        <th align='center'>sc</th>
140        <th align='center'>gr</th>
141        <th align='center'>wt</th>
142        <th align='center'></th>
143        <th tal:condition="submission_allowed" align='center'></th>   
144           
145        </tr>               
146        <tr tal:repeat="row python: test(sem == '1',info['normal1'],info['normal2'])"
147            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
148          <td align="left" valign="middle" style="width: 5%         ;"
149             tal:condition="show_check_boxes">
150            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
151                   tal:define="id row/id"
152                   tal:attributes="value id;
153                   id python:'cb_' + id;
154                   checked python:id in info['choosen_ids'];"
155                   />
156          </td>
157          <td width="58%" tal:content="row/title"></td>
158          <td align="center" width="10%" tal:content="row/code"></td>
159          <td align="center" width="2%"><span tal:content="row/semester" /></td>
160          <td align="center" width="2%" tal:content="row/credits"></td>
161          <td align="center" width="4%" tal:content="row/score"></td>
162          <td align="center" width="2%" tal:content="row/grade"></td>
163          <td align="center" width="2%" tal:content="row/weight"></td>
164          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
165         
166          <td tal:condition="submission_allowed" width="5%" align="center">
167            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
168            target="edit_course_result"
169            onclick="javascript:window.open('','edit_course_result','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
170            [edit]
171            </a>
172          </td>         
173        </tr>
174
175        </span>       
176       
177        <tr><th colspan="3" tal:condition="info/normal3"> Combined</th></tr>               
178        <tr tal:condition="info/normal3" tal:repeat="row info/normal3"
179            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
180          <td align="left" valign="middle" style="width: 5%;"
181             tal:condition="show_check_boxes">
182            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
183                   tal:define="id row/id"
184                   tal:attributes="value id;
185                   id python:'cb_' + id;
186                   checked python:id in info['choosen_ids'];"
187                   />
188          </td>
189          <td width="58%" tal:content="row/title"></td>
190          <td align="center" width="10%" tal:content="row/code"></td>
191          <td align="center" width="2%"><span tal:content="row/semester" /></td>
192          <td align="center" width="2%" tal:content="row/credits"></td>
193          <td align="center" width="4%" tal:content="row/score"></td>
194          <td align="center" width="2%" tal:content="row/grade"></td>
195          <td align="center" width="2%" tal:content="row/weight"></td>
196          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
197         
198          <td tal:condition="submission_allowed" width="5%" align="center">
199          <a href="edit" tal:attributes="href string:course_edit/${row/code}"
200          target="edit_course_result"
201          onclick="javascript:window.open('','edit_course_result','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
202          [edit]
203          </a>
204          </td>         
205        </tr>       
206       
207      </table>
208      </span>
209     
210      <br />
211      <table>
212      <tr><th>sm:</th> <td>Semester</td></tr>
213      <tr><th>cr:</th> <td>Credits</td></tr>
214      <tr><th>sc:</th> <td>Score</td></tr>
215      <tr><th>gr: </th> <td>Grade</td></tr>
216      <tr><th>wt: </th> <td>Weight</td></tr>
217      </table>     
218         
219      <br />
220     
221      <table tal:condition="python: is_student and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
222             class="folderButtons">
223        <tr>
224          <td align="left" valign="top" rowspan="3"></td>
225          <td align="left" valign="top">
226              <input type="submit" name="delete_course_result:method" value="Delete selected"
227                     class="destructive" i18n:attributes="value"
228                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
229                     ('Do you really want to delete selected courses?', )"
230                     />
231              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
232                     class="context" value="Update"
233                     />
234                   
235                     
236              <br /><br />
237              <input tal:condition="not: info/credits_exceeded"
238                     type="submit" name="register_courses:method"
239                     class="context" value="Submit to Course Adviser"
240                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
241                     ('Do you really want to submit the course list? You will not be able to edit your data after submission.', )" />
242              <span tal:condition="info/credits_exceeded">
243                  <font color="red"> <strong>Your total credits exceed <span tal:replace="info/max_credits" />!</strong></font>
244              </span>
245                     
246              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
247                     tal:attributes="value string:study_level_view"/> 
248                     
249              <br /><br />
250             
251              <span tal:condition="python: 1">
252              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
253              prior deletion, i.e. already deleted courses will show up again.
254              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                               
255              </span>
256              <span tal:condition="python: 0">
257              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
258              </span>             
259                     
260          </td>
261        </tr>
262      </table>
263      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
264             class="folderButtons">
265        <tr>
266          <td align="left" valign="top" rowspan="3"></td>
267          <td align="left" valign="top">
268              <input type="button" value="Select all" class="context"
269                     onclick="someJavaScriptFunctionThatWillBeReplaced"
270                     i18n:attributes="value"
271                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
272                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
273                     />
274              <input type="submit" name="delete_course_result:method" value="Delete selected"
275                     class="destructive" i18n:attributes="value"
276                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
277                     ('Do you really want to delete the courses selected?', )"
278                     />
279              <input
280                     type="submit" name="refresh_level:method"
281                     class="context" value="Update"
282                     />
283              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
284                     class="context" value="Submit" /> 
285              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
286                     class="context" value="Validate" />
287              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
288                     class="context" value="Reject" />
289                     
290              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
291                     tal:attributes="value string:study_level_view"/>                         
292              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
293                     tal:attributes="value string:contact_student_form"/>                         
294
295          </td>
296        </tr>
297      </table>
298      <table tal:condition="python:is_ca and is_current_level and not has_verdict" width="100%" cellspacing="0" cellpadding="2"
299             class="folderButtons">
300        <tr>
301          <td align="left" valign="top" rowspan="3"></td>
302          <td align="left" valign="top">
303              <input tal:condition="show_check_boxes"
304                     type="button" value="Select all" class="context"
305                     onclick="someJavaScriptFunctionThatWillBeReplaced"
306                     i18n:attributes="value"
307                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
308                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
309                     />
310              <input tal:condition="show_check_boxes"
311                     type="submit" name="delete_course_result:method" value="Delete selected"
312                     class="destructive" i18n:attributes="value"
313                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
314                     ('Do you really want to delete the courses selected?', )"
315                     />
316              <input tal:condition="show_check_boxes"
317                     type="submit" name="refresh_level:method"
318                     class="context" value="Update"
319                     />
320              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
321                     class="context" value="Submit" /> 
322              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
323                     class="context" value="Validate" />
324              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
325                     class="context" value="Reject" />
326                     
327              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
328                     tal:attributes="value string:external_study_level_view"/>                         
329              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
330                     tal:attributes="value string:external_contact_student_form"/>   
331                                           
332
333          </td>
334        </tr>
335      </table>
336
337    </form>
338    <br />
339      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
340          tal:condition="show_check_boxes">
341      <table>
342        <tr>
343          <th>Course Id</th>
344          <td><input type="text" name="course_id"
345                     tal:attributes="value request/course_id|nothing"/></td>
346          <td colspan="2">
347            <input type="submit" name="add"
348                   class="context" value="Add Course"
349                   />
350            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
351                     tal:attributes="value string:study_level_view"/>                       
352          </td>               
353      </table>
354      </form>   
355  </span>
356  </span>       
357  </metal:block>   
358  </metal:main>
359
360</metal:body>
361
Note: See TracBrowser for help on using the repository browser.