Ignore:
Timestamp:
5 Nov 2012, 10:31:06 (12 years ago)
Author:
Henrik Bettermann
Message:

List reserved beds in row not in a column.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/hostels
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py

    r9416 r9534  
    213213    grok.name('index')
    214214    grok.require('waeup.viewHostels')
    215     #grok.template('hostelpage')
     215    grok.template('hostelpage')
     216    form_fields = grok.AutoFields(IHostel).omit('beds_reserved')
    216217    pnav = 5
    217218
     
    234235    grok.name('manage')
    235236    grok.require('waeup.manageHostels')
    236     form_fields = grok.AutoFields(IHostel).omit('hostel_id')
    237     form_fields['beds_reserved'].for_display = True
     237    form_fields = grok.AutoFields(IHostel).omit('hostel_id', 'beds_reserved')
    238238    grok.template('hostelmanagepage')
    239239    label = _('Manage hostel')
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt

    r7811 r9534  
    1616      <tbody>
    1717        <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>
    1828      </tbody>
    1929      </table>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py

    r9448 r9534  
    273273        self.assertEqual(self.app['hostels']['hall-1'][
    274274            'hall-1_A_101_D'].bed_type, 'regular_female_reserved')
    275         self.assertTrue('<div>A_101_A</div>' in self.browser.contents)
     275        self.assertTrue('A_101_A&nbsp;&nbsp;' in self.browser.contents)
    276276        # The catalog has been updated
    277277        results = cat.searchResults(
Note: See TracChangeset for help on using the changeset viewer.