Index: /WAeUP_SRP/trunk/profiles/default/actions.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/actions.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/actions.xml	(revision 659)
@@ -108,5 +108,5 @@
    <permission>View</permission>
   </action>
-  <action title="Halls" action_id="view_accommodation"
+  <action title="Hostels" action_id="view_accommodation"
      category="navigation" condition_expr="member"
      url_expr="string:${portal_url}/campus/accommodation" visible="True">
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml	(revision 659)
@@ -18,5 +18,5 @@
   <property name="hidden_readonly_layout_modes"/>
   <property name="view_format">iso8601_medium_easy</property>
-<property name="hidden_empty">True</property>
+<property name="hidden_empty"></property>
  </widget>
  <widget name="acco_maint_sc_pin" meta_type="String Widget">
@@ -30,18 +30,5 @@
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
-<property name="hidden_empty">True</property>
- </widget>
- <widget name="acco_maint_sc_serial" meta_type="String Widget">
-  <property name="title">Accommodation Maintainance SC-Serial</property>
-  <property name="fields">
-   <element value="acco_maint_sc_serial"/>
-  </property>
-  <property name="label">Accommodation Maintainance SC-Serial</property>
-  <property name="label_edit">Accommodation Maintainance SC-Serial</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-  <property name="display_width">10</property>
-<property name="hidden_empty">True</property>
+<property name="hidden_empty"></property>
  </widget>
  <widget name="acco_res_date" meta_type="DateTime Widget">
@@ -68,16 +55,4 @@
   <property name="hidden_readonly_layout_modes"/>
  </widget>
- <widget name="acco_res_sc_serial" meta_type="String Widget">
-  <property name="title">Accommodation Reservation SC-Serial</property>
-  <property name="fields">
-   <element value="acco_res_sc_serial"/>
-  </property>
-  <property name="label">Accommodation Reservation SC-Serial</property>
-  <property name="label_edit">Accommodation Reservation SC-Serial</property>
-  <property name="readonly_layout_modes"/>
-  <property name="hidden_layout_modes"/>
-  <property name="hidden_readonly_layout_modes"/>
-<property name="hidden_empty">True</property>
- </widget>
  <widget name="bed" meta_type="String Widget">
   <property name="title">Bed Id</property>
@@ -87,5 +62,5 @@
   <property name="label">Bed Id</property>
   <property name="label_edit">Bed Id</property>
-  <property name="readonly_layout_modes"/>
+  <property name="readonly_layout_modes">edit</property>
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
@@ -98,5 +73,5 @@
   <property name="label">Session</property>
   <property name="label_edit">Session</property>
-  <property name="readonly_layout_modes"/>
+  <property name="readonly_layout_modes">edit</property>
   <property name="hidden_layout_modes"/>
   <property name="hidden_readonly_layout_modes"/>
@@ -113,7 +88,4 @@
   </row>
   <row>
-   <cell name="acco_res_sc_serial"/>
-  </row>
-  <row>
    <cell name="acco_res_sc_pin"/>
   </row>
@@ -122,7 +94,4 @@
   </row>
   <row>
-   <cell name="acco_maint_sc_serial"/>
-  </row>
-  <row>
    <cell name="acco_maint_sc_pin"/>
   </row>
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml	(revision 659)
@@ -91,5 +91,5 @@
   </property>
   <property name="label">Student's Name</property>
-  <property name="label_edit">Name</property>    
+  <property name="label_edit">Name</property>
   <property name="readonly_layout_modes">
    <element value="edit"/>
@@ -106,5 +106,5 @@
   </property>
   <property name="label">JAMB Middlename</property>
-  <property name="label_edit">JAMB Middlename</property>  
+  <property name="label_edit">JAMB Middlename</property>
   <property name="readonly_layout_modes">
    <element value="edit"/>
@@ -170,5 +170,7 @@
   <property name="readonly_layout_modes">
   </property>
-  <property name="hidden_layout_modes"/>
+  <property name="hidden_layout_modes">
+   <element value="create"/>
+  </property>
   <property name="hidden_readonly_layout_modes"/>
  </widget>
Index: /WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/schemas/student_accommodation.xml	(revision 659)
@@ -3,8 +3,6 @@
  <field name="acco_maint_date" meta_type="CPS DateTime Field"/>
  <field name="acco_maint_sc_pin" meta_type="CPS String Field"/>
