source: main/waeup.sirp/trunk/src/waeup/sirp/hostels/browser_templates/hostelmanagepage.pt @ 7441

Last change on this file since 7441 was 7068, checked in by Henrik Bettermann, 13 years ago

Much more logic for bed allocation, bed release.

Implement student relocation.

File size: 3.5 KB
Line 
1<h2 i18n:translate=""
2  tal:condition="view/label"
3  tal:content="view/label">Label</h2>
4
5  <div class="form-status"
6      tal:define="status view/status"
7      tal:condition="status">
8      Form Status:
9      <span i18n:translate="" tal:content="view/status">
10        Form status summary
11      </span>
12      <ul tal:condition="view/errors">
13        <li tal:repeat="error view/error_views">
14           <span tal:replace="structure error">Error Type</span>
15        </li>
16      </ul>
17  </div>
18
19  <form action="." tal:attributes="action request/URL" method="POST"
20        class="edit-form" enctype="multipart/form-data">
21
22  <div id="tabs">
23    <ul>
24      <li><a href="#tab-1"><span>Hostel Data</span></a></li>
25      <li><a href="#tab-2"><span>Beds</span></a></li>
26    </ul>
27
28    <div id="tab-1">
29      <table class="zebra">
30      <tbody>
31      <tal:block repeat="widget view/widgets">
32        <tr>
33          <td class="label">
34            <label tal:attributes="for widget/name">
35              <span class="required" tal:condition="widget/required">*</span>
36              <span i18n:translate="" tal:content="widget/label">label</span>:
37            </label>
38          </td>
39          <td class="field">
40            <span class="widget" tal:content="structure widget">
41              <input type="text" />
42            </span>
43            <tal:error tal:condition="widget/error">
44              <span tal:replace="structure widget/error">error</span>
45            </tal:error>
46            <tal:hint tal:condition="widget/hint">
47              <span class="hint" tal:content="structure widget/hint">hint</span>
48            </tal:hint>
49          </td>
50        </tr>
51      </tal:block>
52      </tbody>
53      </table>
54      <div class="actionButtons" tal:condition="view/availableActions">
55        <span tal:repeat="action view/actions"
56              tal:omit-tag="">
57          <input tal:condition="python:action.label in view.taboneactions"
58                 tal:replace="structure action/render"/>
59        </span>
60      </div>
61    </div>
62
63    <div id="tab-2">
64      <h3>Beds</h3>
65      <table class="display dataTableManage">
66      <thead>
67        <tr>
68          <th>&nbsp;</th>
69          <th>Id</th>
70          <th>Type</th>
71          <th>Number</th>
72          <th>Owner</th>
73        </tr>
74      </thead>
75      <tbody>
76        <tr tal:repeat="value context/values">
77           <td>
78            <input type="checkbox" name="val_id"
79                  tal:attributes="value value/__name__" />
80          </td>
81          <td tal:content="value/bed_id">Id</td>
82          <td tal:content="value/bed_type">Type</td>
83          <td tal:content="value/bed_number">Number</td>
84          <td>
85            <a tal:condition="python: value.owner != view.not_occupied"
86               tal:attributes="href python: '%s/%s/accommodation' %
87                    (view.students_url,value.owner)">
88              <span tal:content="value/owner">Owner</span>
89            </a>
90            <a tal:condition="python: value.owner == view.not_occupied"
91               tal:attributes="href python: view.url(value)">
92            [allocate student]
93            </a>
94          </td>
95        </tr>
96      </tbody>
97      </table>
98
99      <div class="actionButtons" tal:condition="view/availableActions">
100        <span tal:repeat="action view/actions"
101              tal:omit-tag="">
102          <input tal:condition="python:action.label in view.tabtwoactions"
103                 tal:replace="structure action/render"/>
104        </span>
105      </div>
106
107    </div>
108  </div>
109</form> 
110
111
112
Note: See TracBrowser for help on using the repository browser.