Changeset 12761
- Timestamp:
- 14 Mar 2015, 06:17:25 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/breadcrumbs.py
r12755 r12761 28 28 ICompany, IUsersContainer, IDataCenter, 29 29 ) 30 from waeup.ikoba.payments.interfaces import IPayment31 from waeup.ikoba.payments.payment import find_payable_from_payable_id32 30 from waeup.ikoba.reports import IReportsContainer 33 31 … … 156 154 parent_viewname = 'administration' 157 155 target = None 158 159 160 class PaymentBreadcrumb(Breadcrumb):161 """A breadcrumb for payment.162 """163 grok.context(IPayment)164 parent = grok.getSite()165 target = None166 167 @property168 def title(self):169 id_part = self.context.payment_id[4:12]170 return _(u"Payment ${id}", mapping={'id': id_part})171 172 @property173 def parent(self):174 """We display the payments payable as parent.175 """176 payment = self.context177 payable = find_payable_from_payable_id(payment.payable_id)178 if payable is None:179 # fallback: display site home as parent180 return (grok.getSite(), 'index')181 return (payable, 'index')182 156 183 157
Note: See TracChangeset for help on using the changeset viewer.