- <field name="acco_maint_sc_serial" meta_type="CPS String Field"/>
  <field name="acco_res_date" meta_type="CPS DateTime Field"/>
  <field name="acco_res_sc_pin" meta_type="CPS String Field"/>
- <field name="acco_res_sc_serial" meta_type="CPS String Field"/>
  <field name="bed" meta_type="CPS String Field"/>
  <field name="session" meta_type="CPS String Field"/>
Index: /WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatch.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatch.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatch.xml	(revision 659)
@@ -30,5 +30,5 @@
  <alias from="created" to="scratch_card_batch_created"/>
  <alias from="view" to="batch_index_html"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr="" url_expr="string:${object_url}/batch_index_html"
     visible="True">
Index: /WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatchesFolder.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatchesFolder.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatchesFolder.xml	(revision 659)
@@ -29,5 +29,5 @@
  <alias from="created" to=""/>
  <alias from="view" to="pins_index_html"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr="" url_expr="string:${object_url}/pins_index_html"
     visible="True">
Index: /WAeUP_SRP/trunk/profiles/default/types/Student.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/Student.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/Student.xml	(revision 659)
@@ -35,5 +35,5 @@
  <alias from="(Default)" to="student_index"/>
  <alias from="view" to="student_index"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr=""
     url_expr="string:${object_url}/student_index" visible="True">
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml	(revision 659)
@@ -8,5 +8,5 @@
  <property name="product">WAeUP_SRP</property>
  <property name="factory">addStudentAccommodation</property>
- <property name="immediate_view">accommodation_view</property>
+ <property name="immediate_view">academics_document_view</property>
  <property name="global_allow">True</property>
  <property name="filter_content_types">True</property>
@@ -26,10 +26,15 @@
  <property name="storage_methods"/>
  <property name="cps_is_portlet">False</property>
- <alias from="(Default)" to="accommodation_view"/>
- <alias from="view" to="accommodation_view"/>
- <action title="Standard View" action_id="view" category="object"
-    condition_expr="" url_expr="string:${object_url}/accommodation_view"
+ <alias from="(Default)" to="academics_document_view"/>
+ <alias from="view" to="academics_document_view"/>
+ <action title="View" action_id="view" category="object"
+    condition_expr="" url_expr="string:${object_url}/academics_document_view"
     visible="True">
   <permission value="View"/>
  </action>
+ <action title="action_edit" action_id="edit" category="object"
+    condition_expr="" url_expr="string:${object_url}/cpsdocument_edit"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action> 
 </object>
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentApplication.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentApplication.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentApplication.xml	(revision 659)
@@ -28,5 +28,5 @@
  <alias from="(Default)" to="academics_document_view"/>
  <alias from="view" to="academics_document_view"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr="" url_expr="string:${object_url}/academics_document_view"
     visible="True">
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentClearance.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentClearance.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentClearance.xml	(revision 659)
@@ -30,5 +30,5 @@
  <alias from="(Default)" to="academics_document_view"/>
  <alias from="view" to="academics_contents"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr=""
     url_expr="string:${object_url}/academics_document_view"
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml	(revision 659)
@@ -28,5 +28,5 @@
  <alias from="(Default)" to="academics_contents"/>
  <alias from="view" to="academics_contents"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr="" url_expr="string:${object_url}/academics_contents"
     visible="True">
Index: /WAeUP_SRP/trunk/profiles/default/types/StudentPersonal.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/types/StudentPersonal.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/types/StudentPersonal.xml	(revision 659)
@@ -30,5 +30,5 @@
  <alias from="(Default)" to="academics_document_view"/>
  <alias from="view" to="academics_document_view"/>
- <action title="Standard View" action_id="view" category="object"
+ <action title="View" action_id="view" category="object"
     condition_expr=""
     url_expr="string:${object_url}/academics_document_view"
Index: /WAeUP_SRP/trunk/profiles/default/workflows/waeup_course_registration_wf/definition.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/workflows/waeup_course_registration_wf/definition.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/workflows/waeup_course_registration_wf/definition.xml	(revision 659)
@@ -38,5 +38,5 @@
              new_state="created" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -49,5 +49,5 @@
              new_state="" trigger="USER" before_script=""
              after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -61,5 +61,5 @@
              new_state="school_fee_pin_entered"
              trigger="USER" before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -71,5 +71,5 @@
              new_state="finished" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -80,5 +80,5 @@
              new_state="school_fee_pin_entered"
              trigger="USER" before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -89,5 +89,5 @@
              new_state="passed" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -98,5 +98,5 @@
              new_state="probation" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -107,5 +107,5 @@
              new_state="courses_registered" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -117,5 +117,5 @@
              new_state="failed" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -126,5 +126,5 @@
              new_state="validated" trigger="USER"
              before_script="" after_script="">
