Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt	(revision 1437)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt	(revision 1438)
@@ -10,4 +10,7 @@
         Up one level
       </a>
+      
+      <a href="statistics_bed_view"><strong>Bed Statistics</strong></a>      
+      
       <h3 tal:content="here/title_or_id">
         Page Title
@@ -24,20 +27,5 @@
         </tr>
       </table>
-      <table tal:condition="info/bed_types"
-             tal:define="bed_types info/bed_types">
-        <tr>
-          <th width="200px">Bed Category</th>
-          <th width="80px">Total</th>
-          <th width="80px">Booked</th>
-        </tr>
-        <tr tal:repeat="bt bed_types">
-          <td tal:content="bt/name" />
-          <td tal:content="bt/total" />
-          <td tal:content="bt/reserved" />
-          <td tal:condition="bt/full|nothing">
-          <strong>Fully booked</strong>
-        </td>
-        </tr>
-      </table>
+
     </metal:block>
     <metal:main fill-slot="main">
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py	(revision 1437)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py	(revision 1438)
@@ -33,36 +33,5 @@
     items.append(row)
 info['items'] = items
-pa = context.portal_accommodation
-bed_types = pa.uniqueValuesFor('bed_type')
-bt_list = []
-bt_names =  context.getBedTypeNames()
-res = pa.uniqueValuesFor('student')
-reserved = [st for st in res if st]
-sum_total = 0
-sum_occupied = 0
-#from Products.zdb import set_trace;set_trace()
-for bt in bed_types:
-    total = len(pa(bed_type=bt))
-    sum_total += total
-    occupied = len(pa.searchResults({'bed_type': bt,'student':reserved}))
-    sum_occupied += occupied
-    bt_list.append({'name': bt_names[bt],
-                    'total': total,
-                    'reserved': occupied,
-                    'full': occupied == total,
-                    })
-bt_list.append({'name': "All Categories",
-                'total': sum_total,
-                'reserved': sum_occupied,
-                })
-info['bed_types'] = bt_list
-reserved = pa.uniqueValuesFor('student')
-res_list = []
-if reserved > 1:
-    for st in reserved:
-        if st:
-            res = pa(student=st)
-            res_list.append({'student': st, 'bed': res[0].bed })
-info['reserved'] = res_list
+
 
 return info
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/getBedStatistics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/getBedStatistics.py	(revision 1438)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/getBedStatistics.py	(revision 1438)
@@ -0,0 +1,45 @@
+## Script (Python) "getBedStatistics"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=student=None
+##title=
+##
+# $Id: getAccoFolderInfo.py 1301 2007-01-15 12:00:30Z joachim $
+
+pa = context.portal_accommodation
+bed_types = pa.uniqueValuesFor('bed_type')
+bt_list = []
+bt_names =  context.getBedTypeNames()
+res = pa.uniqueValuesFor('student')
+reserved = [st for st in res if st]
+sum_total = 0
+sum_occupied = 0
+info = {}
+#from Products.zdb import set_trace;set_trace()
+for bt in bed_types:
+    total = len(pa(bed_type=bt))
+    sum_total += total
+    occupied = len(pa.searchResults({'bed_type': bt,'student':reserved}))
+    sum_occupied += occupied
+    bt_list.append({'name': bt_names[bt],
+                    'total': total,
+                    'reserved': occupied,
+                    'full': occupied == total,
+                    })
+bt_list.append({'name': "All Categories",
+                'total': sum_total,
+                'reserved': sum_occupied,
+                })
+info['bed_types'] = bt_list
+reserved = pa.uniqueValuesFor('student')
+res_list = []
+if reserved > 1:
+    for st in reserved:
+        if st:
+            res = pa(student=st)
+            res_list.append({'student': st, 'bed': res[0].bed })
+info['reserved'] = res_list
+return info
Index: /WAeUP_SRP/trunk/skins/waeup_accommodation/statistics_bed_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_accommodation/statistics_bed_view.pt	(revision 1438)
+++ /WAeUP_SRP/trunk/skins/waeup_accommodation/statistics_bed_view.pt	(revision 1438)
@@ -0,0 +1,28 @@
+<metal:html tal:define="info context/getBedStatistics;"
+            >
+  <metal:body use-macro="here/main_template/macros/master">
+      <metal:main fill-slot="main">
+
+      <a href="acco_folder_view"><strong>Hostels</strong></a>
+      
+      <h3>Total Bed Statistics</h3>  
+      <br />
+        <table tal:condition="info/bed_types"
+             tal:define="bed_types info/bed_types">
+        <tr>
+          <th width="200px">Bed Category</th>
+          <th width="80px">Total</th>
+          <th width="80px">Booked</th>
+        </tr>
+        <tr tal:repeat="bt bed_types">
+          <td tal:content="bt/name" />
+          <td tal:content="bt/total" />
+          <td tal:content="bt/reserved" />
+          <td tal:condition="bt/full|nothing">
+          <strong>Fully booked</strong>
+        </td>
+        </tr>
+      </table>
+    </metal:main>
+  </metal:body>
+</metal:html>      
