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

Last change on this file since 1873 was 1872, checked in by joachim, 18 years ago

fix for #252

  • Property svn:keywords set to Id
File size: 12.8 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: 0" 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">Your credits exceed 50</span>
144                     
145              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
146                     tal:attributes="value string:study_level_view"/> 
147                     
148              <br /><br />
149             
150              <span tal:condition="python: 0">
151              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
152              prior deletion, i.e. already deleted courses will show up again.
153              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                               
154              </span>
155              <span tal:condition="python: 1">
156              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
157              </span>             
158                     
159          </td>
160        </tr>
161      </table>
162      <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
163             class="folderButtons">
164        <tr>
165          <td align="left" valign="top" rowspan="3"></td>
166          <td align="left" valign="top">
167              <input type="button" value="Select all" class="context"
168                     onclick="someJavaScriptFunctionThatWillBeReplaced"
169                     i18n:attributes="value"
170                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
171                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
172                     />
173              <input type="submit" name="delete_course_result:method" value="Delete selected"
174                     class="destructive" i18n:attributes="value"
175                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
176                     ('Do you really want to delete the courses selected?', )"
177                     />
178              <input
179                     type="submit" name="refresh_level:method"
180                     class="context" value="Update"
181                     />
182              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
183                     class="context" value="Submit" /> 
184              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
185                     class="context" value="Validate" />
186              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
187                     class="context" value="Reject" />
188                     
189              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
190                     tal:attributes="value string:study_level_view"/>                         
191              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
192                     tal:attributes="value string:contact_student_form"/>                         
193
194          </td>
195        </tr>
196      </table>
197      <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
198             class="folderButtons">
199        <tr>
200          <td align="left" valign="top" rowspan="3"></td>
201          <td align="left" valign="top">
202              <input tal:condition="python: review_state == 'school_fee_paid'"
203                     type="button" value="Select all" class="context"
204                     onclick="someJavaScriptFunctionThatWillBeReplaced"
205                     i18n:attributes="value"
206                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
207                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
208                     />
209              <input tal:condition="python: review_state == 'school_fee_paid'"
210                     type="submit" name="delete_course_result:method" value="Delete selected"
211                     class="destructive" i18n:attributes="value"
212                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
213                     ('Do you really want to delete the courses selected?', )"
214                     />
215              <input tal:condition="python: review_state == 'school_fee_paid'"
216                     type="submit" name="refresh_level:method"
217                     class="context" value="Update"
218                     />
219              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
220                     class="context" value="Submit" /> 
221              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
222                     class="context" value="Validate" />
223              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
224                     class="context" value="Reject" />
225                     
226              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
227                     tal:attributes="value string:study_level_view"/>                         
228              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
229                     tal:attributes="value string:contact_student_form"/>   
230                                           
231
232          </td>
233        </tr>
234      </table>
235
236    </form>
237    <br />
238      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
239          tal:condition="show_check_boxes">
240      <table>
241        <tr>
242          <th>Course Id</th>
243          <td><input type="text" name="course_id"
244                     tal:attributes="value request/course_id|nothing"/></td>
245          <td colspan="2">
246            <input type="submit" name="add"
247                   class="context" value="Add Course"
248                   />
249            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
250                     tal:attributes="value string:study_level_view"/>                       
251          </td>               
252      </table>
253      </form>   
254  </span>
255  </span>         
256  </metal:main>
257</metal:body>
258
Note: See TracBrowser for help on using the repository browser.