Index: waeup/branches/ulif-layout/src/waeup/app.py
===================================================================
--- waeup/branches/ulif-layout/src/waeup/app.py	(revision 4584)
+++ waeup/branches/ulif-layout/src/waeup/app.py	(revision 4585)
@@ -1,19 +1,11 @@
 import grok
-import re
 from zope.app.authentication.authentication import PluggableAuthentication
 from zope.app.security.interfaces import IAuthentication
-from zope.component import getUtility, getMultiAdapter, createObject
-from zope.interface import Interface
+from zope.component import createObject
 
-from waeup.interfaces import (IUniversity, IStudentContainer, IHostelContainer,
-                              IFacultyContainer, ICSVDataReceivers)
-from waeup.viewlets import (MainArea, LeftSidebar, Index, Manage,
-                            FormWrapMixin, master_template_path)
+from waeup.interfaces import IUniversity, ICSVDataReceivers
 from waeup.authentication import setup_authentication
 from waeup.datacenter import DataCenter
 from waeup.users import UserContainer
-from waeup.widgets.interfaces import ITableProvider
-
-master_template = grok.PageTemplateFile(master_template_path)
 
 class University(grok.Application, grok.Container):
@@ -56,97 +48,2 @@
             return self.datacenter
         return None
-
-    
-class ManageForm(grok.EditForm):
-    """Manage the basic properties of a `University` instance.
-    """
-
-    form_fields = grok.AutoFields(IUniversity)
-    grok.require('waeup.manageUniversity')
-
-    @grok.action('Save')
-    def save(self, **data):
-        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
-
-    @grok.action('Cancel')
-    def cancel(self, **data):
-        self.redirect(self.url(self.context))
-        return
-
-class ManageUniversity(Manage):
-    grok.name('manage')
-    grok.context(IUniversity)
-    grok.require('waeup.manageUniversity')
-    grok.template('master_template')
-    
-    
-class ManageUniversityMain(FormWrapMixin, grok.Viewlet):
-    """A viewlet that renders the `ManageForm`.
-    """
-    grok.viewletmanager(MainArea)
-    grok.context(IUniversity)
-    grok.view(Manage)
-    grok.require('waeup.manageUniversity')
-    
-    formview_name = 'manageform' # The name of the formview we want to
-                                 # be rendered in this viewlet.
-
-class Content(grok.Viewlet):
-    grok.viewletmanager(MainArea)
-    grok.context(IUniversity)
-    grok.view(Index)
-
-    def update(self):
-        self.table = ITableProvider(self.context).getTables(self.view)[0]
-        self.table.need()
-
-class ManageLink(grok.Viewlet):
-    grok.viewletmanager(LeftSidebar)
-    grok.context(IUniversity)
-    grok.view(Index)
-    grok.order(5)
-    # This link is only displayed, if the user is
-    # allowed to use it!
-    grok.require('waeup.manageUniversity')
-    
-    def render(self):
-        return u'<div class="portlet"><a href="manage">Settings</a></div>'
-
-class ManageFacultiesLink(grok.Viewlet):
-    grok.viewletmanager(LeftSidebar)
-    grok.context(IUniversity)
-    grok.view(Index)
-    grok.order(6)
-    # This is so cool! This link is only displayed, when the user is
-    # allowed to use it!
-    grok.require('waeup.manageUniversity')
-    
-    def render(self):
-        return u'<div class="portlet"><a href="faculties">Manage faculties</a></div>'
-
-class ManageUsersLink(grok.Viewlet):
-    grok.viewletmanager(LeftSidebar)
-    grok.context(IUniversity)
-    grok.view(Index)
-    grok.order(6)
-    grok.require('waeup.manageUsers')
-
-    def render(self):
-        return u'<div class="portlet"><a href="users">Manage users</a></div>'
-
-class ManageDataCenter(grok.Viewlet):
-    grok.viewletmanager(LeftSidebar)
-    grok.context(IUniversity)
-    grok.view(Index)
-    grok.order(6)
-    grok.require('waeup.manageUniversity')
-
-    def render(self):
-        return u'<div class="portlet"><a href="datacenter">Data Center</a></div>'