-
+  
   <guard>
    <guard-role>Manager</guard-role>
@@ -132,4 +132,3 @@
   </guard>
  </transition>
-
 </cps-workflow>
Index: /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml	(revision 659)
@@ -14,17 +14,10 @@
   <exit-transition transition_id="open"/>
   <permission-map name="Modify portal content"
-                  acquired="False">
-   <permission-role>Owner</permission-role>
-   <permission-role>Manager</permission-role>
-   <permission-role>SectionManager</permission-role>
+                  acquired="True">
   </permission-map>
-  <permission-map name="View" acquired="False">
-   <permission-role>Owner</permission-role>
-   <permission-role>Manager</permission-role>
-   <permission-role>SectionManager</permission-role>
+  <permission-map name="View" acquired="True">
   </permission-map>
   <permission-map name="WAeUPModify own content"
-                  acquired="False">
-   <permission-role>Owner</permission-role>
+                  acquired="True">
   </permission-map>
  </state>
@@ -32,14 +25,12 @@
   <exit-transition transition_id="close"/>
   <permission-map name="Modify portal content"
-                  acquired="False">
+                  acquired="True">
    <permission-role>Owner</permission-role>
-   <permission-role>SectionManager</permission-role>
-   <permission-role>Manager</permission-role>
   </permission-map>
-  <permission-map name="View" acquired="False">
+  <permission-map name="View" acquired="True">
    <permission-role>Owner</permission-role>
   </permission-map>
   <permission-map name="WAeUPModify own content"
-                  acquired="False">
+                  acquired="True">
    <permission-role>Owner</permission-role>
   </permission-map>
@@ -50,5 +41,7 @@
   
   <guard>
-   <guard-permission>WAeUPModify own content</guard-permission>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
   </guard>
  </transition>
@@ -67,7 +60,8 @@
   
   <guard>
-   <guard-permission>WAeUPModify own content</guard-permission>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
   </guard>
  </transition>
 </cps-workflow>
-
Index: /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 659)
@@ -7,5 +7,5 @@
  <permission>View</permission>
  <state state_id="admission_applied" title="">
- <exit-transition transition_id="create_content"/>
+  <exit-transition transition_id="create_content"/>
   <exit-transition transition_id="pume_fail"/>
   <exit-transition transition_id="pume_pass"/>
@@ -21,5 +21,4 @@
   <permission-map name="Modify portal content"
                   acquired="True">
-   <permission-role>Anonymous</permission-role>
   </permission-map>
   <permission-map name="View" acquired="True">
@@ -35,7 +34,4 @@
   <exit-transition transition_id="reject_clearance"/>
  </state>
- <state state_id="closed" title="">
-  <exit-transition transition_id="open"/>
- </state>
  <state state_id="created" title="">
   <exit-transition transition_id="create_content"/>
@@ -43,8 +39,5 @@
   <exit-transition transition_id="open"/>
   <permission-map name="Modify portal content"
-                  acquired="False">
-   <permission-role>Owner</permission-role>
-   <permission-role>Manager</permission-role>
-   <permission-role>SectionManager</permission-role>
+                  acquired="True">
   </permission-map>
   <permission-map name="View" acquired="True">
@@ -52,13 +45,4 @@
  </state>
  <state state_id="finally_rejected" title="">
- </state>
- <state state_id="opened" title="">
-  <exit-transition transition_id="close"/>
-  <permission-map name="Modify portal content"
-                  acquired="True">
-   <permission-role>Owner</permission-role>
-  </permission-map>
-  <permission-map name="View" acquired="True">
-  </permission-map>
  </state>
  <state state_id="pume_failed" title="">
@@ -99,13 +83,4 @@
   </guard>
  </transition>
- <transition transition_id="close" title=""
-             new_state="closed" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-   <guard-role>Manager</guard-role>
-   <guard-role>SectionManager</guard-role>
-  </guard>
- </transition>
  <transition transition_id="create" title=""
              new_state="created" trigger="USER"
