Changeset 1427


Ignore:
Timestamp:
16 Feb 2007, 12:39:56 (18 years ago)
Author:
Henrik Bettermann
Message:

approve payment modified
payments_view changed to show links

Location:
WAeUP_SRP/trunk
Files:
2 added
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/actions.xml

    r1342 r1427  
    200200     url_expr="string:${portal_url}/register_courses" visible="False"/>
    201201  <action title="Request Transfer" action_id="request_transfer" category="student"
    202      condition_expr="python: here.isStudent() and here.getStudentWorkflowInfo()['cr']" url_expr="string:${portal_url}/request_transfer"
    203      visible="True"/>     
     202     condition_expr="python: here.isStudent() and here.getStudentWorkflowInfo()['tr']" url_expr="string:${portal_url}/request_transfer"
     203     visible="True"/>
    204204
    205205 </action-provider>
  • WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentsFolderInfo.py

    r1338 r1427  
    1313"""
    1414import logging
    15 logger = logging.getLogger('EPayment.')
     15logger = logging.getLogger('EPayment.Info')
    1616import DateTime
    1717request = context.REQUEST
     
    2323#student = getattr(students,student_id)
    2424s_brain = context.students_catalog(id = student_id)[0]
     25
    2526payments = []
    2627#from Products.zdb import set_trace;set_trace()
    27 for o_id in context.objectIds():
    28     d = {}
    29     d['id'] = o_id
    30     res = context.portal_catalog(id=o_id)
    31     if res:
    32         title = res[0].Title
    33         d['title'] = title or o_id
    34     else:
    35         d['title'] = "no Title"
    36     payments.append(d)
     28
    3729info = {}
    3830is_so = info['is_so'] = context.isSectionOfficer()
     31
     32res = context.portal_catalog(portal_type='Student',id = student_id)
     33if res:
     34    info['review_state'] = res[0].review_state
     35
    3936info['student_name'] = s_brain.name
     37payments_path = "%s/campus/students/%s/payments" % (context.portal_url.getPortalPath(),student_id)
     38sos = context.portal_catalog(container_path=payments_path)
     39info['is_so'] = is_so
     40
     41for so in sos:
     42
     43    row = {}
     44    row['id'] = so.getId
     45    row['title'] = so.Title
     46    url = row['url'] = "%s/%s" % (payments_path,so.getId)
     47    so_object = context.restrictedTraverse(url,default=None).getContent()
     48    row['type'] = so.portal_type
     49    review_state = row['review_state'] = so.review_state
     50    if so_object.type_description.startswith('School Fee'):
     51        row['is_approvable'] = is_so and (review_state == "opened") and info['review_state'] == 'cleared_and_validated'
     52    else:
     53        row['is_approvable'] = is_so and (review_state == "opened")
     54    if (review_state == "closed") and so_object.resp_code in ('SC','00','AP',):
     55        row['confirmed'] = 'active'
     56    else:
     57        row['confirmed'] = ''
     58    payments.append(row)
     59   
     60
    4061info['payments'] = payments
    4162return info
  • WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt

    r1392 r1427  
    88      <span tal:condition="info">
    99     
    10         <metal:block tal:condition="python:info_doc['doc'].resp_code=='00'">           
     10        <metal:block tal:condition="python:info_doc['doc'].resp_code in ('00','AP',)">           
    1111        <h3>Online Payment Receipt</h3>
    1212        <br />
     
    106106        </metal:block>
    107107       
    108         <metal:block tal:condition="python:info_doc['doc'].resp_code not in ('SC','00','')">           
     108        <metal:block tal:condition="python:info_doc['doc'].resp_code not in ('SC','00','AP','')">           
    109109        <h3>Response from Bank: "<span tal:content="python:info_doc['doc'].resp_desc" />"</h3>
    110110        <br />       
  • WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt

    r1368 r1427  
    2424                              review_state context/getStudentReviewState">
    2525
    26         <table class="contentListing" width="100%">
     26        <table class="registration" width="100%">
    2727          <tr tal:repeat="row rows"
    2828              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    29             <td>
     29           
     30            <td tal:attributes="class string:${row/confirmed}">
    3031              <a target="slip" href="" tal:attributes="href string:${context/absolute_url}/${row/id}/payment_receipt"
    3132                 onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
    3233                <strong tal:content="row/title" /></a>
    3334            </td>
     35            <td tal:attributes="class string:${row/confirmed}">
     36            <a tal:condition="python:row['is_approvable']"
     37               tal:attributes="href string:${context/absolute_url}/${row/id}/approve_epayment;
     38                               onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure? You will not be able to undo the approval.'), );
     39                               ">
     40                [approve payment]
     41            </a>             
     42            </td>
     43                       
    3444          </tr>
    3545        </table>
  • WAeUP_SRP/trunk/skins/waeup_epayment/simulate_callback.py

    r1425 r1427  
    88current = DateTime.DateTime()
    99pr = context.portal_registration
    10 logger = logging.getLogger('Returning')
     10logger = logging.getLogger('EPayment.Simulate')
    1111validate = REQUEST.has_key("cpsdocument_edit_button")
    1212
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentWorkflowInfo.py

    r1304 r1427  
    3333                                           'courses_validated',
    3434                                           )
    35 
     35info['tr'] = review_state in  ('returning',)
    3636return info
Note: See TracChangeset for help on using the changeset viewer.