Index: WAeUP_SRP/trunk/skins/waeup_student/getIdCardInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getIdCardInfo.py	(revision 2043)
+++ WAeUP_SRP/trunk/skins/waeup_student/getIdCardInfo.py	(revision 2043)
@@ -0,0 +1,62 @@
+## Script (Python) "getIdCardInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getTransferInfo.py 1339 2007-01-21 22:55:34Z henrik $
+"""
+return Info about the current Student
+"""
+import logging
+logger = logging.getLogger('Skins.getIdCardInfo')
+from DateTime import DateTime
+
+request = context.REQUEST
+mtool = context.portal_membership
+wf = context.portal_workflow
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+
+if mtool.isAnonymousUser():
+    return None
+info = {}
+#from Products.zdb import set_trace
+#set_trace()
+requested_id = context.getStudentId()
+if requested_id and not context.isStaff() and member_id != requested_id:
+    logger.info('%s tried to access %s' % (member_id,requested_id))
+    return None
+elif context.isStaff():
+    student_id = requested_id
+else:
+    student_id = member_id
+
+
+students_object = context.portal_url.getPortalObject().campus.students
+student = getattr(students_object,student_id)
+
+res = context.students_catalog(id = student_id)
+if len(res) != 1:
+    return None
+sbrain = res[0]
+info['id'] = student_id
+info['scatalog'] = context.getFormattedStudentEntry(sbrain)
+info['student'] = student
+#info['entry_mode'] = sbrain.entry_mode
+
+personal = getattr(student,'personal',None)
+if personal:
+    personal_doc = personal.getContent()
+    info['personal'] = personal_doc
+    
+cert_id = sbrain.course
+res = context.portal_catalog(portal_type = "Certificate", id = cert_id)   
+if res:
+    brain = res[0] 
+    info['sc_title'] = brain.Title
+
+return info
Index: WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 2040)
+++ WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 2043)
@@ -96,74 +96,22 @@
         info['course'] = None
 #
-acco = getattr(student,'accommodation_2006',None)
-info['acco'] = acco
-if acco is not None:
-    info['acco_doc'] = acco.getContent()
-    info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
+
+#clear = getattr(student,'clearance',None)
+#info['clear'] = clear
+#if clear is not None:
+#    info['clear_doc'] = clear.getContent()
+#    info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)
 #
-clear = getattr(student,'clearance',None)
-info['clear'] = clear
-if clear is not None:
-    info['clear_doc'] = clear.getContent()
-    info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)
-#
-pume = getattr(student,'pume',None)
-info['pume'] = pume
-if pume is not None:
-    info['pume_doc'] = pume.getContent()
-    info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None)
-else:
-    info['pume'] = None
+#pume = getattr(student,'pume',None)
+#info['pume'] = pume
+#if pume is not None:
+#    info['pume_doc'] = pume.getContent()
+#    info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None)
+#else:
+#    info['pume'] = None
 
 if not with_items:
     return info
 
-items = []
-s_edit_links = {'StudentApplication': 'application_edit_form',
-              'StudentAccommodation': 'reserve_accommodation',
-              'StudentClearance': 'clearance_edit_form',
-              'StudentPersonal': 'personal_edit_form',
-              }
-s_view_links = {'StudentApplication': 'application_view',
-              'StudentAccommodation': 'accommodation_view',
-              'StudentClearance': 'clearance_view',
-              'StudentPersonal': 'personal_view',
-              'StudentStudyCourse': 'study_course_view',
-              'StudentPume': 'pume_view',
-              }
-sos = context.portal_catalog(container_path=student_path)
-for so in sos:
-    row = {}
-    soo = so.getObject()
-    sod = soo.getContent()
-    row['id'] = soo.getId()
-    row['title'] = sod.Title()
-    row['url'] = soo.absolute_url()
-    row['type'] = so.portal_type
-    row['is_editable'] = mtool.checkPermission('Modify portal content', soo)
-    sv_link = s_view_links.get(so.portal_type,None) or "waeup_document_view"
-    row['s_view_link'] = "%s/%s" % (soo.absolute_url(),sv_link)
-    se_link = s_edit_links.get(so.portal_type,None)
-    row['s_edit_link'] = None
-    if se_link:
-        row['s_edit_link'] = "%s/%s" % (soo.absolute_url(),se_link)
-    row['review_state'] = so.review_state
-    if info['review_state'] in ('returning',
-                                'school_fee_paid',
-                                'courses_registered',
-                                'courses_validated',):
-          row['display'] = so.review_state in ('opened',
-                                               'bed_reserved',
-                                               'maintenance_fee_paid',) or so.portal_type == 'StudentStudyCourse'
-    else:
-          row['display'] = so.review_state in ('opened',
-                                               'closed',
-                                               'bed_reserved',
-                                               'maintenance_fee_paid',) and\
-                           so.portal_type not in ('StudentPume',) or\
-                           so.portal_type == 'StudentStudyCourse'
-
-    items.append(row)
-info['items'] = items
 request.set('student_id',student_id)
 request.set('student_url',info['url'])
