Changeset 12823 for main/waeup.ikoba/trunk/src/waeup
- Timestamp:
- 24 Mar 2015, 08:59:57 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/payments
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/browser_templates/containermanagepage.pt
r12809 r12823 41 41 <tr tal:repeat="value view/hitlist"> 42 42 <td> 43 <input type="checkbox" name="entries" tal:attributes="value python:value[0].__name__" /> 43 <!-- XXX: preformat values in view --> 44 <input type="checkbox" name="entries" tal:attributes="value python:value.__name__" /> 44 45 </td> 45 <td tal:content="python: value[0].payment_id[:9]">PAYMENT_ID</td> 46 <td tal:content="python: layout.formatDatetime(value[0].creation_date)">CREATION DATE</td> 47 <td tal:content="python: layout.formatDatetime(value[0].payment_date)">PAYMENT DATE</td> 48 <td tal:content="python: view.gateway_services[value[0].gateway_service].title">SERVICE</td> 49 <td tal:content="python: value[0].amount">AMOUNT</td> 50 <td tal:content="python: value[0].currency">CURRENCY</td> 51 <td tal:content="python: view.payment_states.getTerm(value[0].state).title">STATE</td> 52 <td> 53 <span tal:condition="python: value[1] is not None"> 54 <a tal:attributes="href python: view.url(value[2])"> 55 <span tal:content="python: value[1].title">PAYABLETITLE</span> 56 </a> 57 </span> 58 </td> 46 <td tal:content="python: value.payment_id[:9]">PAYMENT_ID</td> 47 <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td> 48 <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td> 49 <td tal:content="python: view.gateway_services[value.gateway_service].title">SERVICE</td> 50 <td tal:content="python: value.amount">AMOUNT</td> 51 <td tal:content="python: value.currency">CURRENCY</td> 52 <td tal:content="python: view.payment_states.getTerm(value.state).title">STATE</td> 53 <td tal:content="python: value.title">TITLE</td> 59 54 </tr> 60 55 </tbody> … … 68 63 </div> 69 64 </form> 70 -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/browser_templates/containerpage.pt
r12809 r12823 33 33 <th i18n:translate="">Currency</th> 34 34 <th i18n:translate="">State</th> 35 <th i18n:translate=""> Contract</th>35 <th i18n:translate="">Title</th> 36 36 </tr> 37 37 </thead> 38 38 <tbody> 39 39 <tr tal:repeat="value view/hitlist"> 40 <td tal:content="python: value[0].payment_id[:9]">PAYMENT_ID</td> 41 <td tal:content="python: layout.formatDatetime(value[0].creation_date)">CREATION DATE</td> 42 <td tal:content="python: layout.formatDatetime(value[0].payment_date)">PAYMENT DATE</td> 43 <td tal:content="python: view.gateway_services[value[0].gateway_service].title">SERVICE</td> 44 <td tal:content="python: value[0].amount">AMOUNT</td> 45 <td tal:content="python: value[0].currency">CURRENCY</td> 46 <td tal:content="python: view.payment_states.getTerm(value[0].state).title">STATE</td> 47 <td> 48 <span tal:condition="python: value[1] is not None"> 49 <a tal:attributes="href python: view.url(value[2])"> 50 <span tal:content="python: value[1].title">PAYABLETITLE</span> 51 </a> 52 </span> 53 </td> 40 <td tal:content="python: value.payment_id[:9]">PAYMENT_ID</td> 41 <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td> 42 <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td> 43 <td tal:content="python: view.gateway_services[value.gateway_service].title">SERVICE</td> 44 <td tal:content="python: value.amount">AMOUNT</td> 45 <td tal:content="python: value.currency">CURRENCY</td> 46 <td tal:content="python: view.payment_states.getTerm(value.state).title">STATE</td> 47 <td tal:content="python: value.title">TITLE</td> 48 54 49 </tr> 55 50 </tbody> 56 51 </table> 57 52 </div> 58 -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/catalog.py
r12775 r12823 24 24 from zope.component import queryUtility 25 25 from waeup.ikoba.interfaces import ICompany 26 from waeup.ikoba.payments.interfaces import ( 27 IPayment, IPayable 28 ) 29 from waeup.ikoba.payments.payment import ( 30 find_payable_from_payable_id 31 ) 26 from waeup.ikoba.payments.interfaces import IPayment 32 27 33 28 34 29 def search(query=None, searchtype=None): 35 hitlist = [] 30 """Search payments catalog. 31 32 `query` gives a string we search, `searchtype` the fieldname. 33 """ 36 34 # Temporary solution to display all payments added 37 35 if query == '*': … … 41 39 results = Query().searchResults( 42 40 Eq(('payments_catalog', searchtype), query)) 43 hitlist = [] 44 for payment in results: 45 payable_object = find_payable_from_payable_id(payment.payable_id) 46 if payable_object is not None: 47 payable = IPayable(payable_object) 48 else: 49 payable = None 50 hitlist.append((payment, payable, payable_object)) 51 return hitlist 41 return results 52 42 53 43
Note: See TracChangeset for help on using the changeset viewer.