source: WAeUP_SRP/trunk/skins/waeup_accommodation/accommodations.pt @ 5619

Last change on this file since 5619 was 5616, checked in by Henrik Bettermann, 14 years ago

Implement second part of new accommodation allocation module. This part contains the new scripts and page templates needed. See ReadMe?.txt for further instructions.

File size: 3.3 KB
Line 
1<metal:body use-macro="here/main_template/macros/master">
2  <metal:main fill-slot="main"
3              tal:define="info context/getAccommodationRecords;">
4    <span tal:condition="not: info">
5      <span tal:content="here/illegal_view" />
6    </span>
7    <span tal:condition="info" tal:omit-tag="">
8      <span tal:define= " rows info/accommodations;
9      is_student info/is_student;
10      s_name info/student_name;"
11      >
12        <a href=""
13           tal:attributes="href string:${context/absolute_url}">
14          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
15          Up one level
16        </a>
17        <h3>
18          <span tal:condition="not:is_student" tal:omit-tag="">
19            <span tal:content="s_name" />:</span>
20          <span tal:condition="is_student" tal:omit-tag="">My</span> Accommodation Bookings
21        </h3>
22        <br />
23       
24        <table class="registration" width="100%">
25          <tr>
26            <th>Session</th>
27            <th>Bed</th>
28
29            <th>&nbsp;</th>
30          </tr>                   
31          <tr tal:repeat="row rows"
32              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
33            <td tal:attributes="class python:test(row['paid'], 'active')"
34                tal:content="python:context.portal_vocabularies.sessions.get(row['session'])" />
35            <td tal:attributes="class python:test(row['paid'], 'active')"
36                tal:content="python:context.getFormattedBed(row['bed'])" />
37
38            <td tal:condition="not:row/paid">
39              <a
40                 tal:attributes="href string:${row/url}/pay_accommodation?session=${row/session}">
41                 [pay maintenance fee]
42              </a>
43            </td>
44
45            <td>
46              <a target="slip" href=""
47                 tal:attributes="href string:${row/url}/viewAccommodationRecord?session=${row/session}"
48                 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')">
49                 [view slip]
50              </a>
51            </td>
52            <td tal:condition="row/cancellation_allowed">
53              <a href=""
54                 tal:attributes="href string:${row/url}/cancel_allocation?session=${row/session}">
55                 [cancel booking]
56              </a>
57            </td>           
58            <td tal:condition="row/relocation_allowed">
59              <a href=""
60                 tal:attributes="href string:${row/url}/relocate?session=${row/session}">
61                 [relocate]
62              </a>
63            </td>             
64          </tr>
65        </table>
66        <br /><br />
67        <form action="" method="post" class="group"
68              tal:condition="python: info['booking_allowed'] and not info['booking_disabled']"
69              tal:attributes="action string:${context/absolute_url}/book_accommodation">
70          <input type="submit" class="context" value="Proceed to Accommodation Booking" />
71          <input type="hidden" name="xxx"
72                 tal:attributes="value string:xxx"
73                 /> &nbsp; <br /><br />
74        </form>     
75       
76      </span>
77    </span>
78  </metal:main>
79</metal:body>
Note: See TracBrowser for help on using the repository browser.