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

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

revised study_level_view and methods

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