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

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

Internationalize hostels package.

Remove exception catcher in switchReservations and corresponding test.

When testing the hostel configuration manually I found out that the beds_reserved list attribute of halls
only changed during the lifetime of a running instance. After restarting the portal all changes were gone.
Also "hostel._p_changed = True" didn't help. The only solution was to reassign the attribute to ensure persistance.

Unfortunately, the current tests don't catch such a malfunction. This has to be improved.

File size: 3.2 KB
Line 
1<form action="." tal:attributes="action request/URL" method="POST"
2      i18n:domain="waeup.sirp" 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:block repeat="widget view/widgets">
18        <tr>
19          <td class="fieldname">
20            <span class="required" tal:condition="widget/required">*</span>
21            <span tal:content="widget/label">LABEL</span>:
22          </td>
23          <td>
24            <span class="widget" tal:content="structure widget">
25              <input type="text" />
26            </span>
27            <tal:error tal:condition="widget/error">
28              <span tal:replace="structure widget/error">ERROR</span>
29            </tal:error>
30            <tal:hint tal:condition="widget/hint">
31              <span tal:content="structure widget/hint">HINT</span>
32            </tal:hint>
33          </td>
34        </tr>
35      </tal:block>
36      </tbody>
37      </table>
38      <div tal:condition="view/availableActions">
39        <span tal:repeat="action view/actions"
40              tal:omit-tag="">
41          <input tal:condition="python:action.label in view.taboneactions"
42                 tal:replace="structure action/render"/>
43        </span>
44      </div>
45    </div>
46
47    <div id="tab-2" tal:attributes="class view/tab2">
48      <h3>Beds</h3>
49      <table class="display dataTableManage">
50      <thead>
51        <tr>
52          <th>&nbsp;</th>
53          <th i18n:translate="">Id</th>
54          <th i18n:translate="">Type</th>
55          <th i18n:translate="">Number</th>
56          <th i18n:translate="">Owner</th>
57        </tr>
58      </thead>
59      <tbody>
60        <tr tal:repeat="value context/values">
61           <td>
62            <input type="checkbox" name="val_id"
63                  tal:attributes="value value/__name__" />
64          </td>
65          <td tal:content="value/bed_id">ID</td>
66          <td tal:content="value/bed_type">TYPE</td>
67          <td tal:content="value/bed_number">NUMBER</td>
68          <td>
69            <a tal:condition="python: value.owner != view.not_occupied"
70               tal:attributes="href python: '%s/%s/accommodation' %
71                    (view.students_url,value.owner)">
72              <span tal:content="value/owner">OWNER</span>
73            </a>
74            <a tal:condition="python: value.owner == view.not_occupied"
75               tal:attributes="href python: view.url(value)"
76               i18n:translate="">
77            [allocate student]
78            </a>
79          </td>
80        </tr>
81      </tbody>
82      </table>
83
84      <div tal:condition="view/availableActions">
85        <span tal:repeat="action view/actions"
86              tal:omit-tag="">
87          <input tal:condition="python:action.label in view.tabtwoactions"
88                 tal:replace="structure action/render"/>
89        </span>
90      </div>
91
92    </div>
93  </div>
94</form> 
95
96
97
Note: See TracBrowser for help on using the repository browser.