Changeset 17412 for main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
- Timestamp:
- 17 May 2023, 18:21:10 (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
r17313 r17412 135 135 @property 136 136 def target_url(self): 137 if self.target and self.context.allocation_expiration:137 if self.target and grok.getSite()['hostels'].allocation_expiration: 138 138 return self.view.url(self.view.context, self.target) 139 139 return … … 146 146 "booking if maintenance fee is not " + \ 147 147 "paid.'") 148 msg = _(msg, mapping={'a': self.context.allocation_expiration,})148 msg = _(msg, mapping={'a': grok.getSite()['hostels'].allocation_expiration,}) 149 149 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 150 150 return "return window.confirm(%s);" % translate( … … 218 218 219 219 def update(self): 220 n = self.context.allocation_expiration220 n = grok.getSite()['hostels'].allocation_expiration 221 221 if not n: 222 222 self.flash( … … 250 250 return 251 251 252 class ReleaseExpiredAllocationsPage2(ReleaseExpiredAllocationsPage): 253 """Release all expired allocated beds in a single hostel. 254 """ 255 grok.context(IHostel) 256 grok.name('releaseexpired2') 257 252 258 class HostelsStatisticsPage(KofaDisplayFormPage): 253 259 """Some statistics about beds in hostels. … … 300 306 def label(self): 301 307 return self.context.hostel_name 308 309 class ReleaseExpiredAllocationsActionButton2(ReleaseExpiredAllocationsActionButton): 310 grok.order(2) 311 grok.context(IHostel) 312 grok.view(HostelDisplayFormPage) 313 target = 'releaseexpired2' 314 text = _('Release expired bed space allocations in this hostel') 302 315 303 316 class HostelManageActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.