Ignore:
Timestamp:
18 Nov 2015, 17:53:31 (9 years ago)
Author:
Henrik Bettermann
Message:

Display desired hostel.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

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

    r13467 r13480  
    19531953            mapping = {'a':self.context.__parent__.display_fullname})
    19541954
     1955    @property
     1956    def desired_hostel(self):
     1957        if self.context.desired_hostel:
     1958            hostel = grok.getSite()['hostels'].get(self.context.desired_hostel)
     1959            if hostel is not None:
     1960                return hostel.hostel_name
     1961        return
     1962
    19551963    def getHostels(self):
    19561964        """Get a list of all stored hostels.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/accommodationmanagepage.pt

    r13467 r13480  
    2828    <br />
    2929  </tal:desired_hostel>
     30
     31  <tal:choice condition="python: view.desired_hostel and view.with_hostel_selection">
     32  <p>
     33    <strong i18n:translate="">Favoured Hostel:</strong>
     34    <span tal:replace="view/desired_hostel"></span>
     35  </p>
     36  </tal:choice>
    3037
    3138  <h3 i18n:domain="waeup.kofa" i18n:translate="">Bookings</h3>
Note: See TracChangeset for help on using the changeset viewer.