Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt	(revision 5998)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt	(revision 5999)
@@ -166,28 +166,12 @@
 provided 'Edit  faculty' button:
 
-  >>> browser.getLink('Edit faculty').click()
+  >>> browser.getLink('Manage faculty').click()
 
 Let's set a new title and save the form:
 
-  >>> browser.getControl(name='form.title').value = "My test faculty"
+  >>> browser.getControl(name='form.title').value = "My renamed faculty"
   >>> browser.getControl(name='form.actions.save').click()
 
-Clicking 'Save' we will stay on the settings form. So we can change
-the department again. This time we will return to the overview page
-afterwards:
-
-  >>> browser.getControl(name='form.title').value = "My renamed faculty"
-  >>> ctrl = browser.getControl("Save and return")
-  >>> ctrl.click()
-
-If we go to the settings page and click ``Cancel`` nothing will be
-changed:
-
-  >>> browser.getLink('Edit faculty').click()
-  >>> browser.getControl(name='form.title').value = "Blah"
-  >>> browser.getControl('Cancel').click()
-
-Our faculty was indeed renamed to ``My renamed faculty`` and not to
-``Blah``:
+Our faculty was indeed renamed to ``My renamed faculty``:
 
   >>> browser.open('http://localhost/myuniversity/faculties')
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 5998)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 5999)
@@ -16,4 +16,5 @@
 from zope import schema
 from waeup.sirp.browser.resources import warning
+from waeup.sirp.browser.resources import datepicker, tabs
 try:
     from zope.authentication.interfaces import (
@@ -906,9 +907,12 @@
     grok.name('index')
     pnav = 1
-    label = 'Departments'
 
     @property
     def title(self):
         return self.context.longtitle()
+        
+    @property
+    def label(self):
+        return 'Departments'
 
     #def update(self, code=None, edit=None, delete=None):
@@ -927,8 +931,11 @@
     grok.name('add')
     grok.require('waeup.manageUniversity')
-    title = 'Add department'
-    label = ''
+    label = 'Add department'
     form_fields = grok.AutoFields(IDepartmentAdd)
     pnav = 1
+
+    @property
+    def title(self):
+        return self.context.longtitle()
     
     @grok.action('Add department')
@@ -946,9 +953,9 @@
                                   'in the database')
             return
-        self.redirect(self.url(self.context))
+        self.redirect(self.url(self.context, u'@@manage'))
         
     @grok.action('Cancel')
     def cancel(self, **data):
-        self.redirect(self.url(self.context))           
+        self.redirect(self.url(self.context))
 
 class ManageFacultyFormPage(WAeUPEditFormPage):
@@ -958,8 +965,23 @@
     grok.name('manage')
     grok.require('waeup.manageUniversity')
-    title = 'Edit faculty'
-    pnav = 1
+    grok.template('facultymanagepage')
+    pnav = 1
+    taboneactions = ['Save','Save and return','Cancel']
+    tabtwoactions = ['Add department', 'Remove selected','Cancel']
 
     form_fields = grok.AutoFields(IFaculty)
+
+    @property
+    def label(self):
+        return 'Manage faculty'
+        
+    @property
+    def title(self):
+        return self.context.longtitle()        
+
+    def update(self):
+        tabs.need()
+        #warning.need()
+        return super(ManageFacultyFormPage, self).update()
 
     @grok.action('Save')
@@ -967,11 +989,29 @@
         self.applyData(self.context, **data)
         return
-    
-    @grok.action('Save and return')
-    def saveAndReturn(self, **data):
-        self.applyData(self.context, **data)
-        self.redirect(self.url(self.context))
-        return
-
+          
+    # ToDo: Show warning message before deletion
+    @grok.action('Remove selected')
+    def delDepartments(self, **data):
+        form = self.request.form
+        child_id = form['val_id']
+        if not isinstance(child_id, list):
+            child_id = [child_id]
+        deleted = []
+        for id in child_id:
+            try:
+                del self.context[id]
+                deleted.append(id)
+            except:
+                self.flash('Could not delete %s: %s: %s' % (
+                        id, sys.exc_info()[0], sys.exc_info()[1]))
+        if len(deleted):
+            self.flash('Successfully removed: %s' % ', '.join(deleted))
+        return       
+
+    @grok.action('Add department', validator=NullValidator)
+    def addDepartment(self, **data):
+        self.redirect(self.url(self.context, '@@add'))
+        return    
+        
     @grok.action('Cancel', validator=NullValidator)
     def cancel(self, **data):
