Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 10771)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py	(revision 11254)
@@ -26,5 +26,4 @@
     NullValidator)
 from waeup.kofa.browser.breadcrumbs import Breadcrumb
-from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning
 from waeup.kofa.browser.layout import default_primary_nav_template
 from waeup.kofa.browser.pages import delSubobjects
@@ -134,15 +133,4 @@
         _('Clear all hostels'),
         _('Remove selected')]
-
-    def update(self):
-        tabs.need()
-        self.tab1 = self.tab2 = self.tab3 = self.tab4 = ''
-        qs = self.request.get('QUERY_STRING', '')
-        if not qs:
-            qs = 'tab1'
-        setattr(self, qs, 'active')
-        warning.need()
-        datatable.need()
-        return super(HostelsContainerManagePage, self).update()
 
     # It's quite dangerous to remove entire hostels with its content (beds).
@@ -167,10 +155,10 @@
         return
 
-    @jsaction(_('Clear all hostels'))
+    @jsaction(_('Clear all hostels'), style='danger')
     def clearHostels(self, **data):
         self.context.clearAllHostels()
         self.flash(_('All hostels cleared.'))
         write_log_message(self, 'all hostels cleared')
-        self.redirect(self.url(self.context, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -201,5 +189,5 @@
             self.context.addHostel(hostel)
         except KeyError:
-            self.flash(_('The hostel already exists.'))
+            self.flash(_('The hostel already exists.'), type='warning')
             return
         self.flash(_('Hostel created.'))
@@ -251,23 +239,10 @@
         return self.url(grok.getSite(),'students')
 
-    def update(self):
-        datepicker.need() # Enable jQuery datepicker in date fields.
-        tabs.need()
-        datatable.need()
-        warning.need()
-        self.tab1 = self.tab2 = ''
-        qs = self.request.get('QUERY_STRING', '')
-        if not qs:
-            qs = 'tab1'
-        setattr(self, qs, 'active')
-        super(HostelManageFormPage, self).update()
-        return
-
-    @action(_('Save'))
+    @action(_('Save'), style='primary')
     def save(self, **data):
         msave(self, **data)
         return
 
-    @action(_('Update all beds'))
+    @action(_('Update all beds'), style='primary')
     def updateBeds(self, **data):
         removed, added, modified, modified_beds = self.context.updateBeds()
@@ -280,5 +255,5 @@
         self.flash(flash_message)
         write_log_message(self, message)
-        self.redirect(self.url(self.context, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -289,6 +264,6 @@
             child_id = form['val_id']
         else:
-            self.flash(_('No item selected.'))
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.flash(_('No item selected.'), type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
             return
         if not isinstance(child_id, list):
@@ -310,5 +285,5 @@
                 mapping = {'a':m_translated}))
             write_log_message(self, 'switched: %s' % message)
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -319,6 +294,6 @@
             child_id = form['val_id']
         else:
-            self.flash(_('No item selected.'))
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.flash(_('No item selected.'), type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
             return
         if not isinstance(child_id, list):
@@ -334,16 +309,16 @@
                 mapping = {'a':message}))
             write_log_message(self, 'released: %s' % message)
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
         else:
-            self.flash(_('No allocated bed selected.'))
-            self.redirect(self.url(self.context, '@@manage')+'?tab2')
-        return
-
-    @jsaction(_('Clear hostel'))
+            self.flash(_('No allocated bed selected.'), type='warning')
+            self.redirect(self.url(self.context, '@@manage')+'#tab2')
+        return
+
+    @jsaction(_('Clear hostel'), style='danger')
     def clearHostel(self, **data):
         self.context.clearHostel()
         self.flash(_('Hostel cleared.'))
         write_log_message(self, 'cleared')
-        self.redirect(self.url(self.context, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context, '@@manage')+'#tab2')
         return
 
@@ -362,9 +337,9 @@
     def save(self, **data):
         if data['owner'] == NOT_OCCUPIED:
-            self.flash(_('No valid student id.'))
+            self.flash(_('No valid student id.'), type='warning')
             self.redirect(self.url(self.context))
             return
         msave(self, **data)
-        self.redirect(self.url(self.context.__parent__, '@@manage')+'?tab2')
+        self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2')
         return
 
@@ -374,4 +349,4 @@
             # Beds must be released first before they can be allocated to
             # other students.
-            self.redirect(self.url(self.context.__parent__, '@@manage')+'?tab2')
-        return
+            self.redirect(self.url(self.context.__parent__, '@@manage')+'#tab2')
+        return
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt	(revision 10771)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt	(revision 11254)
@@ -4,17 +4,20 @@
 
 
-  <ul class="tabs" data-tabs="tabs">
-    <li tal:attributes="class view/tab1">
-    <a href="#tab-1">
-      <span i18n:translate="">Settings
-      </span></a>
+  <ul class="tabs nav nav-tabs" data-tabs="tabs">
+    <li class="active">
+      <a href="#tab1" data-toggle="tab" i18n:translate="">
+        Settings
+      </a>
     </li>
-    <li tal:attributes="class view/tab2">
-    <a href="#tab-2" i18n:translate="">Hostels</a>
+    <li>
+      <a href="#tab2" data-toggle="tab" i18n:translate="">
+        Hostels
+      </a>
     </li>
   </ul>
 
   <div class="tab-content">
-    <div id="tab-1" tal:attributes="class view/tab1">
+    <div id="tab1" class="active tab-pane">
+      <br />
       <table class="form-table">
         <tbody>
@@ -29,6 +32,7 @@
       </div>
     </div>
-    <div id="tab-2" tal:attributes="class view/tab2"> <br />
-      <table class="display dataTableManage">
+    <div id="tab2" class="tab-pane">
+      <br />
+      <table class="kofa-data-table dataTableManage">
         <thead>
           <tr>
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt	(revision 10771)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt	(revision 11254)
@@ -16,5 +16,5 @@
 </table>
 
-<table i18n:domain="waeup.kofa">
+<table i18n:domain="waeup.kofa" class="table">
   <thead>
     <tr>
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt	(revision 10771)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt	(revision 11254)
@@ -2,15 +2,20 @@
       i18n:domain="waeup.kofa" enctype="multipart/form-data">
 
-  <ul class="tabs" data-tabs="tabs">
-    <li tal:attributes="class view/tab1"><a href="#tab-1">
-      <span i18n:translate="">Hostel Data</span></a>
+  <ul class="tabs nav nav-tabs" data-tabs="tabs">
+    <li class="active">
+      <a href="#tab1" data-toggle="tab">
+        <span i18n:translate="">Hostel Data</span>
+      </a>
     </li>
-    <li tal:attributes="class view/tab2"><a href="#tab-2">
-      <span i18n:translate="">Beds</span></a>
+    <li>
+      <a href="#tab2" data-toggle="tab">
+        <span i18n:translate="">Beds</span>
+      </a>
     </li>
   </ul>
 
   <div class="tab-content">
-    <div id="tab-1" tal:attributes="class view/tab1">
+    <div id="tab1" class="active tab-pane">
+      <br />
       <table class="form-table">
       <tbody>
@@ -37,39 +42,39 @@
     </div>
 
-    <div id="tab-2" tal:attributes="class view/tab2">
-      <h3>Beds</h3>
-      <table class="display dataTableManage">
-      <thead>
-        <tr>
-          <th>&nbsp;</th>
-          <th i18n:translate="">Id</th>
-          <th i18n:translate="">Type</th>
-          <th i18n:translate="">Number</th>
-          <th i18n:translate="">Owner</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr tal:repeat="value context/values">
-           <td>
-            <input type="checkbox" name="val_id"
-      		  tal:attributes="value value/__name__" />
-          </td>
-          <td tal:content="value/bed_id">ID</td>
-          <td tal:content="value/bed_type">TYPE</td>
-          <td tal:content="value/bed_number">NUMBER</td>
-          <td>
-            <a tal:condition="python: value.owner != view.not_occupied"
-               tal:attributes="href python: '%s/%s/accommodation' %
-                    (view.students_url,value.owner)">
-              <span tal:content="value/owner">OWNER</span>
-            </a>
-            <a tal:condition="python: value.owner == view.not_occupied"
-               tal:attributes="href python: view.url(value)"
-               i18n:translate="">
-            [allocate student]
-            </a>
-          </td>
-        </tr>
-      </tbody>
+    <div id="tab2" class="tab-pane">
+      <br />
+      <table class="kofa-data-table dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;</th>
+            <th i18n:translate="">Id</th>
+            <th i18n:translate="">Type</th>
+            <th i18n:translate="">Number</th>
+            <th i18n:translate="">Owner</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="value context/values">
+             <td>
+              <input type="checkbox" name="val_id"
+        		  tal:attributes="value value/__name__" />
+            </td>
+            <td tal:content="value/bed_id">ID</td>
+            <td tal:content="value/bed_type">TYPE</td>
+            <td tal:content="value/bed_number">NUMBER</td>
+            <td>
+              <a tal:condition="python: value.owner != view.not_occupied"
+                 tal:attributes="href python: '%s/%s/accommodation' %
+                      (view.students_url,value.owner)">
+                <span tal:content="value/owner">OWNER</span>
+              </a>
+              <a tal:condition="python: value.owner == view.not_occupied"
+                 tal:attributes="href python: view.url(value)"
+                 i18n:translate="">
+              [allocate student]
+              </a>
+            </td>
+          </tr>
+        </tbody>
       </table>
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 10771)
+++ main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py	(revision 11254)
@@ -368,5 +368,5 @@
         self.browser.open(self.container_path + '/hall-1/hall-1_A_101_A')
         self.assertEqual(self.browser.url,
-            self.container_path + '/hall-1/@@manage?tab2')
+            self.container_path + '/hall-1/@@manage#tab2')
         # Updating the beds again will not affect the allocation and also
         # the bed numbering remains the same