Index: WAeUP_SRP/trunk/skins/waeup_student/id_card_demo.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/id_card_demo.pt	(revision 2043)
+++ WAeUP_SRP/trunk/skins/waeup_student/id_card_demo.pt	(revision 2043)
@@ -0,0 +1,143 @@
+<metal:body use-macro="here/idcard_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="global info context/getIdCardInfo;">
+
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info"
+          tal:define="pd python: info['personal']">
+
+    
+    <table style="border-style:solid; border-width:1px; border-color:black" cellpadding="0px" cellspacing="10px" width="450px" height="300px">
+    <tr>
+      <td colspan=2>
+        <div style="background-color:red; font-weight:bold; color:white; font-family:Courier New; font-size:100%">
+        STUDENT IDENTITY CARD
+        </div>
+        <div style="background-color:white; font-weight:bold; color:black; font-family:Courier New; font-size:100%"> 
+        UNIVERSITY OF ILORIN, ILORIN, NIGERIA    
+        </div>
+      </td>
+
+    </tr>
+    
+    <tr>
+    <td valign="top">
+      <table style="font-family:Courier New; font-size:100%">
+  
+          <tr>
+            <td>NAMES:</td> 
+            <td><span tal:content="info/scatalog/name" /></td>
+          </tr>           
+                
+          <tr>
+            <td>MATRIC NO:</td> 
+            <td><span tal:content="info/scatalog/matric_no" /></td>
+          </tr>      
+          
+          <tr>
+            <td>LEVEL:</td> 
+            <td><span tal:content="info/scatalog/level" /></td>
+          </tr>
+                    
+
+          
+          <span tal:define="f_id info/scatalog/faculty;
+                            d_id info/scatalog/department;
+                            f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+                            d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+                            >
+            <tr>
+              <td>FACULTY:</td>
+              <td tal:content="f_title" />
+            </tr>
+            <tr>
+              <td>DEPARTMENT:</td> 
+              <td><span tal:content="d_title" /></td>
+            </tr>
+          </span>
+          
+          <tr>
+            <td>ISSUE DATE:</td> 
+            <td />
+          </tr>   
+          
+          <tr>
+            <td>EXPIRY DATE:</td> 
+            <td />
+          </tr>     
+                
+        </table>
+      </td>
+      
+      <td>
+        <table style="font-family:Courier New; font-size:100%">
+          <tr>
+            <td tal:condition="python: 'passport' in info['student'].application.getContent().objectIds()">
+            <img height="150px" tal:attributes="src string:${here/portal_url}/campus/students/${info/scatalog/id}/application/passport"/>
+            </td>
+          </tr>
+          <tr >
+           <td style="padding:20px">&nbsp;</td> 
+          </tr>    
+          <tr>
+           <td style="border-top-style:solid; border-top-width:1px; border-top-color:black; margin:100px">Student's Signature</td> 
+          </tr>   
+        </table>
+      </td>
+      
+      </tr>
+      </table>
+      
+      <br /><br />
+      
+    <table style="border-style:solid; border-width:1px; border-color:black; font-family:Courier New " 
+                  width="450px" height="300px" cellpadding="0px" cellspacing="10px" >
+        
+    <tr>
+      <td height="5px">
+        
+      </td>
+    </tr>   
+        
+    <tr>
+      <td style="background-color:black" height="20px">
+        &nbsp;
+      </td>
+    </tr>        
+    <tr>
+      <td>
+      This identity card is not transferrable
+      </td>
+    </tr>
+    
+    <tr>
+    <td valign="top">
+      <table>
+          
+      <tr>
+        <td>Hall of Residence:</td> 
+        <td><span tal:content="pd/hall" /></td>
+      </tr>        
+
+      <tr>
+        <td>Next of Kin:</td> 
+        <td><span tal:content="pd/next_kin_lastname"/> <span tal:content="pd/next_kin_firstname"/> <span tal:content="pd/next_kin_middlename"/></td>
+      </tr>          
+
+      <tr>
+        <td>Next of Kin Address:</td> 
+        <td><span tal:content="pd/next_kin_address"/>
+      </tr>       
+      
+   
+      </table>
+      </td>
+      </tr>
+      </table>     
+
+  </span>
+  </metal:main>
+</metal:body>
+
