source: WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt @ 1874

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

ticket #252 and more

  • Property svn:keywords set to Id
File size: 12.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             
5    <span tal:condition="not: info">
6      <span tal:content="here/illegal_view" />
7    </span>
8    <span tal:condition="info">
9    <span tal:define= "is_so context/isSectionOfficer;
10                       is_ca info/is_ca;
11                       show_check_boxes info/show_check_boxes;
12                       is_student info/is_student;
13                       status_info info/status_info;
14                       review_state info/review_state;
15                       view_only info/view_only">       
16    <div style="text-align: right"
17         tal:condition="python:review_state in ('courses_registered','courses_validated',)">
18    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
19        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')">
20        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
21        Course Registration Slip
22    </a>
23    </div>
24
25         
26    <a href=""
27       tal:attributes="href string:${here/academicsParent}">
28      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
29      Up one level
30    </a>
31            <div style="text-align: right"
32           tal:condition="python:review_state == 'courses_validated'">
33      <a href="" target="slip" tal:attributes="href string:course_registration_slip"
34          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')">
35          <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
36          Course Registration Slip
37      </a>
38     
39      </div>
40
41    <h3>
42      <span tal:condition="python: is_so or is_ca">
43        <span tal:content="info/student/name" />:
44      </span>
45      <span tal:condition="is_student">My </span>
46     
47      Course Registration Form for <span tal:content="here/title_or_id" />
48    </h3>
49             
50    <form action="." method="post" class="group" onsubmit="return submit_once()">
51      <span tal:condition="info/carry_overs" tal:omit-tag="">
52      <h4>Carryover Courses</h4>
53      <br />
54      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
55        <tr tal:repeat="row info/carry_overs"
56            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
57          <td align="left" valign="middle" style="width: 5px;"
58              tal:condition="show_check_boxes">
59            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
60                   tal:define="id row/id"
61                   tal:attributes="value id;
62                   id python:'cb_' + id;
63                   checked python:id in info['choosen_ids'];"
64                   />
65          </td>
66          <td width="78%" tal:content="row/title"></td>
67          <td align="center" width="10%" tal:content="row/code"></td>
68          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
69          <td align="center" width="2%" tal:content="row/credits"></td>
70          <td align="center" width="8%" tal:content="row/grade|string:"></td>
71        </tr>
72      </table>
73      </span>
74      <br />
75      <h4>Session Courses</h4>
76      <br />
77    <div class="" tal:condition="not: info/normal">
78      <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
79      <br /><br />
80    </div>
81      <table class="contentListing" width="100%" id="folder_content"
82             tal:condition="info/normal">     
83        <tr tal:repeat="row info/normal"
84            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
85          <td align="left" valign="middle" style="width: 5px;"
86             tal:condition="show_check_boxes">
87            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
88                   tal:define="id row/id"
89                   tal:attributes="value id;
90                   id python:'cb_' + id;
91                   checked python:id in info['choosen_ids'];"
92                   />
93          </td>
94          <td width="78%" tal:content="row/title"></td>
95          <td align="center" width="10%" tal:content="row/code"></td>
96          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
97          <td align="center" width="2%" tal:content="row/credits"></td>
98          <td align="center" width="8%" tal:content="row/coe|nothing"></td>
99         
100         
101
102
103          <td>
104          <a tal:condition="python:review_state == 'school_fee_paid'" href="edit" tal:attributes="href string:${row/code}/course_edit_form"
105          target="edit"
106          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')">
107          [edit]
108          </a>
109          </td>         
110         
111         
112        </tr>
113        <tr>
114          <td tal:condition="show_check_boxes" colspan="1"></td>
115          <td colspan="1"></td>
116          <th colspan="2">Total Credits:</th>
117          <td align="center" width="2%" tal:content="info/credits_total"></td>
118        </tr>
119      </table>
120
121     
122   
123     
124      <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
125             class="folderButtons">
126        <tr>
127          <td align="left" valign="top" rowspan="3"></td>
128          <td align="left" valign="top">
129              <input type="submit" name="delete_course_result:method" value="Delete selected"
130                     class="destructive" i18n:attributes="value"
131                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
132                     ('Do you really want to delete selected courses?', )"
133                     />
134              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
135                     class="context" value="Update"
136                     />
137                   
138                     
139              <br /><br />
140              <input tal:condition="not: info/credits_exceeded"
141                     type="submit" name="register_courses:method"
142                     class="context" value="Submit" />
143              <span tal:condition="info/credits_exceeded">
144                  <font color="red"> <strong>Your total credits exceed 50!</strong></font>
145              </span>
146                     
147              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
148                     tal:attributes="value string:study_level_view"/> 
149                     
150              <br /><br />
151             
152              <span tal:condition="python: 1">
153              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
154              prior deletion, i.e. already deleted courses will show up again.
155              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                               
156              </span>
157              <span tal:condition="python: 0">
158              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
159              </span>             
160                     
161          </td>
162        </tr>
163      </table>
164      <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
165             class="folderButtons">
166        <tr>
167          <td align="left" valign="top" rowspan="3"></td>
168          <td align="left" valign="top">
169              <input type="button" value="Select all" class="context"
170                     onclick="someJavaScriptFunctionThatWillBeReplaced"
171                     i18n:attributes="value"
172                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
173                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
174                     />
175              <input type="submit" name="delete_course_result:method" value="Delete selected"
176                     class="destructive" i18n:attributes="value"
177                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
178                     ('Do you really want to delete the courses selected?', )"
179                     />
180              <input
181                     type="submit" name="refresh_level:method"
182                     class="context" value="Update"
183                     />
184              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
185                     class="context" value="Submit" /> 
186              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
187                     class="context" value="Validate" />
188              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
189                     class="context" value="Reject" />
190                     
191              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
192                     tal:attributes="value string:study_level_view"/>                         
193              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
194                     tal:attributes="value string:contact_student_form"/>                         
195
196          </td>
197        </tr>
198      </table>
199      <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
200             class="folderButtons">
201        <tr>
202          <td align="left" valign="top" rowspan="3"></td>
203          <td align="left" valign="top">
204              <input tal:condition="python: review_state == 'school_fee_paid'"
205                     type="button" value="Select all" class="context"
206                     onclick="someJavaScriptFunctionThatWillBeReplaced"
207                     i18n:attributes="value"
208                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
209                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
210                     />
211              <input tal:condition="python: review_state == 'school_fee_paid'"
212                     type="submit" name="delete_course_result:method" value="Delete selected"
213                     class="destructive" i18n:attributes="value"
214                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
215                     ('Do you really want to delete the courses selected?', )"
216                     />
217              <input tal:condition="python: review_state == 'school_fee_paid'"
218                     type="submit" name="refresh_level:method"
219                     class="context" value="Update"
220                     />
221              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
222                     class="context" value="Submit" /> 
223              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
224                     class="context" value="Validate" />
225              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
226                     class="context" value="Reject" />
227                     
228              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
229                     tal:attributes="value string:study_level_view"/>                         
230              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
231                     tal:attributes="value string:contact_student_form"/>   
232                                           
233
234          </td>
235        </tr>
236      </table>
237
238    </form>
239    <br />
240      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
241          tal:condition="show_check_boxes">
242      <table>
243        <tr>
244          <th>Course Id</th>
245          <td><input type="text" name="course_id"
246                     tal:attributes="value request/course_id|nothing"/></td>
247          <td colspan="2">
248            <input type="submit" name="add"
249                   class="context" value="Add Course"
250                   />
251            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
252                     tal:attributes="value string:study_level_view"/>                       
253          </td>               
254      </table>
255      </form>   
256  </span>
257  </span>         
258  </metal:main>
259</metal:body>
260
Note: See TracBrowser for help on using the repository browser.