Index: waeup_product/trunk/skins/waeup_student/accommodation_index_html.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_index_html.py	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_index_html.py	(revision 103)
@@ -0,0 +1,17 @@
+##parameters=REQUEST=None,psm=None,groups=None
+
+# $Id$
+
+"""Default view for the Accommodation. 
+"""
+
+member = context.portal_membership.getAuthenticatedMember()
+if not context.portal_membership.isAnonymousUser():
+    roles = member.getRoles()
+    if 'Manager' in roles:
+        return context.folder_view()
+    elif 'StudentManager' in roles:
+        return context.accommodation_view_manager(psm=psm)
+    elif 'Student' in roles:
+        return context.accommodation_view_student(psm=psm)
+return context.accommodation_view_all(psm=psm)
Index: waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt	(revision 103)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2><span tal:content="context/id" /></h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt	(revision 103)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2><span tal:content="context/id" /></h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt
===================================================================
--- waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt	(revision 103)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+
+<metal:block fill-slot="head_slot">
+  <tal:block tal:define="student here/getContent">
+  </tal:block>
+</metal:block>
+
+  <metal:block fill-slot="header">
+  </metal:block>
+
+<metal:block fill-slot="main"
+             tal:define="items here/contentValues"
+             >
+    <h2><span tal:content="context/title_or_id" /></h2>
+    <table cellspacing="0" cellpadding="0">
+      <tal:block condition="python: len(items)">
+        <tr tal:repeat="item items">
+          <td colspan="1"> 
+            <a href="jamb" 
+               tal:attributes="href item/absolute_url"
+               tal:content="item/title_or_id"></a>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: waeup_product/trunk/skins/waeup_student/add_accommodation.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/add_accommodation.py	(revision 103)
+++ waeup_product/trunk/skins/waeup_student/add_accommodation.py	(revision 103)
@@ -0,0 +1,56 @@
+##parameters=REQUEST=None
+# $Id$
+"""
+Add a Accommodation Hall
+
+"""
+type_name = 'Accommodation'
+REQUEST.set('type_name',type_name)
+
+ti = context.portal_types[type_name]
+pr = context.portal_registration
+pm = context.portal_membership
+
+validate = REQUEST.has_key("cpsdocument_create_button")
+
+lt = context.portal_layouts
+
+accofolder = getattr(context,"Accommodation",None)
+if accofolder is None:
+    context.invokeFactory('AccoFolder','Accommodation')
+    context.notifyCPSDocumentCreation(ob=object)
+    accofolder = getattr(context,"Accommodation")
+    
+    
+res,psm,ds = lt.renderLayout(layout_id= 'accommodation',
+                      schema_id = 'accommodation',
+                      context=context,
+                      mapping=validate and REQUEST,
+                      ob={},
+                      layout_mode='create',
+                      create_action = 'add_accommodation',
+                      )
+if psm == 'invalid':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = 'Please correct your errors',
+                                 )
+elif psm == '':
+    return context.common_edit_form(rendered = res,
+                                 create = 1,
+                                 type_name = type_name,
+                                 psm = psm,
+                                 )
+    
+elif psm == 'valid':
+    oid = "%s" % ds.get('heading').replace(' ','')
+    accofolder.invokeFactory(type_name,oid) 
+    object = getattr(accofolder,oid)    
+    object.getContent().edit(mapping=ds)
+    context.notifyCPSDocumentCreation(ob=object)
+    psm = 'new %s created' % oid
+    context_ti = context.portal_types[context.portal_type] 
+    index = context_ti.getActionById('view','university_view')
+    return getattr(context,index)(psm=psm)
+
Index: waeup_product/trunk/skins/waeup_student/create_jamb.py
===================================================================
--- waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 96)
+++ waeup_product/trunk/skins/waeup_student/create_jamb.py	(revision 103)
@@ -24,5 +24,5 @@
                       layout_mode='create',
                       )
-if psm == 'invalid' or psm == '':
+if psm == 'invalid':
     return context.create_jamb_form(rendered = res,
                                  psm = 'Please correct your errors',
