Index: /WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt	(revision 1293)
+++ /WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt	(revision 1294)
@@ -1,12 +1,6 @@
-<metal:html tal:define="info context/getPaymentsFolderInfo;
-             is_student context/isStudent;
-             rows info/payments"
-             >
-  <span tal:condition="not: info">
-    <span tal:content="here/illegal_view" />
-  </span>
-  <metal:block tal:condition="info">                         
-    <metal:body use-macro="here/waeup_content_master/macros/master">
-      <metal:block fill-slot="header">
+<metal:body use-macro="here/waeup_content_master/macros/master">
+      <metal:block fill-slot="header"
+                   tal:define="is_student context/isStudent;
+                               s_name context/getStudentNameInContext;">
         <a href=""
            tal:attributes="href string:${context/aq_parent/absolute_url}">
@@ -16,5 +10,5 @@
         <h3> 
           <span tal:condition="not:is_student">
-            <span tal:content="info/student_name" />:
+            <span tal:content="s_name" />:
           </span>
           <span tal:condition="is_student">
@@ -25,5 +19,8 @@
         <br />
       </metal:block>
-      <metal:main fill-slot="main">
+      <metal:main fill-slot="main"
+                  tal:define="info context/getPaymentsFolderInfo;
+                              rows info/payments;
+                              review_state context/getStudentReviewState">
 
         <table class="contentListing" width="100%">
@@ -31,5 +28,5 @@
               tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
             <td>
-              <a href="view" tal:attributes="href string:${context/absolute_url}/${row/id}/waeup_document_view">
+              <a href="view" tal:attributes="href string:${context/absolute_url}/${row/id}">
                 <strong tal:content="row/title" /></a> 
             </td>
@@ -39,5 +36,6 @@
         <div>
         
-        <form tal:attributes="action string: ${context/absolute_url}/pay_online" method="post" class="group">
+        <form tal:condition="python:review_state == 'cleared_and_validated'" 
+              tal:attributes="action string: ${context/absolute_url}/pay_online" method="post" class="group">
          <input type="submit" name="epayment" 
                 class="context" 
@@ -46,9 +44,14 @@
         </form>  
 
-        </div>        
+        <form tal:condition="python:review_state == 'returning'" 
+              tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group">
+         <input type="submit" name="epayment" 
+                class="context" 
+                value="Pay School Fee by Scratch Card" 
+                />
+        </form>          
         
         
+        </div>        
       </metal:main>
-    </metal:body>
-  </metal:block>
-</metal:html>    
+</metal:body>
Index: /WAeUP_SRP/trunk/skins/waeup_student/student_index.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/student_index.py	(revision 1293)
+++ /WAeUP_SRP/trunk/skins/waeup_student/student_index.py	(revision 1294)
@@ -34,4 +34,6 @@
     if context.portal_type == 'PaymentsFolder':
         return context.payments_view()
+    if context.portal_type == 'Payment':
+        return context.waeup_document_view()        
     students_url = "%s/campus/students" % (context.portal_url())
     id = str(member)