@@ -122,7 +97,9 @@
   
   <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
   </guard>
   <transition-behavior behavior_id="allow-sub-create"/>
-  <transition-behavior behavior_id="allow-sub-delete"/>
  </transition>
  <transition transition_id="enter_application_pin" title=""
@@ -131,6 +108,7 @@
   
   <guard>
-   <guard-permission>Modify portal content</guard-permission>
-   <guard-permission></guard-permission>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+   <guard-role>Owner</guard-role>
   </guard>
  </transition>
@@ -153,13 +131,4 @@
    <guard-role>SectionManager</guard-role>
    <guard-role>ClearanceOfficer</guard-role>
-  </guard>
- </transition>
- <transition transition_id="open" title=""
-             new_state="opened" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-   <guard-role>Manager</guard-role>
-   <guard-role>SectionManager</guard-role>
   </guard>
  </transition>
@@ -214,4 +183,14 @@
   </guard>
  </transition>
+ <variable variable_id="time" for_catalog="True"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
  <script script_id="open_application_personal"
          type="Script (Python)"
Index: /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_application_personal.py
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_application_personal.py	(revision 658)
+++ /WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_application_personal.py	(revision 659)
@@ -1,3 +1,3 @@
-## Script (Python) "open_personal"
+## Script (Python) "open_application_personal"
 ##bind container=container
 ##bind context=context
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt	(revision 659)
@@ -27,6 +27,6 @@
         <tr>
           <th width="200px">Bed Type</th>
-          <th>Total No of Beds</th>
-          <th>Reserved Beds</th>
+          <th width="80px">Total</th>
+          <th width="80px">Booked</th>
         </tr>
         <tr tal:repeat="bt bed_types">
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_hall_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_hall_view.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_hall_view.pt	(revision 659)
@@ -16,11 +16,11 @@
       <span tal:omit-tag=""  
             tal:content="structure python: info['doc'].render(layout_mode='view')" />
-      
+      <br />
       <table tal:condition="info/bed_types"
              tal:define="bed_types info/bed_types">
         <tr>
-          <th width="190px">Bed Type</th>
-          <th>Total No of Beds</th>
-          <th>Reserved Beds</th>
+          <th width="200px">Bed Type</th>
+          <th width="80px">Total</th>
+          <th width="80px">Booked</th>
         </tr>
         <tr tal:repeat="bt bed_types">
@@ -31,4 +31,5 @@
         <tr><td>&nbsp;</td></tr>
       </table>
+      <br />
       <table tal:condition="info/reserved"
              tal:define="reserved info/reserved">
Index: /WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 659)
@@ -53,4 +53,5 @@
             if info['review_state'] == "created":
                 student.content_status_modify(workflow_action="enter_application_pin")
+                wftool.doActionFor(info['app'],'open',dest_container=info['app'])
                 da = {}
                 pin = request.get('pin')
@@ -79,5 +80,5 @@
     member.setProperties(last_login_time=current,login_time=current)
     if info['review_state'] == "application_pin_entered":
-        wftool.doActionFor(info['app'],'open',dest_container=info['app'])
+
         return response.redirect("%s/passport_entry_view" % student.absolute_url())
     return response.redirect("%s" % student.absolute_url())
Index: /WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 659)
@@ -22,4 +22,5 @@
 info = {}
 info['is_manager'] = context.isManager
+info['is_student'] = context.isStudent()
 member_id = str(member)
 if student is None:
@@ -58,8 +59,7 @@
 else:
     info['acco'] = None
-    
-items = []    
-sos = context.portal_catalog(container_path=student_path,
-                             review_state = ['opened', 'closed'])
+
+items = []
+sos = context.portal_catalog(container_path=student_path)
 for so in sos:
     row = {}
@@ -69,5 +69,7 @@
     row['title'] = sod.Title()
     row['url'] = soo.absolute_url()
+    row['type'] = so.portal_type
     row['is_editable'] = mtool.checkPermission('Modify portal content', soo)
+    row['review_state'] = so.review_state
     items.append(row)
 info['items'] = items
Index: /WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 659)
@@ -8,4 +8,5 @@
 current = DateTime.DateTime()
 pr = context.portal_registration
+wftool = context.portal_workflow
 
 info = context.getStudentInfo()
@@ -15,5 +16,5 @@
 pr = context.portal_registration
 session = current.year()
-acco_id = 'Acco_%s' % session
+acco_id = 'accommodation_%s' % session
 info = context.getStudentInfo()
 student = info['student']
