Changeset 15312 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 29 Jan 2019, 10:24:21 (6 years ago)
- 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
r15277 r15312 2165 2165 @property 2166 2166 def desired_hostel(self): 2167 if self.context.desired_hostel == 'no': 2168 return _('No favoured hostel') 2167 2169 if self.context.desired_hostel: 2168 2170 hostel = grok.getSite()['hostels'].get(self.context.desired_hostel) … … 2175 2177 """ 2176 2178 yield(dict(name=None, title='--', selected='')) 2179 selected = '' 2180 if self.context.desired_hostel == 'no': 2181 selected = 'selected' 2182 yield(dict(name='no', title=_('No favoured hostel'), selected=selected)) 2177 2183 for val in grok.getSite()['hostels'].values(): 2178 2184 selected = '' -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r15306 r15312 655 655 sorted_beds = sorted(available_beds, 656 656 key=lambda bed: 1000 * bed.__parent__.sort_id + bed.bed_number) 657 if desired_hostel :657 if desired_hostel and desired_hostel != 'no': 658 658 # Filter desired hostel beds 659 659 filtered_beds = [bed for bed in sorted_beds
Note: See TracChangeset for help on using the changeset viewer.