source: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt @ 9534

Last change on this file since 9534 was 9534, checked in by Henrik Bettermann, 12 years ago

List reserved beds in row not in a column.

File size: 2.9 KB
Line 
1<form action="." tal:attributes="action request/URL" method="POST"
2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
3
4  <ul class="tabs" data-tabs="tabs">
5    <li tal:attributes="class view/tab1"><a href="#tab-1">
6      <span i18n:translate="">Hostel Data</span></a>
7    </li>
8    <li tal:attributes="class view/tab2"><a href="#tab-2">
9      <span i18n:translate="">Beds</span></a>
10    </li>
11  </ul>
12
13  <div class="tab-content">
14    <div id="tab-1" tal:attributes="class view/tab1">
15      <table class="form-table">
16      <tbody>
17        <tal:widgets content="structure provider:widgets" />
18        <tr>
19          <td class="fieldname" i18n:translate="" >
20            Reserved Beds:
21          </td>
22          <td>
23            <tal:repeat repeat="bed context/beds_reserved" >
24                <span tal:replace='bed'>BED</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
25            </tal:repeat>
26          </td>
27        </tr>
28      </tbody>
29      </table>
30      <div tal:condition="view/availableActions">
31        <span tal:repeat="action view/actions"
32              tal:omit-tag="">
33          <input tal:condition="python:action.label in view.taboneactions"
34                 tal:replace="structure action/render"/>
35        </span>
36      </div>
37    </div>
38
39    <div id="tab-2" tal:attributes="class view/tab2">
40      <h3>Beds</h3>
41      <table class="display dataTableManage">
42      <thead>
43        <tr>
44          <th>&nbsp;</th>
45          <th i18n:translate="">Id</th>
46          <th i18n:translate="">Type</th>
47          <th i18n:translate="">Number</th>
48          <th i18n:translate="">Owner</th>
49        </tr>
50      </thead>
51      <tbody>
52        <tr tal:repeat="value context/values">
53           <td>
54            <input type="checkbox" name="val_id"
55                  tal:attributes="value value/__name__" />
56          </td>
57          <td tal:content="value/bed_id">ID</td>
58          <td tal:content="value/bed_type">TYPE</td>
59          <td tal:content="value/bed_number">NUMBER</td>
60          <td>
61            <a tal:condition="python: value.owner != view.not_occupied"
62               tal:attributes="href python: '%s/%s/accommodation' %
63                    (view.students_url,value.owner)">
64              <span tal:content="value/owner">OWNER</span>
65            </a>
66            <a tal:condition="python: value.owner == view.not_occupied"
67               tal:attributes="href python: view.url(value)"
68               i18n:translate="">
69            [allocate student]
70            </a>
71          </td>
72        </tr>
73      </tbody>
74      </table>
75
76      <div tal:condition="view/availableActions">
77        <span tal:repeat="action view/actions"
78              tal:omit-tag="">
79          <input tal:condition="python:action.label in view.tabtwoactions"
80                 tal:replace="structure action/render"/>
81        </span>
82      </div>
83
84    </div>
85  </div>
86</form> 
87
88
89
Note: See TracBrowser for help on using the repository browser.