@@ -980,10 +1020,10 @@
 
 
-class RemoveDepartmentFormPage(RemoveFormPage):
-    """ Remove Department Page 
-    """
-    grok.context(IFaculty)
-    title = "Remove department"
-    pnav = 1
+#class RemoveDepartmentFormPage(RemoveFormPage):
+#    """ Remove Department Page 
+#    """
+#    grok.context(IFaculty)
+#    title = "Remove department"
+#    pnav = 1
 
 
@@ -1006,5 +1046,4 @@
     def update(self):
         yui.tabview.need()
-
         if 'delcourse' in self.request.form:
             code = self.request.form['code']
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeuptheme-gray1.css
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeuptheme-gray1.css	(revision 5998)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeuptheme-gray1.css	(revision 5999)
@@ -4,8 +4,24 @@
 want to do more complex operations. */
  
+a, table td a {
+  text-decoration: none;
+}
+
+a:hover {
+  text-decoration: underline;
+}
+
 .breadcrumbs { 
   background-color: #fff; 
   padding: 0.3em; 
-  margin-bottom: 0.8em 
+  margin-bottom: 0.8em;
+} 
+
+.breadcrumbs a { 
+  text-decoration: none;
+} 
+
+.breadcrumbs a:hover { 
+  text-decoration: underline;
 } 
  
@@ -76,4 +92,9 @@
 }
 
+.yui-button a:hover {
+  text-decoration: none;
+}
+
+
 .actionbar { 
   margin-top: -10px;
@@ -82,2 +103,109 @@
 }
 