@@ -27,5 +28,5 @@
                       layout_mode='create',
                       formaction = "reserve_accommodation",
-                      button = "book Bed",
+                      button = "Book",
                       )
 if psm == 'invalid':
@@ -47,5 +48,5 @@
     s_id = ds.get('s_id')
     pin = str(ds.get('acco_res_ac_pin'))
-    
+
     pa = context.portal_accommodation
     code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
@@ -59,4 +60,5 @@
 student.invokeFactory('StudentAccommodation',acco_id)
 acco = getattr(student,acco_id)
+wftool.doActionFor(acco,'open',dest_container=acco)
 ds.set('acco_res_date', current)
 ds.set('bed', bed)
Index: /WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/student_edit.py	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/student_edit.py	(revision 659)
@@ -48,5 +48,5 @@
                                     use_session=True)
         action = "/passport_entry_view"
-        if is_valid and app_doc.passport is not None:
+        if app_doc.passport is not None:
             psm = 'You successfully uploaded your passport image.'
             args = {'apply_button': 'Apply',}
Index: /WAeUP_SRP/trunk/skins/waeup_student/student_index.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/student_index.py	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/student_index.py	(revision 659)
@@ -21,15 +21,14 @@
 
 if context.isManager():
-    return redirect("%s/academics_contents" % context.absolute_url())
+    return redirect("%s/student_view" % context.absolute_url())
 if context.isStudent():
     info = context.getStudentInfo()
     student = info['student']
-#    doc = info['app_doc']
-#    state = context.getStudentInfo()['review_state']
-#    if state == 'admission_applied':
-#    	elif state == 'application_pin_entered':
-#        return redirect("%s/passport_entry_view" % student.absolute_url())
-
-    return redirect("%s/student_view" % student.absolute_url())
+    doc = info['app_doc']
+    state = context.getStudentInfo()['review_state']
+    if state == 'admission_applied':
+        return redirect("%s/application_view" % student.absolute_url())
+    elif state == 'application_pin_entered':
+        return redirect("%s/passport_entry_view" % student.absolute_url())
 
 
Index: /WAeUP_SRP/trunk/skins/waeup_student/student_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_student/student_view.pt	(revision 658)
+++ /WAeUP_SRP/trunk/skins/waeup_student/student_view.pt	(revision 659)
@@ -1,4 +1,5 @@
 <metal:html tal:define="info context/getStudentInfo;
-                is_manager info/is_manager|nothing;">
+                is_manager info/is_manager|nothing;
+                is_student info/is_student|nothing">
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
@@ -9,18 +10,19 @@
             tal:define="review_state info/review_state;
                         rows python: info['items']">
+
+      <a href="" tal:condition="is_manager"
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
             
-        <h3>My Study Data</h3>
+        <h3 tal:content="info/student/Title" />
         <br />
 
-        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+        <table tal:condition="is_manager" class="contentListing" width="100%" summary="content layout" id="folder_content">      
           <tr tal:repeat="row rows"
             tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
-            <td align="left" valign="middle" style="width: 5px;" 
-                tal:condition="is_manager">
-              
-            </td>
             <td><a href="view" tal:attributes="href string:${row/url}">
               <strong tal:content="row/title" /></a> </td>
-            
             <td> 
             <a tal:condition="row/is_editable"
@@ -31,7 +33,32 @@
             </a> 
             </td>
-            
           </tr>
         </table>
+
+        <table tal:condition="is_student" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+          <span tal:repeat="row rows">
+          <tr tal:condition="python:row['type'] == 'StudentApplication' and row['review_state'] in ['opened', 'closed']"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td><a href="view" tal:attributes="href string:${row/url}/application_view">
+              <strong tal:content="row/title" /></a> </td>
+            <td> 
+            <a tal:condition="row/is_editable"
+                href="edit" tal:attributes="href string:${here/absolute_url}/passport_entry_view">
+                [edit]
+            </a> 
+            </td>
+          </tr>
+          
+          <tr tal:condition="python:row['type'] == 'StudentAccommodation' and row['review_state'] in ['opened', 'closed']"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+            <td><a href="view" tal:attributes="href string:${row/url}/accommodation_view">
+              <strong tal:content="row/title" /></a> </td>
+            <td> 
+            </td>
+          </tr>
+          
+          </span>
+        </table>
+
         
       </span>