+/* jquery-ui customizations */
+
+.ui-tabs {
+  padding-bottom: 0em;
+  padding-left: 0em;
+  padding-right: 0em;
+  padding-top: 0em;
+  position: relative;
+}
+
+.ui-corner-all {
+  -moz-border-radius:0px;
+}
+
+.ui-tabs .ui-tabs-nav {
+  margin: 0;
+  padding-left: 0.2em;
+  padding-right: 0.2em;
+  padding-bottom: 0;
+  padding-top: 0;
+
+}
+
+.ui-tabs .ui-tabs-nav li {
+  float: center;
+  margin-left: 6px;
+  margin-right: 0.2em;
+  margin-top: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  position: relative;
+  top: 1px;
+  white-space: nowrap;
+
+}
+
+.ui-tabs .ui-tabs-nav li a {
+  float: center;
+  padding-bottom: 0.5em;
+  padding-left: 1em;
+  padding-right: 1em;
+  padding-top: 0.5em;
+  text-decoration: none;
+}
+
+.ui-tabs .ui-tabs-nav li a:hover {
+  text-decoration: underline;
+}
+
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected {
+  margin-bottom: 0px;
+  padding-bottom: 0px;
+  background: #FFF;
+  border-width: 0px;
+  padding-top: 0px;
+  margin-top: 0px;
+}
+
+
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
+  color: #FFF;
+}
+
+.ui-state-active a:link, .ui-state-active a:visited {
+  color: #000;
+}
+
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+  
+  border-width: 0px;
+  background-color: #456;
+  background-image: none;
+  font-weight: normal;
+}
+
+.ui-widget {
+  font-family: Verdana,Arial,sans-serif;
+  font-size: 100%;
+}
+
+.ui-widget-header {
+  background-color: #456;
+  background-image: None;
+  border-color: #456;
+  border-style: solid;
+  border-width:0px;  
+}
+
+.ui-helper-reset {
+  font-size: 90%;
+  line-height: 1;
+}
+
+.ui-widget-content {
+  background-color: #FFFFFF;
+  background-image: none;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+  border-top-style: solid;
+  border-top-width: 0px;
+  border-color: #456;
+}
+
+.ui-widget-content a {
+  color: #456;
+}
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/facultymanagepage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/facultymanagepage.pt	(revision 5999)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/facultymanagepage.pt	(revision 5999)
@@ -0,0 +1,119 @@
+<h2 i18n:translate=""
+tal:condition="view/label"
+tal:content="view/label">Label</h2>
+
+<div class="form-status"
+tal:define="status view/status"
+tal:condition="status">
+
+<div i18n:translate="" tal:content="view/status">
+  Form status summary
+</div>
+
+<ul class="errors" tal:condition="view/errors">
+  <li tal:repeat="error view/error_views">
+     <span tal:replace="structure error">Error Type</span>
+  </li>
+</ul>
+</div>
+
+
+<form action="." tal:attributes="action request/URL" method="POST"
+      class="edit-form" enctype="multipart/form-data"> 
+
+<div id="tabs">
+<ul>
+  <li><a href="#tab-1"><span>Settings</span></a></li>
+  <li><a href="#tab-2"><span>Contents</span></a></li>
+</ul>
+   
+<div id="tab-1">        
+      <table class="form-fields">
+      <tbody>
+      <tal:block repeat="widget view/widgets">
+        <tr>
+          <td class="label" tal:define="hint widget/hint">
+    	<label tal:condition="python:hint"
+    	       tal:attributes="for widget/name">
+    	  <span class="required" tal:condition="widget/required"
+    		>*</span><span i18n:translate=""
+    		tal:content="widget/label">label</span>
+    	</label>
+    	<label tal:condition="python:not hint"
+    	       tal:attributes="for widget/name">
+    	  <span class="required" tal:condition="widget/required"
+    		>*</span><span i18n:translate=""
+    		tal:content="widget/label">label</span>
+    	</label>
+          </td>
+          <td class="field">
+    	<div class="widget" tal:content="structure widget">
+    	  <input type="text" />
+    	</div>
+    	<div class="error" tal:condition="widget/error">
+    	  <span tal:replace="structure widget/error">error</span>
+    	</div>
+          </td>
+        </tr>
+      </tal:block>
+      </tbody>
+      </table>
+
+    <div id="actionsView">
+        <span class="actionButtons" tal:condition="view/availableActions">
+            <span tal:repeat="action view/actions"
+                  tal:omit-tag="">
+              <input tal:condition="python:action.label in view.taboneactions"
+                     tal:replace="structure action/render"/>
+            </span>
+        </span>
+    </div>   
+
+</div>    
+    
+<div id="tab-2">
+  <h3>Departments</h3>
+  <table class="zebra">
+    <thead>
+      <tr>
+        <th>&nbsp;</th><th>Code</th><th>Title</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr tal:repeat="dep context/values">
+        <td>
+          <input type="checkbox"
+    		 name="val_id"
+    		 tal:attributes="value dep/code" />
+        </td>
+        <td>
+          <a tal:attributes="href python: view.url(dep)"
+    	     tal:content="dep/__name__">
+        	ID
+          </a>
+        </td>
+        <td>
+          <span tal:content="dep/title">
+    	   ID
+          </span>
+        </td>
+      </tr>
+    </tbody>
+  </table>
+  
+    <div id="actionsView">
+        <span class="actionButtons" tal:condition="view/availableActions">
+            <span tal:repeat="action view/actions"
+                  tal:omit-tag="">
+              <input tal:condition="python:action.label in view.tabtwoactions"
+                     tal:replace="structure action/render"/>
+            </span>
+        </span>
+    </div>      
+  
+</div>
+</div>
+</form>  
+
+
+
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/login.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/login.pt	(revision 5998)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/login.pt	(revision 5999)
@@ -3,9 +3,9 @@
     
     <a href="@@loginstaff">
-      <img tal:attributes="src static/login.png" /> Staff Login
+      Staff Login
     </a>
     <br />
     <a href="@@loginstudent">
-      <img tal:attributes="src static/login.png" /> Student Login
+       Student Login
     </a>
 </div>
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 5998)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 5999)
@@ -316,5 +316,5 @@
     grok.context(IFaculty)
     grok.view(FacultyPage)
-    text = 'Edit faculty'
+    text = 'Manage faculty'
 
 class ManageDepartmentActionButton(ManageActionButton):
@@ -361,8 +361,8 @@
     text = 'Add faculty'
     
-class AddDepartmentActionButton(AddActionButton):
-    grok.context(IFaculty)
-    grok.view(FacultyPage)
-    text = 'Add department'
+#class AddDepartmentActionButton(AddActionButton):
+#    grok.context(IFaculty)
+#    grok.view(FacultyPage)
+#    text = 'Add department'
 
 class AddCertificateActionButton(AddActionButton):
@@ -397,9 +397,9 @@
     text = 'Remove faculty'
    
-class RemoveDepartmentActionButton(RemoveActionButton):
-    grok.context(IFaculty)
-    grok.view(FacultyPage)
-    text = 'Remove department'
-
+#class RemoveDepartmentActionButton(RemoveActionButton):
+#    grok.context(IFaculty)
+#    grok.view(FacultyPage)
+#    text = 'Remove department'
+    
 
 #
