[Mpuls-commits] r16 - in trunk: . formed waskaweb/config waskaweb/controllers waskaweb/i18n waskaweb/i18n/de/LC_MESSAGES waskaweb/lib waskaweb/model waskaweb/model/io waskaweb/public/images waskaweb/public/images/icons waskaweb/public/styles waskaweb/templates waskaweb/templates/administration waskaweb/templates/administration/dialogs waskaweb/templates/appointments waskaweb/templates/appointments/beta waskaweb/templates/appointments/dialogs waskaweb/templates/casemanagement waskaweb/templates/casemanagement/dialogs waskaweb/templates/casemanagement/static_form waskaweb/templates/dialogs waskaweb/templates/documents waskaweb/templates/documents/dialogs waskaweb/templates/start waskaweb/templates/statement waskaweb/templates/statement/dialogs waskaweb/templates/usersettings waskaweb/tests/functional

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 13 15:04:42 CEST 2008


Author: thomas
Date: 2008-08-13 15:04:40 +0200 (Wed, 13 Aug 2008)
New Revision: 16

Added:
   trunk/waskaweb/controllers/CaseBase.py
   trunk/waskaweb/controllers/case_overview.py
   trunk/waskaweb/controllers/navigation.py
   trunk/waskaweb/controllers/rg_aid.py
   trunk/waskaweb/model/case.py
   trunk/waskaweb/model/casedocument.py
   trunk/waskaweb/model/datapage.py
   trunk/waskaweb/model/repeatgroup.py
   trunk/waskaweb/public/images/arrow.gif
   trunk/waskaweb/public/images/confirmation.png
   trunk/waskaweb/public/images/icons/folder.png
   trunk/waskaweb/public/images/icons/folder_closed.png
   trunk/waskaweb/public/images/icons/folder_error.png
   trunk/waskaweb/public/images/icons/folder_open.png
   trunk/waskaweb/public/images/icons/formular_page.png
   trunk/waskaweb/public/images/icons/formular_page_error.png
   trunk/waskaweb/public/images/info.png
   trunk/waskaweb/public/images/info_small.png
   trunk/waskaweb/public/images/kompetenz3.ico
   trunk/waskaweb/public/images/np_arrow.gif
   trunk/waskaweb/public/images/square.gif
   trunk/waskaweb/templates/administration/delete_user_helper.mako
   trunk/waskaweb/templates/administration/dialogs/notificate_delete_user_helper.mako
   trunk/waskaweb/templates/casemanagement/bundle_editor.mako
   trunk/waskaweb/templates/casemanagement/bundle_standin.mako
   trunk/waskaweb/templates/casemanagement/caselist.mako
   trunk/waskaweb/templates/casemanagement/dialogs/bundle_noselection.mako
   trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_delete.mako
   trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_seteditor.mako
   trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_setstandin.mako
   trunk/waskaweb/tests/functional/test_CaseBase.py
   trunk/waskaweb/tests/functional/test_case_overview.py
   trunk/waskaweb/tests/functional/test_rg_aid.py
Removed:
   trunk/waskaweb/templates/casemanagement/rg_aid_overview.mako
Modified:
   trunk/ChangeLog.txt
   trunk/development_wsgi.ini
   trunk/formed/formedtree_web.xml
   trunk/production_wsgi.ini
   trunk/waskaweb/config/middleware.py
   trunk/waskaweb/config/routing.py
   trunk/waskaweb/controllers/administration.py
   trunk/waskaweb/controllers/appointment.py
   trunk/waskaweb/controllers/case.py
   trunk/waskaweb/controllers/document.py
   trunk/waskaweb/controllers/evaluate.py
   trunk/waskaweb/controllers/statement.py
   trunk/waskaweb/controllers/usersettings.py
   trunk/waskaweb/controllers/waska.py
   trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
   trunk/waskaweb/i18n/waskaweb.pot
   trunk/waskaweb/lib/app_globals.py
   trunk/waskaweb/lib/base.py
   trunk/waskaweb/lib/casedata.py
   trunk/waskaweb/lib/evaluation.py
   trunk/waskaweb/lib/helpers.py
   trunk/waskaweb/lib/pdfimporter.py
   trunk/waskaweb/lib/renderer.py
   trunk/waskaweb/lib/security.py
   trunk/waskaweb/lib/validators.py
   trunk/waskaweb/model/agency.py
   trunk/waskaweb/model/io/factories.py
   trunk/waskaweb/model/navigation.py
   trunk/waskaweb/model/statement.py
   trunk/waskaweb/model/user.py
   trunk/waskaweb/public/images/alert.png
   trunk/waskaweb/public/images/question.png
   trunk/waskaweb/public/styles/all.css
   trunk/waskaweb/public/styles/color3.css
   trunk/waskaweb/public/styles/ie6.css
   trunk/waskaweb/public/styles/print.css
   trunk/waskaweb/public/styles/screen.css
   trunk/waskaweb/templates/administration/edit_settings.mako
   trunk/waskaweb/templates/administration/edit_user.mako
   trunk/waskaweb/templates/administration/new_user.mako
   trunk/waskaweb/templates/administration/new_user_result.mako
   trunk/waskaweb/templates/administration/overview_user.mako
   trunk/waskaweb/templates/administration/reset_password.mako
   trunk/waskaweb/templates/administration/show_settings.mako
   trunk/waskaweb/templates/administration/show_user.mako
   trunk/waskaweb/templates/administration/show_user_body.mako
   trunk/waskaweb/templates/administration/userform_body.mako
   trunk/waskaweb/templates/appointments/appointment_form.mako
   trunk/waskaweb/templates/appointments/beta/show_1.mako
   trunk/waskaweb/templates/appointments/beta/show_10.mako
   trunk/waskaweb/templates/appointments/beta/show_2.mako
   trunk/waskaweb/templates/appointments/beta/show_3.mako
   trunk/waskaweb/templates/appointments/beta/show_4.mako
   trunk/waskaweb/templates/appointments/beta/show_5.mako
   trunk/waskaweb/templates/appointments/beta/show_6.mako
   trunk/waskaweb/templates/appointments/beta/show_7.mako
   trunk/waskaweb/templates/appointments/beta/show_8.mako
   trunk/waskaweb/templates/appointments/beta/show_9.mako
   trunk/waskaweb/templates/appointments/dialogs/confirm.mako
   trunk/waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako
   trunk/waskaweb/templates/appointments/new.mako
   trunk/waskaweb/templates/appointments/overview.mako
   trunk/waskaweb/templates/appointments/overview_body.mako
   trunk/waskaweb/templates/appointments/show.mako
   trunk/waskaweb/templates/casemanagement/appointments.mako
   trunk/waskaweb/templates/casemanagement/digest.mako
   trunk/waskaweb/templates/casemanagement/evaluation_result.mako
   trunk/waskaweb/templates/casemanagement/formular.mako
   trunk/waskaweb/templates/casemanagement/main.mako
   trunk/waskaweb/templates/casemanagement/new.mako
   trunk/waskaweb/templates/casemanagement/new_appointment.mako
   trunk/waskaweb/templates/casemanagement/organisation.mako
   trunk/waskaweb/templates/casemanagement/overview.mako
   trunk/waskaweb/templates/casemanagement/static_form/statement.mako
   trunk/waskaweb/templates/casemanagement/static_form/statement_print.mako
   trunk/waskaweb/templates/casemanagement/upload.mako
   trunk/waskaweb/templates/dialogs/alert.mako
   trunk/waskaweb/templates/dialogs/confirm.mako
   trunk/waskaweb/templates/dialogs/notification.mako
   trunk/waskaweb/templates/documents/case_new.mako
   trunk/waskaweb/templates/documents/case_overview.mako
   trunk/waskaweb/templates/documents/dialogs/confirm.mako
   trunk/waskaweb/templates/documents/global_overview.mako
   trunk/waskaweb/templates/documents/global_upload.mako
   trunk/waskaweb/templates/login.mako
   trunk/waskaweb/templates/main.mako
   trunk/waskaweb/templates/start/responsible.mako
   trunk/waskaweb/templates/start/start.mako
   trunk/waskaweb/templates/statement/dialogs/missing_statement.mako
   trunk/waskaweb/templates/statement/edit.mako
   trunk/waskaweb/templates/usersettings/change_password.mako
   trunk/waskaweb/templates/usersettings/change_password_login.mako
   trunk/waskaweb/templates/usersettings/edit_standin.mako
   trunk/waskaweb/templates/usersettings/show_settings.mako
Log:
Load 60203f08abb5 into trunk.


Modified: trunk/ChangeLog.txt
===================================================================
--- trunk/ChangeLog.txt	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/ChangeLog.txt	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,3 +1,546 @@
+2008-01-10  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/model/case.py: Filtering cases for cm for which the privacy
+	  statement is is not set and will not be set in the future. Admin can
+	  see the cases.
+
+2008-01-10  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/administration.py: Revert loop to
+	  edit_settings. I consider this a usability bug! Remember:
+	  the forms for uploading the privacy and the aid plan statement 
+	  are reachable over this page.
+
+2008-01-10  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case_overview: Fixed issue 201. ISE on setting
+	  the editor for bundeled cases in the case overview.
+
+2008-01-10  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/administration.py: After storing of 
+	  agency settings the agency settings form is shown again.
+
+	* waskaweb/model/agency.py: fixed Agency.isAnonTransfer().
+	  Fix for issue 176.
+
+	* waskaweb/templates/administration/edit_settings.mako: Removed
+	  an empty line.
+
+2008-01-09  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/model/navigation.py: The methods NavigationTree.getTreeItem
+	  NavigationTree.getTreeItemByPageName() now raise a HTTPNotFound
+	  exception if an item is not found: another puzzle piece to fix 
+	  issue 184. Removed STRUCTURE string which doesn't represent
+	  the structure of the navigation any more.
+
+2008-01-09  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/templates/login.mako: Send login credentials as
+	  UTF-8 not Latin-1.
+
+	* waskaweb/lib/app_globals.py, waskaweb/lib/security.py: uses
+	  unicode strings to store db patterns.
+
+	* waskaweb/lib/validators.py: When changing passwords force
+	  ASCII characters.
+
+2008-01-09  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+        * waskaweb/controllers/case.py,
+        waskaweb/templates/casemanagement/overview.mako:
+        Fixed issue 29,199
+
+        * waskaweb/controllers/administration.py:
+        Reactiveted deletion of users. fixed typos
+
+        * waskaweb/model/navigation.py:
+        Fixed "next"-section in the navigation. Fixed typo
+
+2008-01-08  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+        * waskaweb/controllers/navigation.py:
+        Fixed opening and closing of treeitems... but really now :)-
+
+        * waskaweb/model/navigation.py:
+        Fixed opening and closing of folders in navigation
+
+        * waskaweb/templates/casemanagement/main.mako,
+        waskaweb/templates/main.mako, waskaweb/templates/start/start.mako:
+        Removed links to the appointment stubs.
+
+        * waskaweb/lib/renderer.py, waskaweb/public/styles/all.css:
+        Added new css-tag for paragraphs which are used to fake textareas in
+        readonly mode. Modified renderer to render parapgraphs with
+        styletag.
+
+        * waskaweb/controllers/navigation.py:
+        Fixed ISE when clicking on the folder icon of
+        "unterstützungsangebote" in the navigation.
+
+2008-01-08  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/model/case.py: Added method CaseOverviewController.sortByLastname() 
+	  which sorts the list by the surname taking the server locale into account.
+
+	* waskaweb/controllers/case_overview.py: Call sortByLastname() when
+	  generating the overview and the search result.
+
+2008-01-07  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/CaseBase.py, waskaweb/controllers/case.py,
+	waskaweb/controllers/rg_aid.py, waskaweb/model/navigation.py: 
+	Implemented first version of printing the whole case.  Added new
+	convinient function "getRendererdFormElements" which returns a tuple
+	holding the navigation and the formular page (tried to make the api a
+	littlebit more easy). This function is able to cope with repeat groups
+	an normal formular pages, which is handy for printing the whole
+	document. NOTE: Printing of the whole ducument is not complete for
+	now! Formatting issues are missing completely.
+	Adjusted code to make use if this new function.
+
+	* waskaweb/lib/renderer.py: Moved rendering of the Aidoverview from
+	the mako template into the renderer.
+
+	* waskaweb/templates/casemanagement/rg_aid_overview.mako: Deleted.
+
+2008-01-02  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/i18n/de/LC_MESSAGES/waskaweb.po: Tagged as Beta 11
+
+2008-01-02  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/templates/main.mako:
+        Fixed path to fav. icon
+
+2008-01-02  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* development_wsgi.ini, waskaweb/controllers/administration.py:
+        Activated "not implemented" dialog on user deletion as there is
+        still an permission issue on the database. Reactivated old memcachd.
+	
+2008-01-02  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/config/routing.py, waskaweb/controllers/CaseBase.py,
+        waskaweb/controllers/case.py, waskaweb/controllers/navigation.py,
+        waskaweb/model/case.py, waskaweb/model/navigation.py,
+        waskaweb/public/styles/color3.css,
+        waskaweb/public/styles/screen.css:
+	Separeted toggling and selecting formular items. Added new controller
+	"navigation" which handles toggling thenavigation tree. Adjusted code
+	to make use if the new controller.
+
+	* waskaweb/model/case.py, waskaweb/model/navigation.py,
+        waskaweb/public/images/icons/folder.png,
+        waskaweb/public/images/icons/folder_closed.png,
+        waskaweb/public/images/icons/folder_error.png,
+        waskaweb/public/images/icons/folder_open.png,
+        waskaweb/public/images/icons/formular_page_error.png:
+        Added new icons for formular navigation
+
+2007-12-21  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/lib/pdfimporter.py, waskaweb/model/navigation.py, 
+	formed/formedtree_web.xml: Splitup of "ergebnisse der KF": Added new
+	formed tree. the section is now seperated in four single pages. 
+	Modified navigation. Adjusted code to handle splitted up
+	section "ergebnisse der KF" in pdfimporter.
+
+2007-12-21  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/lib/renderer.py: Fixed issue197. Selectionlists
+	d in views-modeo not have the disabled tag  in view-mode anymore as CSS does not
+	have any effect when using IE. Instead we render only the selected
+	item in the selectionlist in views-mode. 
+
+2007-12-20  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+        * waskaweb/controllers/CaseBase.py, waskaweb/controllers/case.py,
+        waskaweb/controllers/statement.py, waskaweb/model/case.py:
+	Fixed issue184. If someone tries to load an nonexistent case he will
+	get an 404. 
+
+        * waskaweb/controllers/case_overview.py,
+        waskaweb/controllers/document.py, waskaweb/controllers/rg_aid.py,
+        waskaweb/controllers/statement.py,
+        waskaweb/controllers/usersettings.py, waskaweb/controllers/waska.py:
+	Continued validation of GET parameters in controllers. Validation of
+	POST parameters are still missing, but the formenceode stubs for this
+	are available in each controller method. 
+
+        * waskaweb/lib/renderer.py, waskaweb/public/styles/color3.css,
+        waskaweb/public/styles/screen.css,
+        waskaweb/templates/casemanagement/formular.mako:
+        Make colorscheme more readable at least for the FF. IE doesn't like
+        this.
+
+2007-12-19  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/templates/main.mako: Fixed broken layout.
+	* waskaweb/controllers/case.py, waskaweb/controllers/rg_aid.py, 
+	  waskaweb/lib/renderer.py, waskaweb/model/navigation.py, 
+	  waskaweb/model/repeatgroup.py: Implemented checking of input data in
+	  case controller. Further changed key ids for untertützungs rg to
+	  pure integer values. (not 14rg anymore)
+
+2007-12-19  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/templates/casemanagement/formular.mako, 
+	waskaweb/templates/casemanagement/main.mako, 
+	waskaweb/templates/casemanagement/overview.mako, 
+	waskaweb/templates/main.mako: Fixed broken templates. Opening and
+	closing divs was not done in the correct way. Reading the code was
+	confusing. Fixed this now, but it broken that layout. This will be
+	fixed next.
+	
+2007-12-17  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/templates/administration/new_user.mako, 
+	waskaweb/templates/main.mako: Mapping (fieldname -> human compatible
+	descriptions) for error messages are now local for the templates.
+	dictionary for the mapping will be passed as argument zo the
+	"buildForumlarErrors" Function.
+
+2007-12-17  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* formed/formedtree_web.xml, waskaweb/lib/evaluation.py: Fixed typos
+	(issue81)
+
+2007-12-17  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/statement.py: Workflow. Fixed issue170. If the user
+	declined the privacy statement. He gets redirected to the caseoverview
+	instead of showing the case.
+
+2007-12-17  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/security.py: new method to generate a
+	  new shared secret. new method to concat IP and client
+	  user agent.
+
+	* waskaweb/controllers/waska.py: Set a second cookie
+	  with shared secret if authenticated. Shared secret 
+	  is concatenated with IP and user agent info. A MD5 hash
+	  of this string is stored in the session.
+
+2007-12-17  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/templates/casemanagement/overview,
+	waskaweb/templates/casemanagement/caselist.mako: NEW. Seperated
+	caselisting in extra file to make it potentially reusable at other
+	places.
+	
+	* waskaweb/controllers/administration.py, 
+	waskaweb/i18n/de/LC_MESSAGES/waskaweb.po, waskaweb/i18n/waskaweb.pot, 
+	waskaweb/lib/validators.py, waskaweb/model/case.py, 
+	waskaweb/templates/casemanagement/caselist.mako: Implemented helper
+	dialogs for deleting users. This dialogs helps the user to transfer
+	cases to other users if the user which should be deleted still is the
+	editor of some cases.
+
+
+	* waskaweb/lib/evaluation.py: Fixed issue195. Evaluation for of the
+	"Unterstützungsangeote" are only performed for cases where the user is
+	the editor of. 
+
+2007-12-17  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/CaseBase.py,
+	  waskaweb/controllers/case.py,
+	  waskaweb/controllers/rg_aid.py: Replaced HTTPExceptions(404)
+	  with HTTPNotFound.
+
+2007-12-17  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/evaluation.py: Fix for issue196. Evaluations are
+	  now exported as Latin-1 and line breaks are coded DOS-style.
+
+	* waskaweb/controllers/evaluate.py: Raise HTTPNotFound exceptions
+	  instead of HTTPExceptions. Last ones are abstract and raising them
+	  causes expcetions themself.
+
+2007-12-12  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case.py, waskaweb/controllers/case_overview.py,
+        waskaweb/model/case.py:
+        Implemented setting the standin as another bundled action. 
+
+        * waskaweb/templates/casemanagement/bundle_editor.mako,
+        waskaweb/templates/casemanagement/bundle_standin.mako, waskaweb/temp
+        lates/casemanagement/dialogs/notificate_bundle_delete.mako, waskaweb
+        /templates/casemanagement/dialogs/notificate_bundle_seteditor.mako, w
+        askaweb/templates/casemanagement/dialogs/notificate_bundle_setstandi
+        n.mako, waskaweb/templates/casemanagement/organisation.mako,
+        waskaweb/templates/casemanagement/overview.mako,
+        waskaweb/templates/dialogs/alert.mako:
+	Added dialogs for the bundled actions. This includes enhancement of
+	the case overview page as same as new notification dialogs and other
+	dialogs. 	
+
+        * waskaweb/i18n/de/LC_MESSAGES/waskaweb.po,
+        waskaweb/i18n/waskaweb.pot:
+        Added new translation strings for dialogs in bundles actions
+
+        * waskaweb/lib/validators.py:
+        Added to to new formvalidators for bundled actions
+
+        * waskaweb/config/routing.py:
+        Added new route for bundled actions
+
+2007-12-12  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+        * development_wsgi.ini, waskaweb/config/routing.py,
+        waskaweb/controllers/case_overview.py, waskaweb/model/case.py,
+        waskaweb/templates/casemanagement/bundle_editor.mako,
+        waskaweb/templates/casemanagement/dialogs/bundle_noselection.mako:
+        Implemented "Bundled Actions". Bundled actions are action on
+        multiple cases at once. Currently two different actions are
+        implemented: 1. Deletion 2. Setting the editor. Introduced new class
+        "Casebundle" which encapsulates the functionallity.
+
+2007-12-12  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/CaseBase.py, waskaweb/controllers/case.py,
+        waskaweb/controllers/statement.py:
+        Fixed ISE when user creates a case without statement, but want to
+        set the status of the statement in the confirmation dialog which
+        pops up after creation. The ISE was triggered because of a non
+        existend navigation tree at this moment.
+
+2007-12-11  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/waska.py, waskaweb/lib/base.py: Removed
+	  (out commented) check SSL-id to prevent session hijacking.
+	  Code is left in because 'conventional' hijacking prevention
+	  will work the same but based on second cookie.
+
+2007-12-11  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case_overview.py, 
+	waskaweb/tests/functional/test_case_overview.py: New. Added new
+	controller for actions which are preformed from the case overview
+	page.
+
+	* waskaweb/controllers/case.py, waskaweb/controllers/document.py,
+	waskaweb/templates/casemanagement/main.mako,
+	waskaweb/templates/casemanagement/overview.mako,
+	waskaweb/templates/main.mako: Moved some code from the case controller
+	into the new case_overview controller. Adjusted code in templates.
+
+2007-12-11  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/lib/renderer.py, 
+	waskaweb/templates/casemanagement/formular.mako, 
+	waskaweb/templates/casemanagement/main.mako, 
+	waskaweb/templates/main.mako:  Changed code in renderer to fix last
+	remaining warnings in renderer formular page. Anchor-names are now
+	unique. Adjusted code in templates.
+
+2007-12-10  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/templates/casemanagement/formular.mako: Removed uneeded
+	check if the form should be displayed.
+	
+	* waskaweb/controllers/CaseBase.py, waskaweb/controllers/case.py 
+	waskaweb/controllers/rg_aid.py: Mainly cleaned up code in rg_aid and
+	removed unneeded fragments which where copied from the case
+	controller. Simplified call of the getFormNavigation method. All
+	needed values are stored in the session and do not need to be privided
+	as paramenters. Adjusted code to this. 
+
+	* waskaweb/config/routing.py: Adjusted routing to handle changed
+	parameters of show and edit functions in rg_aid
+
+2007-12-10  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case.py: Fixed dataset id converting error
+ 	which leads into saving data in the wrong dataset. (dataset id need
+	to be converted to determine the id of an repeatgroup for a
+	praticular case.)
+
+2007-12-10  Torsten Irlaender  <torsten.irlaender at intevation.de>
+
+        * waskaweb/config/routing.py, waskaweb/controllers/case.py,
+        waskaweb/templates/casemanagement/rg_aid_overview.mako:
+        Case controller and aid repeatgroup controller are now inherited
+        from the Casebase controller. Cleaned up case base controller and
+        moved code for aid repeatgroups into the new controller (just copied
+        for now -> needs more cleanup). Adjusted routing to make the new
+        controller work.
+
+        * waskaweb/controllers/CaseBase.py, waskaweb/controllers/rg_aid.py,
+        waskaweb/tests/functional/test_CaseBase.py,
+        waskaweb/tests/functional/test_rg_aid.py:
+        New. Added a new Casebase controller which provides methods common
+        to all case related controller (e.g case, or repeatgroups). Added
+        new controller handling aid repeat groups.
+
+2007-12-10  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/pdfimporter.py: Added 'root' as a possible root
+	of the XFA document.
+
+2007-12-10  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case.py: Fixed typo which leads into not beeing
+	  able to exit edit-mode after we once entered it.
+
+2007-12-08  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/waska.py: Beaker does not delete
+	  the backend data on invalidate() (I consider this a bug).
+	  So we delete a session before we invalidate it.
+
+2007-12-08  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/waska.py: call session.invalidate() at
+	  logout. This really removes the session.
+
+2007-12-07  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/base.py: Add extra check against SSL session id to
+	  prevent session hijacking.
+
+	* waskaweb/controllers/waska.py: When log out remove SSL ID from
+	  session. TODO: call session.invalidate()
+
+2007-12-07  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case.py: Fixed ISE when creating new aid
+	  statements. TODO: separate repeatgroup handling from case controller
+	  into an own controller.
+
+2007-12-07  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/administration.py
+	  waskaweb/controllers/appointment.py
+	  waskaweb/controllers/case.py
+	  waskaweb/controllers/document.py
+	  waskaweb/controllers/evaluate.py
+	  waskaweb/controllers/statement.py
+	  waskaweb/controllers/usersettings.py
+	  waskaweb/controllers/waska.py: Added checkRole() decorator 
+	  to controllers.
+
+	* waskaweb/lib/security.py: Using tuples instead of lists in checkRole
+	* waskaweb/model/repeatgroup.py: import missing traceback.
+
+2007-12-07  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/case.py: Added missing return statement
+	  in method __init_case().
+
+2007-12-07  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case.py, waskaweb/controllers/statement.py,
+	  waskaweb/lib/base.py, waskaweb/model/case.py,
+	  waskaweb/model/user.py: Removed use various session vars for saving
+	  case realated attributes. All these attributes are now stores in one
+	  single session var named "cases" which is a Sessioncase object.
+	
+	* waskaweb/templates/casemanagement/*.mako: Adjust mako templates to
+	  make use of the new session var
+	
+2007-12-06  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/security.py: added decorator function checkRole()
+
+	* waskaweb/controllers/case.py: add checkRole() decorator to delete.
+
+2007-12-06  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/controller/usersettings.py: Removed obsolte code in show
+	  setting (determining if incoming user id ist "0") 
+
+2007-12-06  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/model/user.py: Reapplied patch to make user objects
+	  aware of the fact that there may be no standins. Therefore
+	  its value is set to None.
+
+2007-12-05  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/config/middleware.py: Make serving of static content
+	  optional via flag 'serve_static'.
+
+	* development_wsgi.ini, production_wsgi.ini: Adjusted,
+
+2007-12-05  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/controllers/document.py,
+	  waskaweb/controllers/evaluate.py: Set the HTTP-headers
+	  'Cache-Control' to 'must-revalidate' and 'Pragma' to 
+	  'must-revalidate' to workaround SSL download problems
+	  with IE6 and IE7.
+
+2007-12-05  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/model/user.py: Applied patch to make user objects
+	  aware of the fact that there may be no standins. Therefore
+	  its value is set to None.
+	  
+2007-12-05  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/statement.py, waskaweb/model/case.py, 
+	waskaweb/model/statement.py: Statements (for printing) are now fetched
+	from the case instead of creating an own statementin the controller.
+	Statement will be automatically filled out if possible.
+
+	* wwaskaweb/model/case.py, 
+	waskaweb/templates/casemanagement/digest.mako: Changed attribute
+	"address" to "street"
+
+2007-12-05  Torsten Irländer <torsten.irlaender at intevation.de>
+	
+	* waskaweb/controllers/case.py, waskaweb/lib/casedata.py, 
+	waskaweb/model/case.py: Moved import and import related helper methods
+	into the case factory. Modified code in case controller to make use of
+	the new import methods.
+
+2007-12-05  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/controllers/case.py, waskaweb/lib/casedata.py,
+	waskaweb/model/case.py, waskaweb/model/navigation.py: Moved special
+	code for generating the Navigationtree in connection with the
+	"Kompetenz" repeat group into the navigation class. Moved method for
+	getting the komptentzid of a case into the caseclass
+
+2007-12-05  Torsten Irländer <torsten.irlaender at intevation.de>
+
+	* waskaweb/model/repeatgroup.py: New. Moved repeatgroups from old
+	  /lib/casedata into new /model/repeatgroup.py. Renamed classes. 
+
+	* waskaweb/controllers/case.py, waskaweb/controllers/statement.py,
+	  waskaweb/lib/casedata.py: Adopted code in these classes to the
+	  introduced class for repeatgroup
+
+	* waskaweb/lib/helpers.py: Fixed typo of a function call
+
+2007-12-04  Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/model/casedocument.py: New. Subclassed FormEd's document
+	  to model the special extensions needed for case management.
+
+	* waskaweb/model/datapage.py: New. Bridge between data base and 
+	  case management model, constructed via CaseDocument.
+	  its value is set to None.
+
+	* waskaweb/model/io/factories.py: Modified to build a CaseDocument
+	  instead of a simple Document
+
+	* waskaweb/lib/casedata.py: Moved several classes out to their
+	  new position in model. Removed some out-commented code.
+
+	* waskaweb/model/case.py: Fixed typo with form_errors. Removed
+	  dependency from none-existing code.
+
+	* waskaweb/controllers/case.py: United usage of CaseDocument and Case.
+	  Adjusted controller functions to new model.
+
+	* waskaweb/lib/helpers.py, waskaweb/controllers/statement.py: Adjusted
+	  to use new model.
+
 2007-12-03  Sascha L. Teichmann <teichmann at intevation.de>
 
 	* waskaweb/i18n/de/LC_MESSAGES/waskaweb.po: Tagged to Beta 7

Modified: trunk/development_wsgi.ini
===================================================================
--- trunk/development_wsgi.ini	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/development_wsgi.ini	2008-08-13 13:04:40 UTC (rev 16)
@@ -25,6 +25,10 @@
 pdf2xfa_host = 192.168.11.17
 pdf2xfa_port = 1111
 
+# set this to 'false' if you do not want the application
+# to handle static content.
+serve_static = true
+
 [server:main]
 use = egg:Paste#http
 host = 0.0.0.0
@@ -40,6 +44,9 @@
 beaker.session.timeout = 1800 
 #beaker.session.type = memory 
 beaker.session.type = ext:memcached
+
+#Sascha's java memcache
+#beaker.session.url = 192.168.11.17:22122 
 beaker.session.url = 127.0.0.1
 #beaker.session.invalidate_corrupt = True
 

Modified: trunk/formed/formedtree_web.xml
===================================================================
--- trunk/formed/formedtree_web.xml	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/formed/formedtree_web.xml	2008-08-13 13:04:40 UTC (rev 16)
@@ -132,12 +132,12 @@
           <bool description="Sonstige" value="-2" name="sonstige"/>
         </choice>
         <text formularname="Muttersprache_sonstige_nennung" description="Nennung sonstige Muttersprache" maxlength="60" name="muttersprache_sonstige_nennung" target="c" size="40" modes="default"/>
-        <choice formularname="Staatsangehörigkeit" description="Staatsangehörigkeit" name="staatsangehoerigkeit" target="d:50" size="1">
+        <choice formularname="Staatsangehörigkeit" description="Staatsangehörigkeit" name="staatsangehoerigkeit" target="c:50" size="1">
           <bool checked="true" description="Keine Angabe" value="-1" name="keineangabe"/>
           <external-choice value="staatsangehoerigkeit.xml" name="external-choice-9"/>
           <bool description="Sonstige" value="-2" name="sonstige"/>
         </choice>
-        <text formularname="Staatsangehörigkeit_sonstige_nennung" description="Nennung sonstige Staatsangehörigkeit" maxlength="60" name="staatsangehoerigkeit_sonstige_nennung" target="c" size="40" modes="default"/>
+        <text formularname="Staatsangehörigkeit_sonstige_nennung" description="Nennung sonstige Staatsangehörigkeit" maxlength="60" name="staatsangehoerigkeit_sonstige_nennung" target="d" size="40" modes="default"/>
         <choice formularname="Aufenthaltsstatus" description="Aufenthaltsstatus" name="aufenthaltsstatus" target="d:50" size="1">
           <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
           <bool description="Aufenthaltserlaubnis" value="0" name="aufenthaltserlaubnis"/>
@@ -254,24 +254,24 @@
     <page description="Soziale Lage" name="page_4">
       <group formularname="SozialeLage" description="Soziale Lage" name="sozialelage" invisible="s" containers="a,b,c,d">
         <info value="Soziale Lage" name="info-27" target="a" invisible="s"/>
-        <group description="Bezugspersonen (Mehrfachantwort möglich)" name="bezugspersonenmehrfachantwortmoeglich" target="b">
-          <bool formularname="Mutter" description="Mutter" name="mutter_2"/>
-          <bool formularname="Vater" description="Vater" name="vater_2"/>
-          <bool formularname="Großeltern" description="Großeltern" name="grosseltern"/>
-          <bool description="Geschwister" name="geschwister_2"/>
-          <bool formularname="Pflegefamilie" description="Pflegefamilie" name="pflegefamilie_1"/>
-          <bool formularname="Stiefmutter" description="Stiefmutter" name="stiefmutter"/>
-          <bool formularname="Stiefvater" description="Stiefvater" name="stiefvater"/>
-          <bool formularname="Verwandte" description="Verwandte" name="verwandte_1"/>
-          <bool formularname="Partner" description="Partnerin/Partner" name="partner"/>
-          <bool formularname="HeimbetreuerIn" description="Betreuerin/Betreuer im Heim" name="heimbetreuerin"/>
-          <bool formularname="BetreuerIn" description="Betreuerin/Betreuer" name="betreuerin"/>
-          <bool description="Lehrerin/Lehrer" name="lehrerin"/>
-          <bool formularname="Mitbewohner" description="Mitbewohnerin/Mitbewohner" name="mitbewohner"/>
-          <bool formularname="Partner_Mutter" description="Lebensgefährte der Mutter" name="partner_mutter"/>
-          <bool formularname="Partner_Vater" description="Lebensgefährtin des Vaters" name="partner_vater"/>
-          <bool formularname="Freund" description="beste Freundin/bester Freund" name="freund"/>
-          <bool formularname="keine_Bezugsperson" description="keine Bezugsperson" name="keine_bezugsperson"/>
+        <group description="Bezugspersonen (Mehrfachantwort möglich)" name="bezugspersonenmehrfachantwortmoeglich" target="b" containers="a,b,c,d,e,f,g,h,i">
+          <bool formularname="Mutter" description="Mutter" name="mutter_2" target="a"/>
+          <bool formularname="Vater" description="Vater" name="vater_2" target="a"/>
+          <bool formularname="Großeltern" description="Großeltern" name="grosseltern" target="b"/>
+          <bool description="Geschwister" name="geschwister_2" target="b"/>
+          <bool formularname="Pflegefamilie" description="Pflegefamilie" name="pflegefamilie_1" target="c"/>
+          <bool formularname="Stiefmutter" description="Stiefmutter" name="stiefmutter" target="c"/>
+          <bool formularname="Stiefvater" description="Stiefvater" name="stiefvater" target="d"/>
+          <bool formularname="Verwandte" description="Verwandte" name="verwandte_1" target="d"/>
+          <bool formularname="Partner" description="Partnerin/Partner" name="partner" target="e"/>
+          <bool formularname="HeimbetreuerIn" description="Betreuerin/Betreuer im Heim" name="heimbetreuerin" target="e"/>
+          <bool formularname="BetreuerIn" description="Betreuerin/Betreuer" name="betreuerin" target="f"/>
+          <bool description="Lehrerin/Lehrer" name="lehrerin" target="f"/>
+          <bool formularname="Mitbewohner" description="Mitbewohnerin/Mitbewohner" name="mitbewohner" target="g"/>
+          <bool formularname="Partner_Mutter" description="Lebensgefährte der Mutter" name="partner_mutter" target="g"/>
+          <bool formularname="Partner_Vater" description="Lebensgefährtin des Vaters" name="partner_vater" target="h"/>
+          <bool formularname="Freund" description="beste Freundin/bester Freund" name="freund" target="h"/>
+          <bool formularname="keine_Bezugsperson" description="keine Bezugsperson" name="keine_bezugsperson" target="i"/>
         </group>
         <group description="Aktivitäten des Jugendlichen" name="aktivitaetendesjugendlichen" target="c">
           <group description="Hobbies" name="hobbies">
@@ -513,15 +513,15 @@
               </choice>
               <text formularname="externer_Anbieter" description="externer Anbieter" maxlength="100" name="externeranbieter" target="b" size="50"/>
             </group>
-            <group description="Art des Verfahrens" name="artdesverfahrens" target="c" containers="a,b,c,d,e,f,g,h">
+            <group description="Art des Verfahrens" name="artdesverfahrens" target="c" containers="a,b,c,d,e,f">
               <bool formularname="Assessment-Center" description="Assessment-Center" name="assessment_center" target="a"/>
-              <bool formularname="Interview" description="Interview" name="interview" target="b"/>
-              <bool formularname="biografieorientierte_Methoden" description="Biographische Methoden" name="biografieorientierte_methoden" target="c"/>
-              <bool formularname="Selbsttest_Selbstbeurteilung" description="Selbsttest und Selbstbeurteilung" name="selbsttest_selbstbeurteilung" target="d"/>
-              <bool formularname="Sonstiges" description="Sonstiges Verfahren" name="sonstiges_2" target="e"/>
-              <text formularname="Sonstiges_Nennung" description="Nennung sonstiges Verfahren" maxlength="100" name="artdesverfahrens_nennung_sonstiges" target="f" size="50"/>
-              <bool formularname="Testverfahren" description="Testverfahren" name="testverfahren" target="g"/>
-              <group description="Art des Testverfahrens" name="testverfahren" target="h" containers="a,b,c,d,e">
+              <bool formularname="Interview" description="Interview" name="interview" target="a"/>
+              <bool formularname="biografieorientierte_Methoden" description="Biographische Methoden" name="biografieorientierte_methoden" target="b"/>
+              <bool formularname="Selbsttest_Selbstbeurteilung" description="Selbsttest und Selbstbeurteilung" name="selbsttest_selbstbeurteilung" target="b"/>
+              <bool formularname="Sonstiges" description="Sonstiges Verfahren" name="sonstiges_2" target="c"/>
+              <text formularname="Sonstiges_Nennung" description="Nennung sonstiges Verfahren" maxlength="100" name="artdesverfahrens_nennung_sonstiges" target="d" size="50"/>
+              <bool formularname="Testverfahren" description="Testverfahren" name="testverfahren" target="e"/>
+              <group description="Art des Testverfahrens" name="testverfahren" target="f" containers="a,b,c,d,e">
                 <group name="group-0" target="a" invisible="s">
                   <bool formularname="Intelligenztest" description="Intelligenztest" name="intelligenztest" target="a"/>
                 </group>
@@ -553,376 +553,375 @@
           </group>
         </group>
       </page>
-      <page description="Ergebnisse der Kompetenzfestellung" name="page_9" containers="a">
-        <group description="Kompetenzfeststellung" name="kompetenzfeststellung" target="a" invisible="s" containers="a,b">
-          <group description="Ergebnisse der Kompetenzfeststellung" name="ergebnissederkompetenzfeststellung" target="a" invisible="s" containers="a,b,c">
-            <info value="Ergebnisse der Kompetenzfeststellung" name="info-11" target="a" invisible="s"/>
-            <group description="Ausbildungs- und berufsbezogene Kompetenzen (Fach- und Methodenkompetenzen)" name="asbldngs_ndbrfsbzgnkmptnznfch_ndmthdnkmptnzn" target="b" invisible="s" containers="a,b,c">
-              <info value="Ausbildungs- und berufsbezogene Kompetenzen (Fach- und Methodenkompetenzen)" name="info-13" target="a"/>
-              <group description="Fachkompetenzen" name="fachkompetenzen" target="b" invisible="s" containers="a,b,c,d">
-                <group formularname="Fachkompetenzen_Naturwissenschaften" description="Fachkompetenzen im naturwissenschaftlich-technischen und wirtschaftlichen Bereich" name="fachkompetenzen_naturwissenschaften" target="a" containers="a,b,c,d,e">
-                  <choice formularname="Rechenfähigkeit" description="rechnerisches Denken (Rechenfähigkeit)" name="rechenfaehigkeit" target="a" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="räumliches_Vorstellungsvermögen" description="räumliches Vorstellungsvermögen" name="raeumliches_vorstellungsvermoegen" target="b" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="Grundverständnis_naturwissenschaftlicher_Zusammenhänge" description="Grundverständnis von naturwissenschaftlichen Zusammenhängen" name="grundverstaendnis_naturwissenschaftlicher_zusammenhaenge" target="c" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="logisches_Denken" description="logisches (schlussfolgerndes) Denken" name="logisches_denken" target="d" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="wirtschaftliche_grundkenntnisse" description="wirtschaftliche Grundkenntnisse" name="wirtschaftliche_grundkenntnisse" target="e" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                </group>
-                <group formularname="Fachkompetenzen_Medienbereich" description="Fachkompetenzen im Medienbereich" name="fachkompetenzen_medienbereich" target="b" containers="a,b,c,d">
-                  <choice formularname="allgemeine_PC-Kenntnisse" description="allgemeine PC-Kenntnisse" name="allgemeine_pc_kenntnisse" target="a" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="spezielle_PC-Kenntnisse_Grafikbearbeitung_Musikbearbeitung" description="spezielle PC-Kenntnisse (Grafikbearbeitung, Musikbearbeitung)" name="spezielle_pc_kenntnisse_grafikbearbeitung_musikbearbeitung" target="b" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="Internet-Anwendungen_und_E-mail-Kenntnisse" description="Internet-Anwendungen und E-Mail-Kenntnisse" name="internet_anwendungen_und_e_mail_kenntnisse" target="c" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="andere_Medien" description="Beherrschung anderer Medien (z.B. Kamera)" name="andere_medien" target="d" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                </group>
-                <group formularname="Fachkompetenzen_Bereich_Sprachen_Kommunikation" description="Fachkompetenzen im Bereich Sprachen und Kommunikation" name="fachkompetenzen_bereich_sprachen_kommunikation" target="c" containers="a,b,c,d,e,f">
-                  <choice formularname="Texte_lesen_und_verstehen" description="Fähigkeit, Texte zu lesen und zu verstehen" name="texte_lesen_und_verstehen" target="a" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="Texte_schreiben_und_formulieren" description="Fähigkeit, Texte fehlerfrei zu schreiben und verständlich zu formulieren" name="texte_schreiben_und_formulieren" target="b" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="deutsche_Sprache" description="Fähigkeit, sich in der deutschen Sprache verständlich und adressatengerecht auszudrücken und mündliche Aussagen zu verstehen" name="deutsche_sprache" target="c" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <group formularname="beherrschung_sprache1" description="Beherrschung der Sprache 1" name="beherrschung_sprache1" target="d" containers="a">
-                    <choice formularname="Sprache1" description="welche" name="sprache1" target="a" size="1">
-                      <bool description="Keine Angabe" value="-1" name="keineangabe"/>
-                      <external-choice value="sprachen.xml" name="external-choice-3"/>
-                      <bool description="Sonstige" value="-2" name="sonstige"/>
-                    </choice>
-                    <text formularname="Sprache1_sonstige_nennung" description="Nennung Sonstige" maxlength="60" value="a" name="sprache1_sonstige_nennung" size="40"/>
-                    <choice formularname="Beherrschung_Sprache_1" description="Beherrschung der Sprache 1" name="beherrschung_sprache1" target="a" size="1">
-                      <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                      <bool description="sehr gut" value="0" name="sehrgut"/>
-                      <bool description="gut" value="1" name="gut"/>
-                      <bool description="mittelmäßig" value="2" name="mittelmaessig"/>
-                      <bool description="nur Grundkenntnisse" value="3" name="nurgrundkenntnisse"/>
-                    </choice>
-                  </group>
-                  <group formularname="beherrschung_sprache2" description="Beherrschung der Sprache 2" name="beherrschung_sprache2" target="e" containers="a">
-                    <choice formularname="Sprache2" description="welche" name="sprache2" target="a" size="1">
-                      <bool description="Keine Angabe" value="-1" name="keineangabe"/>
-                      <external-choice value="sprachen.xml" name="external-choice-3"/>
-                      <bool description="Sonstige" value="-2" name="sonstige"/>
-                    </choice>
-                    <text formularname="Sprache2_sonstige_nennung" description="Nennung Sonstige" maxlength="60" value="a" name="sprache2_sonstige_nennung" size="40"/>
-                    <choice formularname="Beherrschung_Sprache_2" description="Beherrschung der Sprache 2" name="beherrschung_sprache2" target="a" size="1">
-                      <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                      <bool description="sehr gut" value="0" name="sehrgut"/>
-                      <bool description="gut" value="1" name="gut"/>
-                      <bool description="mittelmäßig" value="2" name="mittelmaessig"/>
-                      <bool description="nur Grundkenntnisse" value="3" name="nurgrundkenntnisse"/>
-                    </choice>
-                  </group>
-                  <group formularname="beherrschung_sprache3" description="Beherrschung der Sprache 3" name="beherrschung_sprache3" target="f" containers="a">
-                    <choice formularname="Sprache3" description="welche" name="sprache3" target="a" size="1">
-                      <bool description="Keine Angabe" value="-1" name="keineangabe"/>
-                      <external-choice value="sprachen.xml" name="external-choice-3"/>
-                      <bool description="Sonstige" value="-2" name="sonstige"/>
-                    </choice>
-                    <text formularname="Sprache3_sonstige_nennung" description="Nennung Sonstige" maxlength="60" value="a" name="sprache3_sonstige_nennung" size="40"/>
-                    <choice formularname="Beherrschung_Sprache_3" description="Beherrschung der Sprache 3" name="beherrschung_sprache3" target="a" size="1">
-                      <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                      <bool description="sehr gut" value="0" name="sehrgut"/>
-                      <bool description="gut" value="1" name="gut"/>
-                      <bool description="mittelmäßig" value="2" name="mittelmaessig"/>
-                      <bool description="nur Grundkenntnisse" value="3" name="nurgrundkenntnisse"/>
-                    </choice>
-                  </group>
-                </group>
-                <group formularname="Fachkompetenzen_handwerklicher_Bereich" description="Fachkompetenzen im handwerklichen Bereich" name="fachkompetenzen_handwerklicher_bereich" target="d" containers="a,b,c,d">
-                  <choice formularname="Hand-_Fingergeschick" description="Hand- und Fingergeschick" name="hand_fingergeschick" target="a" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="Formauffassung" description="Formauffassung" name="formauffassung" target="b" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="Umgang_Maschinen_Werkzeugen" description="Umgang mit Maschinen und Werkzeugen" name="umgang_maschinen_werkzeugen" target="c" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                  <choice formularname="gestalterische_Fantasie" description="gestalterische Fantasie" name="gestalterische_fantasie" target="d" size="1">
-                    <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                    <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                    <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                    <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                    <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                  </choice>
-                </group>
-              </group>
-              <group formularname="Methodenkompetenz" description="Methodenkompetenzen" name="methodenkompetenz" target="c" containers="a,b,c,d">
-                <choice formularname="Methoden_der_Informationsgewinnung" description="Methoden der Informationsgewinnung" name="methoden_der_informationsgewinnung" target="a" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Methoden_der_Informationsverarbeitung" description="Methoden der Informationsverarbeitung" name="methoden_der_informationsverarbeitung" target="b" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Einsatz_Lern-und_Arbeitstechniken" description="Einsatz von Lern- und Arbeitstechniken" name="einsatz_lern_und_arbeitstechniken" target="c" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Problemlösungsorientierung" description="Problemlösungsorientierung" name="problemloesungsorientierung" target="d" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-              </group>
+      <group description="Ergebnisse der Kompetenzfeststellung" name="ergebniss_der_kompetenzfeststellung">
+        <page description="Fachkompetenzen" name="page_9" containers="a">
+          <group description="Fachkompetenzen" name="fachkompetenzen" target="a" invisible="s" containers="a,b,c,d">
+            <group formularname="Fachkompetenzen_Naturwissenschaften" description="Fachkompetenzen im naturwissenschaftlich-technischen und wirtschaftlichen Bereich" name="fachkompetenzen_naturwissenschaften" target="a" containers="a,b,c,d,e">
+              <choice formularname="Rechenfähigkeit" description="rechnerisches Denken (Rechenfähigkeit)" name="rechenfaehigkeit" target="a" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="räumliches_Vorstellungsvermögen" description="räumliches Vorstellungsvermögen" name="raeumliches_vorstellungsvermoegen" target="b" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="Grundverständnis_naturwissenschaftlicher_Zusammenhänge" description="Grundverständnis von naturwissenschaftlichen Zusammenhängen" name="grundverstaendnis_naturwissenschaftlicher_zusammenhaenge" target="c" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="logisches_Denken" description="logisches (schlussfolgerndes) Denken" name="logisches_denken" target="d" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="wirtschaftliche_grundkenntnisse" description="wirtschaftliche Grundkenntnisse" name="wirtschaftliche_grundkenntnisse" target="e" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
             </group>
-            <group description="Soziale und personale Kompetenzen (Sozial- und Selbstkompetenzen)" name="sozialeundpersonalekompetenzensozial_undselbstkompetenzen" target="c" invisible="s" containers="a,b,c,d">
-              <info value="Soziale und personale Kompetenzen (Sozial- und Selbstkompetenzen)" name="info-12" target="a"/>
-              <group formularname="Sozialkompetenzen" description="Sozialkompetenzen" name="sozialkompetenzen" target="b" containers="a,b,c,d,e,f">
-                <choice formularname="Kommunikationsfähigkeit" description="Kommunikationsfähigkeit" name="kommunikationsfaehigkeit" target="a" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Kritikfähigkeit" description="Kritikfähigkeit" name="kritikfaehigkeit" target="b" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Konfliktfähigkeit" description="Konfliktfähigkeit" name="konfliktfaehigkeit" target="c" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Kreativität" description="Kreativität" name="kreativitaet" target="d" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Team-und_Kooperationsfähigkeit" description="Team- und Kooperationsfähigkeit" name="team_und_kooperationsfaehigkeit" target="e" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="solidarisches_Verhalten" description="solidarisches Verhalten" name="solidarisches_verhalten" target="f" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-              </group>
-              <group formularname="Selbstkompetenz" description="Selbstkompetenzen" name="selbstkompetenz" target="c" containers="a,b,c,d,e">
-                <choice formularname="selbständiges_Lernen_Arbeiten" description="selbstständiges Lernen und Arbeiten" name="selbstaendiges_lernen_arbeiten" target="a" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Selbstreflexion_Selbsteinschätzung" description="Selbstreflexion und Selbsteinschätzung" name="selbstreflexion_selbsteinschaetzung" target="b" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Verantwortungsübernahme" description="Verantwortungsübernahme" name="verantwortungsuebernahme" target="c" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Zielorientierung" description="Zielorientierung" name="zielorientierung" target="d" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Zuverlässigkeit" description="Zuverlässigkeit" name="zuverlaessigkeit" target="e" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-              </group>
-              <group formularname="psychische_physische_Persönlichkeitsmerkmale" description="psychische und physische Persönlichkeits- und Leistungsmerkmale" name="psychische_physische_persoenlichkeitsmerkmale" target="d" containers="a,b,c,d,e,f,g,h,i,j,k">
-                <choice formularname="altersgerechter_Entwicklungsstand" description="altersgerechter Entwicklungsstand" name="altersgerechter_entwicklungsstand" target="a" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="gesundheitliche_Voraussetzungen" description="gesundheitliche Voraussetzungen" name="gesundheitliche_voraussetzungen" target="b" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Konzentration" description="Konzentration" name="konzentration" target="c" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Ausdauer" description="Ausdauer" name="ausdauer" target="d" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Durchhaltevermögen" description="Durchhaltevermögen" name="durchhaltevermoegen" target="e" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Merkfähigkeit" description="Merkfähigkeit" name="merkfaehigkeit" target="f" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Bearbeitungsgeschwindigkeit" description="Bearbeitungsgeschwindigkeit" name="bearbeitungsgeschwindigkeit" target="g" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Befähigung_zu_Daueraufmerksamkeit" description="Befähigung zu Daueraufmerksamkeit" name="befaehigung_zu_daueraufmerksamkeit" target="h" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Leistungsbereitschaft" description="Leistungsbereitschaft" name="leistungsbereitschaft" target="i" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Sorgfalt" description="Sorgfalt" name="sorgfalt" target="j" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-                <choice formularname="Umgangsformen" description="Umgangsformen" name="umgangsformen" target="k" size="1">
-                  <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
-                  <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
-                  <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
-                  <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
-                  <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
-                </choice>
-              </group>
+            <group formularname="Fachkompetenzen_Medienbereich" description="Fachkompetenzen im Medienbereich" name="fachkompetenzen_medienbereich" target="b" containers="a,b,c,d">
+              <choice formularname="allgemeine_PC-Kenntnisse" description="allgemeine PC-Kenntnisse" name="allgemeine_pc_kenntnisse" target="a" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="spezielle_PC-Kenntnisse_Grafikbearbeitung_Musikbearbeitung" description="spezielle PC-Kenntnisse (Grafikbearbeitung, Musikbearbeitung)" name="spezielle_pc_kenntnisse_grafikbearbeitung_musikbearbeitung" target="b" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="Internet-Anwendungen_und_E-mail-Kenntnisse" description="Internet-Anwendungen und E-Mail-Kenntnisse" name="internet_anwendungen_und_e_mail_kenntnisse" target="c" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="andere_Medien" description="Beherrschung anderer Medien (z.B. Kamera)" name="andere_medien" target="d" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
             </group>
+            <group formularname="Fachkompetenzen_handwerklicher_Bereich" description="Fachkompetenzen im handwerklichen Bereich" name="fachkompetenzen_handwerklicher_bereich" target="d" containers="a,b,c,d">
+              <choice formularname="Hand-_Fingergeschick" description="Hand- und Fingergeschick" name="hand_fingergeschick" target="a" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="Formauffassung" description="Formauffassung" name="formauffassung" target="b" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="Umgang_Maschinen_Werkzeugen" description="Umgang mit Maschinen und Werkzeugen" name="umgang_maschinen_werkzeugen" target="c" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+              <choice formularname="gestalterische_Fantasie" description="gestalterische Fantasie" name="gestalterische_fantasie" target="d" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+                <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+                <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+                <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+              </choice>
+            </group>
           </group>
-          <textarea rows="20" formularname="Dokumentation_Kompetenzfeststellung" description="Dokumentation zur Kompetenzfeststellung" cols="80" name="dokumentation_kompetenzfeststellung" target="b" modes="-mode1.1anon"/>
-        </group>
+        </page>
+        <page description="Methodenkompetenzen" name="page_26" containers="a">
+          <group formularname="Methodenkompetenz" description="Methodenkompetenzen" name="methodenkompetenz" target="a" containers="a,b,c,d">
+            <choice formularname="Methoden_der_Informationsgewinnung" description="Methoden der Informationsgewinnung" name="methoden_der_informationsgewinnung" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Methoden_der_Informationsverarbeitung" description="Methoden der Informationsverarbeitung" name="methoden_der_informationsverarbeitung" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Einsatz_Lern-und_Arbeitstechniken" description="Einsatz von Lern- und Arbeitstechniken" name="einsatz_lern_und_arbeitstechniken" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Problemlösungsorientierung" description="Problemlösungsorientierung" name="problemloesungsorientierung" target="d" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+          </group>
+        </page>
+        <page description="Sprachen und Kommunikation" name="page_27" containers="a">
+          <group formularname="Fachkompetenzen_Bereich_Sprachen_Kommunikation" description="Fachkompetenzen im Bereich Sprachen und Kommunikation" name="fachkompetenzen_bereich_sprachen_kommunikation" target="a" containers="a,b,c,d,e,f">
+            <choice formularname="Texte_lesen_und_verstehen" description="Fähigkeit, Texte zu lesen und zu verstehen" name="texte_lesen_und_verstehen" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Texte_schreiben_und_formulieren" description="Fähigkeit, Texte fehlerfrei zu schreiben und verständlich zu formulieren" name="texte_schreiben_und_formulieren" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="deutsche_Sprache" description="Fähigkeit, sich in der deutschen Sprache verständlich und adressatengerecht auszudrücken und mündliche Aussagen zu verstehen" name="deutsche_sprache" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <group formularname="beherrschung_sprache1" description="Beherrschung der Sprache 1" name="beherrschung_sprache1" target="d" containers="a">
+              <choice formularname="Sprache1" description="welche" name="sprache1" target="a" size="1">
+                <bool description="Keine Angabe" value="-1" name="keineangabe"/>
+                <external-choice value="sprachen.xml" name="external-choice-3"/>
+                <bool description="Sonstige" value="-2" name="sonstige"/>
+              </choice>
+              <text formularname="Sprache1_sonstige_nennung" description="Nennung Sonstige" maxlength="60" value="a" name="sprache1_sonstige_nennung" size="40"/>
+              <choice formularname="Beherrschung_Sprache_1" description="Beherrschung der Sprache 1" name="beherrschung_sprache1" target="a" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="sehr gut" value="0" name="sehrgut"/>
+                <bool description="gut" value="1" name="gut"/>
+                <bool description="mittelmäßig" value="2" name="mittelmaessig"/>
+                <bool description="nur Grundkenntnisse" value="3" name="nurgrundkenntnisse"/>
+              </choice>
+            </group>
+            <group formularname="beherrschung_sprache2" description="Beherrschung der Sprache 2" name="beherrschung_sprache2" target="e" containers="a">
+              <choice formularname="Sprache2" description="welche" name="sprache2" target="a" size="1">
+                <bool description="Keine Angabe" value="-1" name="keineangabe"/>
+                <external-choice value="sprachen.xml" name="external-choice-3"/>
+                <bool description="Sonstige" value="-2" name="sonstige"/>
+              </choice>
+              <text formularname="Sprache2_sonstige_nennung" description="Nennung Sonstige" maxlength="60" value="a" name="sprache2_sonstige_nennung" size="40"/>
+              <choice formularname="Beherrschung_Sprache_2" description="Beherrschung der Sprache 2" name="beherrschung_sprache2" target="a" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="sehr gut" value="0" name="sehrgut"/>
+                <bool description="gut" value="1" name="gut"/>
+                <bool description="mittelmäßig" value="2" name="mittelmaessig"/>
+                <bool description="nur Grundkenntnisse" value="3" name="nurgrundkenntnisse"/>
+              </choice>
+            </group>
+            <group formularname="beherrschung_sprache3" description="Beherrschung der Sprache 3" name="beherrschung_sprache3" target="f" containers="a">
+              <choice formularname="Sprache3" description="welche" name="sprache3" target="a" size="1">
+                <bool description="Keine Angabe" value="-1" name="keineangabe"/>
+                <external-choice value="sprachen.xml" name="external-choice-3"/>
+                <bool description="Sonstige" value="-2" name="sonstige"/>
+              </choice>
+              <text formularname="Sprache3_sonstige_nennung" description="Nennung Sonstige" maxlength="60" value="a" name="sprache3_sonstige_nennung" size="40"/>
+              <choice formularname="Beherrschung_Sprache_3" description="Beherrschung der Sprache 3" name="beherrschung_sprache3" target="a" size="1">
+                <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+                <bool description="sehr gut" value="0" name="sehrgut"/>
+                <bool description="gut" value="1" name="gut"/>
+                <bool description="mittelmäßig" value="2" name="mittelmaessig"/>
+                <bool description="nur Grundkenntnisse" value="3" name="nurgrundkenntnisse"/>
+              </choice>
+            </group>
+          </group>
+        </page>
+        <page description="Sozial- und Selbstkompetenzen" name="page_28" containers="a,b,c">
+          <group formularname="Sozialkompetenzen" description="Sozialkompetenzen" name="sozialkompetenzen" target="a" containers="a,b,c">
+            <choice formularname="Kommunikationsfähigkeit" description="Kommunikationsfähigkeit" name="kommunikationsfaehigkeit" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Kritikfähigkeit" description="Kritikfähigkeit" name="kritikfaehigkeit" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Konfliktfähigkeit" description="Konfliktfähigkeit" name="konfliktfaehigkeit" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Kreativität" description="Kreativität" name="kreativitaet" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Team-und_Kooperationsfähigkeit" description="Team- und Kooperationsfähigkeit" name="team_und_kooperationsfaehigkeit" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="solidarisches_Verhalten" description="solidarisches Verhalten" name="solidarisches_verhalten" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+          </group>
+          <group formularname="Selbstkompetenz" description="Selbstkompetenzen" name="selbstkompetenz" target="b" containers="a,b,c">
+            <choice formularname="selbständiges_Lernen_Arbeiten" description="selbstständiges Lernen und Arbeiten" name="selbstaendiges_lernen_arbeiten" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Selbstreflexion_Selbsteinschätzung" description="Selbstreflexion und Selbsteinschätzung" name="selbstreflexion_selbsteinschaetzung" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Verantwortungsübernahme" description="Verantwortungsübernahme" name="verantwortungsuebernahme" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Zielorientierung" description="Zielorientierung" name="zielorientierung" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Zuverlässigkeit" description="Zuverlässigkeit" name="zuverlaessigkeit" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+          </group>
+          <group formularname="psychische_physische_Persönlichkeitsmerkmale" description="psychische und physische Persönlichkeits- und Leistungsmerkmale" name="psychische_physische_persoenlichkeitsmerkmale" target="c" containers="a,b,c,d,e,f">
+            <choice formularname="altersgerechter_Entwicklungsstand" description="altersgerechter Entwicklungsstand" name="altersgerechter_entwicklungsstand" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="gesundheitliche_Voraussetzungen" description="gesundheitliche Voraussetzungen" name="gesundheitliche_voraussetzungen" target="a" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Konzentration" description="Konzentration" name="konzentration" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Ausdauer" description="Ausdauer" name="ausdauer" target="b" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Durchhaltevermögen" description="Durchhaltevermögen" name="durchhaltevermoegen" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Merkfähigkeit" description="Merkfähigkeit" name="merkfaehigkeit" target="c" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Bearbeitungsgeschwindigkeit" description="Bearbeitungsgeschwindigkeit" name="bearbeitungsgeschwindigkeit" target="d" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Befähigung_zu_Daueraufmerksamkeit" description="Befähigung zu Daueraufmerksamkeit" name="befaehigung_zu_daueraufmerksamkeit" target="d" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Leistungsbereitschaft" description="Leistungsbereitschaft" name="leistungsbereitschaft" target="e" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Sorgfalt" description="Sorgfalt" name="sorgfalt" target="e" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+            <choice formularname="Umgangsformen" description="Umgangsformen" name="umgangsformen" target="f" size="1">
+              <bool checked="s" description="Keine Angabe" value="-1" name="keineangabe"/>
+              <bool description="stark ausgeprägt" value="0" name="starkausgepraegt"/>
+              <bool description="ausgeprägt" value="1" name="ausgepraegt"/>
+              <bool description="schwach ausgeprägt" value="2" name="schwachausgepraegt"/>
+              <bool description="sehr schwach ausgeprägt" value="3" name="sehrschwachausgepraegt"/>
+            </choice>
+          </group>
+        </page>
+      </group>
+      <page description="Dokumentation zur Kompetenzfeststellung" name="page_29" containers="a">
+        <textarea rows="20" formularname="Dokumentation_Kompetenzfeststellung" description="Dokumentation zur Kompetenzfeststellung" cols="80" name="dokumentation_kompetenzfeststellung" target="a" modes="-mode1.1anon"/>
       </page>
     </group>
     <page description="Förderplanung" name="page_10">
@@ -935,7 +934,7 @@
           <bool formularname="Bereich_Lebensbewältigung" description="im Bereich der Lebensbewältigung" name="bereich_lebensbewaeltigung"/>
           <bool formularname="Sonstiger_Förderbedarf" description="Sonstige" name="sonstiger_foerderbedarf"/>
           <text formularname="Sonstiger_Förderbedarf_Nennung" description="Nennung Sonstige" maxlength="120" name="sonstiger_foerderbedarf_nennung" size="70"/>
-          <group description="Förderzeittraum" name="foerderzeittraum" containers="a">
+          <group description="Förderzeitraum" name="foerderzeittraum" containers="a">
             <date formularname="Förderzeitraum_start" description="von" name="foerderzeitraum_start" target="a"/>
             <date formularname="Förderzeitraum_ende" description="bis" name="foerderzeitraum_ende" target="a"/>
           </group>

Modified: trunk/production_wsgi.ini
===================================================================
--- trunk/production_wsgi.ini	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/production_wsgi.ini	2008-08-13 13:04:40 UTC (rev 16)
@@ -23,6 +23,10 @@
 pdf2xfa_host = 192.168.11.17
 pdf2xfa_port = 1111
 
+# set this to 'false' if you do not want the application
+# to handle static content.
+serve_static = true
+
 [server:main]
 use = egg:Paste#http
 host = 0.0.0.0

Modified: trunk/waskaweb/config/middleware.py
===================================================================
--- trunk/waskaweb/config/middleware.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/config/middleware.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -80,9 +80,14 @@
     # Establish the Registry for this application
     app = RegistryManager(app)
 
-    # Static files
-    ##javascripts_app = StaticJavascripts()
-    static_app = StaticURLParser(config['pylons.paths']['static_files'])
-    ##app = Cascade([static_app, javascripts_app, app])
-    app = Cascade([static_app, app])
+    serve_static = config.get('serve_static')
+    serve_static = serve_static and serve_static.lower() == "true" or False
+
+    if serve_static:
+        print "Serve Static"
+        # Static files
+        ##javascripts_app = StaticJavascripts()
+        static_app = StaticURLParser(config['pylons.paths']['static_files'])
+        ##app = Cascade([static_app, javascripts_app, app])
+        app = Cascade([static_app, app])
     return app

Modified: trunk/waskaweb/config/routing.py
===================================================================
--- trunk/waskaweb/config/routing.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/config/routing.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -19,13 +19,17 @@
     # CUSTOM ROUTES HERE
     map.connect('', controller='waska', action='index')
     map.connect('document/caseDelete/:id/:case/:confirmed', action="caseDelete", controller="document") 
-    map.connect('case/deleteAid/:ds_id/:ds_type/:confirmed', action="deleteAid", controller="case") 
+    map.connect('rg_aid/delete/:rg_id/:ds_type/:confirmed', action="delete", controller="rg_aid") 
     map.connect('case/delete/:id/:confirmed', controller="case", action="delete")
     map.connect('case/select/:id/:confirmed', controller="case", action="select")
     map.connect('case/:action/:ds_id/:page_id/:form', controller="case") 
     map.connect('case/:action/:ds_id/:page_id', controller="case")
+    map.connect('navigation/:action/:ds_id/:page_id', controller="navigation")
+    map.connect('rg_aid/:action/:rg_id/:page_id/:form', controller="rg_aid") 
+    map.connect('rg_aid/:action/:rg_id/:page_id', controller="rg_aid")
     map.connect('formhelp', 'case/showhelp/:help_id', controller="case", action="showHelp")
     map.connect('digest', 'case/digest/:id', controller="case", action="digest")
+    map.connect('case_overview/:action/:confirmed', controller="case_overview") #for bundles actions in case_overview
     map.connect(':controller/:action/:id/:confirmed')
     map.connect(':controller/:action/:id')
     map.connect(':controller/:action/*(file).csv')

Added: trunk/waskaweb/controllers/CaseBase.py
===================================================================
--- trunk/waskaweb/controllers/CaseBase.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/CaseBase.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,76 @@
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+#
+
+import paste
+import logging
+
+from paste.httpexceptions           import HTTPNotFound
+from waskaweb.lib.base              import *
+from waskaweb.lib.renderer          import FormDataImpl, ViewRenderer, AidListRenderer
+from waskaweb.model.case            import CaseFactory, LoadCaseNotExistsError 
+from waskaweb.model.repeatgroup     import AidList 
+
+log = logging.getLogger(__name__)
+
+class CasebaseController(BaseController):
+
+    def __before__(self):
+        BaseController.__before__(self)
+        self.navigation = session.get('navigation.tree')
+
+    def index(self):
+        raise HTTPNotFound()
+
+    def _loadCase(self, id):
+        factory   = CaseFactory()
+        try:
+            case = factory.loadById(id)
+            return case
+        except LoadCaseNotExistsError:
+            self.showError()
+
+    def _getRenderdFormElements(self, ti, ds_id, page_id=None, ro_mode=False):
+        # Determine if we have an repeat group or a formular page
+        what = int(ti.key) == 14 and "rg_aid_overview" or "formular"
+        if what == "rg_aid_overview":
+            navigation = self._getFormNavigation(selected_key="14")
+            renderer = AidListRenderer(AidList(ds_id), ro_mode)
+            content = renderer.render(ds_id, page_id) 
+        else:
+            navigation        = self._getFormNavigation(selected_key=ti.key)
+            real_id           = ti.realId(ds_id)
+            formdata          = self._getFormdata(ti, real_id)
+            vr                = ViewRenderer(formdata, ro_mode)
+            content           = vr.renderView(
+                ti.key, 
+                ds_id,  
+                "/case/save", 
+                showNext = not ti.nextKey() is None)
+        return (content, navigation)
+
+    def _getFormNavigation(self,selected_key=None):
+        errors = session.get('case').getFormErrors()
+        id     = session.get('case').id
+        mode   = session.get('case').getMode()
+        self.navigation.setErrors([err.page for err in errors.itervalues()])
+        select_url = lambda t: '/case/%s/%s/%s' % (mode, id, t.key)
+        toggle_url = lambda r: '/navigation/toggle/%s/%s' % (id, r.key)
+        return self.navigation.render(select_url, toggle_url, selected_key) 
+
+    def _getFormdata(self, treeItem, ds_id):
+        doc  = g.formedTree
+        help = g.helpData
+        page = doc.getPageStore(treeItem.page, ds_id)
+        case = session.get('case')
+        form_errors = case.getFormErrors()
+        formdata = FormDataImpl(
+            help=help, 
+            page=page, 
+            errors=form_errors, 
+            nc=[page.getWidget()])
+        return formdata
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/administration.py
===================================================================
--- trunk/waskaweb/controllers/administration.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/administration.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,27 +1,45 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
 import logging
 import formencode
-from formencode import htmlfill
 
-from waskaweb.lib.base import *
-from waskaweb.lib.security import getDbName 
-from waskaweb.lib.validators import NewUserForm, EditUserForm, NewPasswordForm, EditSettingsForm 
-from waskaweb.model.user import UserObject, UserListObject
-from waskaweb.model.agency import Agency 
+from formencode              import htmlfill
+from waskaweb.lib.base       import *
+from waskaweb.lib.security   import getDbName 
+from waskaweb.lib.validators import NewUserForm, EditUserForm, NewPasswordForm, EditSettingsForm, DeleteUserHelperForm
+from waskaweb.model.user     import UserObject, UserListObject
+from waskaweb.model.case     import CaseOverview, CaseBundle 
+from waskaweb.model.agency   import Agency 
+from waskaweb.lib.security   import checkRole
 
 log = logging.getLogger(__name__)
 
-RESET_PASSWORD_CONFIRM = u'Benutzerpasswort zur&uuml;cksetzen'
+RESET_PASSWORD_CONFIRM          = u'Benutzerpasswort zur&uuml;cksetzen'
 RESET_PASSWORD_CONFIRM_QUESTION = u'Wollen Sie wirklich das Passwort f&uuml;r den Benutzer <strong>%s %s</strong> (login: %s) zur&uuml;cksetzen?' 
+DELETE_USER_NOTIFICATION_SUCCSESS        = u'L&ouml;schen Benutzer'
+DELETE_USER_NOTIFICATION_TEXT_SUCCESS   = u'''Der Benutzer <strong>%s %s</strong> (login: %s) wurde erfolgreich gelöscht. Klicken Sie auf 'OK', um wieder zur Benutzer Übersicht zu gelangen.''' 
 
-DELETE_USER_NOTIFICATION = u'L&ouml;schen Benutzer'
-DELETE_USER_NOTIFICATION_TEXT = u'Leider ist die von Ihnen aufgerufene Funktion in der BETA Version dieser Anwendung noch nicht enthalten.' 
-DELETE_USER_CONFIRM = 'L&ouml;schen Benutzer'
-DELETE_USER_CONFIRM_QUESTION = u'Wollen Sie wirklich den Benutzer <strong>%s %s</strong> (login: %s) l&ouml;schen und die Daten unwiederbringlich verlieren?'
+DELETE_USER_NOTIFICATION        = u'Löschen Benutzer'
+DELETE_USER_NOTIFICATION_TEXT   = u'''Der Benutzer kann nicht gelöscht werden, da er noch als Hauptbearbeiter für einige Fallakten eingetragen ist. Bitte weisen Sie den entsprechenden Fallakten einen neuen Bearbeiter zu. Klicken Sie auf 'OK', um wieder zur Benutzer Übersicht zu gelangen.'''
+DELETE_USER_CONFIRM             = 'L&ouml;schen Benutzer'
+DELETE_USER_CONFIRM_QUESTION    = u'Wollen Sie wirklich den Benutzer <strong>%s %s</strong> (login: %s) l&ouml;schen und die Daten unwiederbringlich verlieren?'
+
+DIALOG_CONFIRM_SETEDITOR = u"""Fallakten übertragen"""
+SETEDITOR_NOTIFICATION_SUCCSESS = u"""Es wurden %s Fallakten erfolgreich an <strong>%s %s</strong> übertragen. Der Nutzer <strong>%s %s </strong> verfügt nun über keine Fallakten mehr und kann gelöscht werden. Klicken Sie auf 'OK' um den Benutzer zu löschen."""
+SETEDITOR_NOTIFICATION_SUCCSESS_REST = u"""Es wurden %s Fallakten erfolgreich an <strong>%s %s</strong> übertragen. Der Nutzer <strong>%s %s </strong> verfügt weiterhin über %s Fallakten. Klicken Sie auf 'OK', um mit dem Übertragen der Bearbeitung fortzufahren."""
+
 class AdministrationController(BaseController):
 
     def index(self):
-	redirect_to(action='overviewUser')
+        redirect_to(action='overviewUser')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def accountDeactivated(self):
         try:
             del session['USER_AUTHORIZED']
@@ -30,23 +48,31 @@
             pass
         return render('/administration/account_deactivated.mako')
 
+    @checkRole('admin_ka')
     def overviewUser(self):
         list = UserListObject()
         c.user_overview = list.getUserList() 
         return render('/administration/overview_user.mako')
 
+    @checkRole('admin_ka')
     def showUser(self, id=None):
+        id = self._checkInt(id)
         c.uo = UserObject(id)
         c.vuo = UserObject(c.uo.standin)
         return render('/administration/show_user.mako')
 
+    @checkRole('admin_ka')
     def editUser(self, id=None):
+        id = self._checkInt(id)
         c.form_errors = {}
         c.form_result = {}
         c.uo = UserObject(id)
         return render('/administration/edit_user.mako') 
 
-    def resetUserPassword(self, id=None, confirmed=False):
+    @checkRole('admin_ka')
+    def resetUserPassword(self, id=None, confirmed='0'):
+        id = self._checkInt(id)
+        confirmed = self._checkBool(confirmed)
         c.uo = UserObject(id)
         if confirmed:
             try:
@@ -63,11 +89,13 @@
             c.url_no  = "/administration/showUser/%s" % id
             return render('/administration/dialogs/confirm_resetpassword.mako')
 
+    @checkRole('admin_ka')
     def newUser(self):
         c.form_errors = {}
         c.form_result = {}
         return render('/administration/new_user.mako')
 
+    @checkRole('admin_ka')
     def editUserAction(self):
         validator = EditUserForm() 
         try:
@@ -86,6 +114,7 @@
             return render('/tests/trace.mako')
             #return "Es ist ein Fehler beim Speichern des Benutzers aufgetreten."
 
+    @checkRole('admin_ka')
     def createUserAction(self):
         validator = NewUserForm() 
         c.user_password = None
@@ -110,14 +139,36 @@
             return render('/tests/trace.mako')
             #return "Es ist ein Fehler beim Speichern des Benutzers aufgetreten."
 
-    def deleteUser(self, id, confirmed=False):
+    @checkRole('admin_ka')
+    def deleteUser(self, id, confirmed='0'):
+        id = self._checkInt(id)
+        confirmed = self._checkBool(confirmed)
         try:
             uo = UserObject(id)
             if confirmed:
-                c.notification_for = DELETE_USER_NOTIFICATION 
-                c.notification_text = DELETE_USER_NOTIFICATION_TEXT 
-                c.url_ok = "/administration/overviewUser"
-                return render('/administration/dialogs/notificate_deleteuser.mako')
+
+                # Check if there are cases for which the user is the editor. If
+                # he is an editor then raise a dialog which allows the user to
+                # transfer the cases.
+                overview = CaseOverview()
+                overview.search('bearbeiter:%s' % uo.id)
+                if overview.getDatasets():
+                    list   = UserListObject()
+                    filter = [u.id for u in list.getAdminList()]
+                    filter.append(uo.id) #the user we want to delete
+                    c.user_list = list.getUserList(filter)
+                    c.cases = overview
+                    c.delete_user_id = id
+                    return render('/administration/delete_user_helper.mako')
+                else:
+                    uo.delete()
+                    # Showup not implemented dialog as there is still an
+                    # persmission problem on the database
+                    c.notification_for = DELETE_USER_NOTIFICATION_SUCCSESS 
+                    c.notification_text = DELETE_USER_NOTIFICATION_TEXT_SUCCESS % (uo.first_name, uo.last_name, uo.getLogin())
+                    c.url_ok = "/administration/overviewUser"
+                    return render('/administration/dialogs/notificate_deleteuser.mako')
+
             else:
                 c.context = "../main.mako" 
                 c.confirm_for = DELETE_USER_CONFIRM 
@@ -128,6 +179,34 @@
         except:
             return render('/tests/trace.mako')
 
+    @checkRole('admin_ka')
+    def deleteUserHelper(self):
+        validator           = DeleteUserHelperForm()
+        all_cases           = CaseOverview()
+        c.notification_for  = DIALOG_CONFIRM_SETEDITOR 
+        c.form_errors       = {}
+        c.form_result       = {}
+        try:
+            data        = formencode.variabledecode.variable_decode(request.params)
+            form_result = validator.to_python(data)
+            case_bundle = CaseBundle(form_result.get('case_id', []))
+            new_editor  = UserObject(form_result.get('editor'))
+            del_user    = UserObject(form_result.get('user_id'))
+            all_cases.search('bearbeiter:%s' % del_user.id)
+            num         = case_bundle.setEditor(form_result.get('editor'))
+            rest        = all_cases.numDatasets() - case_bundle.numDatasets() 
+            print "bundle: %s, rest: %s" % (case_bundle.numDatasets(), rest)
+            c.url_ok    = "/administration/deleteUser/%s/1" % form_result.get('user_id')
+            if rest > 0:
+                c.notification_text = SETEDITOR_NOTIFICATION_SUCCSESS_REST % (str(num), new_editor.first_name, new_editor.last_name, del_user.first_name, del_user.last_name, str(rest))
+            else:
+                c.notification_text = SETEDITOR_NOTIFICATION_SUCCSESS % (str(num), new_editor.first_name, new_editor.last_name, del_user.first_name, del_user.last_name)
+            return render('/administration/dialogs/notificate_delete_user_helper.mako')
+        except formencode.Invalid, error:
+            return self.deleteUser(form_result.get('user_id'), '1')
+            
+
+    @checkRole('admin_ka')
     def showSettings(self):
         c.form_errors = {}
         c.form_result = {}
@@ -137,6 +216,7 @@
         except:
             return render('/tests/trace.mako')
 
+    @checkRole('admin_ka')
     def editSettings(self):
         c.form_errors = {}
         c.form_result = {}
@@ -146,6 +226,7 @@
         except:
             return render('/tests/trace.mako')
 
+    @checkRole('admin_ka')
     def editSettingsAction(self):
         validator = EditSettingsForm()
         try:
@@ -159,12 +240,16 @@
         c.agency.store(c.form_result)
         return self.showSettings()
 
+    @checkRole('admin_ka')
     def viewPrivacyStatement(self):
         agency = Agency()
         statement = agency.getPrivacyStatement() 
         return statement
 
+    @checkRole('admin_ka')
     def viewAidPlanStatement(self):
         agency = Agency()
         statement = agency.getAidPlanStatement() 
         return statement
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/appointment.py
===================================================================
--- trunk/waskaweb/controllers/appointment.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/appointment.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,3 +1,10 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
 import logging
 
 from waskaweb.lib.base import *
@@ -2,2 +9,4 @@
 
+from waskaweb.lib.security import checkRole
+
 log = logging.getLogger(__name__)
@@ -9,34 +18,43 @@
 
 class AppointmentController(BaseController):
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def index(self):
-	redirect_to(action='overview')
+        redirect_to(action='overview')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def overview(self):
         return render('/appointments/overview.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def create(self):
         return render('/appointments/new.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def show(self, id):
         return render('/appointments/beta/show_%s.mako' % id)
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def edit(self, id):
         return self.show(id) 
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def delete(self, id, confirmed=False):
         if confirmed:
-            c.notification_for = DELETE_APPOINT_NOTIFICATION 
+            c.notification_for  = DELETE_APPOINT_NOTIFICATION 
             c.notification_text = DELETE_APPOINT_NOTIFICATION_TEXT 
-            c.url_ok = "/appointment/overview"
+            c.url_ok            = "/appointment/overview"
             return render('/appointments/dialogs/notificate_delete_appointment.mako')
         else:
-            c.context = "../main.mako" 
+            c.context     = "../main.mako" 
             c.confirm_for = 'L&ouml;schen Termin'
-            c.question = 'Wollen Sie wirklich den Termin l&ouml;schen und die Daten unwiederbringlich verlieren?' 
-            c.url_yes = "/appointment/delete/1/1"
-            c.url_no  = "/appointment/overview/"
+            c.question    = 'Wollen Sie wirklich den Termin l&ouml;schen und die Daten unwiederbringlich verlieren?' 
+            c.url_yes     = "/appointment/delete/1/1"
+            c.url_no      = "/appointment/overview/"
             return render('/appointments/dialogs/confirm.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def save(self):
         return render('/appointments/new.mako')
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/case.py
===================================================================
--- trunk/waskaweb/controllers/case.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/case.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,36 +1,39 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
+import traceback
 import logging
-import os
-import shutil
 import paste
 import formencode
+
 from pylons import config
 
-from waskaweb.lib.base import *
+from paste.httpexceptions    import HTTPNotFound
+from waskaweb.lib.base       import *
 from waskaweb.lib.evaluation import *
-from waskaweb.lib.casedata import *
-from waskaweb.lib.validators import NewCaseForm, SearchCaseForm, SetStandinForm, SetEditorForm
-from waskaweb.model.user import *
-from waskaweb.model.statement import * 
+from waskaweb.lib.validators import \
+    NewCaseForm, \
+    SetStandinForm, \
+    SetEditorForm
 
-from waskaweb.lib.renderer import FormDataImpl, ViewRenderer, ErrorItem
-from waskaweb.model.data import PageNode, RuleLeaf
-from waskaweb.model.semantic import * 
+from waskaweb.model.repeatgroup    import AidObject, AidList 
+from waskaweb.model.user           import *
+from waskaweb.model.statement      import * 
+from waskaweb.model.case           import * 
+from waskaweb.controllers.CaseBase import CasebaseController 
+from waskaweb.model.semantic       import * 
+from waskaweb.model.navigation     import NavigationTree
+from waskaweb.lib.security         import checkRole
+from waskaweb.model.document       import listDocuments
 
-from waskaweb.model.navigation import NavigationTree, TreeItem
-
-from waskaweb.lib.pdfimporter import asXFA, FieldExtractor
-
-from waskaweb.model.document import listDocuments
-
-import traceback
-
 log = logging.getLogger(__name__)
 
-import stat
-import os
 
-import cStringIO as StringIO
-
 PDF_DUB_NOTIFICATION      = u"Die Fallakte wurde nicht importiert."
 PDF_DUB_NOTIFICATION_TEXT = \
 u"""Eine Fallakte mit der Kundennummer %s existiert bereits.<br>"""
@@ -41,400 +44,279 @@
 PRINTALL_NOTIFICATION = u'Gesamte Fallakte drucken'
 PRINTALL_NOTIFICATION_TEXT = u'Leider ist die von Ihnen aufgerufene Funktion in der BETA Version dieser Anwendung noch nicht enthalten.' 
 
-class KompetenzTreeItem(TreeItem):
+class CaseController(CasebaseController):
 
-    def __init__(self, key, page, description, children, kid):
-        TreeItem.__init__(self, key, page, description, children)
-        self.kid = kid
-
-    def realId(self, id):
-        return self.kid
-
-class CaseController(BaseController):
-
     def __before__(self):
-        BaseController.__before__(self)
-        self.navigation = session.get('navigation.tree')
+        CasebaseController.__before__(self)
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def index(self):
-        redirect_to(action='overview')
+        redirect_to(controller="/case_overview")
 
-    def search(self):
-        validator = SearchCaseForm()
-        try:
-            form_result = validator.to_python(request.params)
-            c.cases = DataSetOverviewPage()
-            c.cases.search(form_result.get('search_str')) 
-        except formencode.Invalid, error:
-            c.form_result = error.value
-            c.form_errors = error.error_dict or {}
-            c.cases = DataSetOverviewPage()
-            return render('/casemanagement/overview.mako')
-        return render('/casemanagement/overview.mako')
-
-    def overview(self):
-        c.cases = DataSetOverviewPage()
-        c.cases.search()
-        return render('/casemanagement/overview.mako')
-
     def __init_case(self, id):
-        session['case_modus'] = "show" 
-        session['case_id'] = id
-        session['case_errors'] = {}
-        c.digest = DataSetDigest(id) 
+        '''Return a case object'''
+        id = self._checkInt(id)
+        case = self._loadCase(id)
+        c.digest = case.getDigest() 
         c.ds_id = id
-        session['case_hasStatement'] = c.digest.hasSignedPrivacyStatement() 
-        session['case_last_name'] = c.digest.last_name 
-        session['case_first_name'] = c.digest.first_name 
-        session['case_nr'] = c.digest.knr
-        try:
-            k_id = kompetenzId(int(id))
-            #print >> sys.stderr, "Found Kompetenz-Id: %s" % str(k_id)
-        except:
-            traceback.print_exc(file=sys.stderr)
-            k_id = None
 
-        if k_id is None:
-            self.navigation = NavigationTree()
-        else:
-            def xmake(key, page, description, children=None):
-                return KompetenzTreeItem(key, page, description, children, k_id)
-                
-            self.navigation = NavigationTree({
-                "page_8": xmake,
-                "page_9": xmake
-            })
-        session['navigation.tree'] = self.navigation
+        # New session code
+        session_case = case.getSessionCase()
+        session['case'] = session_case
 
+        self.navigation = NavigationTree(case)
+        session['navigation.tree'] = self.navigation
         session.save()
+        return case
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def select(self, id, confirmed):
-        self.__init_case(int(id))
-        # Check if there is a "Einverstaendniserklaerung"
-        if c.digest.hasSignedPrivacyStatement() or confirmed == '1':
+        id = self._checkInt(id)
+        confirmed = self._checkBool(confirmed)
+        case = self.__init_case(id)
+        statement = case.getPrivacyStatement()
+        c.ds_id = case.id
+        # Check if there is a "Einverstaendniserklaerung" None if it is not either signed or declined
+        if (not statement.isSigned() is None) or (confirmed == 1):
             return self.digest(id)
         else:
+            # TODO: What todo when the statement has been declined? -> False
             # Render Nagscreen to inform the user that he is about to open a
             # case which does not have a signed statement
             return render('statement/dialogs/missing_statement.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def digest(self, id):
-        c.digest = DataSetDigest(id) 
+        id = self._checkInt(id)
+        case = self._loadCase(id)
+        c.digest = case.getDigest()
         c.ds_id = id
-        session['case_last_name'] = c.digest.last_name 
-        session['case_first_name'] = c.digest.first_name 
-        session['case_nr'] = c.digest.knr
-        session.save()
-        ti = self.navigation.getTreeItem('0')
-        if not ti: return '404'
-        c.form_navigation = self._getFormNavigation(id, mode="show")
+        #ti = self.navigation.getTreeItem('0')
+        #if not ti: return '404'
+        c.form_navigation = self._getFormNavigation()
         c.print_form = "digest" # Which page to open in popup on printing?           
         return render('/casemanagement/digest.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def printout(self, ds_id, page_id, form=None):
+        ds_id   = self._checkInt(ds_id)
+        page_id = self._checkInt(page_id)
         c.print_version = 1 
         if form == "digest":
             return self.digest(ds_id) 
         elif form == "show":
-            return self.show(ds_id, page_id) 
+            return self.show(ds_id, page_id)
         else:
-            return render('/casemanagement/overview.mako')
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def printAll(self, id):
+        id = self._checkInt(id)
+        case = self._loadCase(id)
+        formular = []
+        c.print_version = 1 
+        for ti in self.navigation.getAllItems():
+            content, navigation = self._getRenderdFormElements(ti, id, ro_mode=True)
+            formular.append("""<h1 class="print_new_page">%s</h1>""" % ti.description)
+            formular.append(content)
+        c.formular = "<br>".join(formular)
+        return render('/casemanagement/formular.mako')
+
         c.notification_for = PRINTALL_NOTIFICATION 
         c.notification_text = PRINTALL_NOTIFICATION_TEXT 
         c.url_ok = h.url_for(action="digest")
-        c.form_navigation = self._getFormNavigation(id, mode=session['case_modus'])
+        c.form_navigation = self._getFormNavigation()
         return render('/casemanagement/dialogs/notificate_printall.mako')
 
+    @checkRole('cm_ka')
     def new(self):
-        session['case_last_name'] = "" 
-        session['case_first_name'] = "" 
-        session['case_address'] = "" 
-        session['case_plz'] = "" 
-        session['case_city'] = "" 
-        session['case_nr'] = "" 
+        session_case = SessionCase()
+        session['case'] = session_case
         session.save()
-        redirect_to(h.url_for(action="new2"))
+        redirect_to('new2')
 
+    @checkRole('cm_ka')
     def new2(self):
+        c.case = session.get('case')
         return render('/casemanagement/new.mako')
 
-    def newAction(self, id):
-        # TODO: Checked routes why 
-        #def newAction(self, confirmed=False): Does not work
-        if id: # Create emtpy case (no signed statement)
-            dsf = DSFactory()
-            ds = dsf.createDataset()
-            return self.overview()
-
+    @checkRole('cm_ka')
+    def newAction(self):
+        # TODO: Use htmlfill here!
         try:
-            session['case_last_name'] = request.params.getone("name_1")
-            session['case_first_name'] = request.params.getone("vorname_1")
-            session['case_address'] = request.params.getone("strasse")
-            session['case_plz'] = request.params.getone("plz")
-            session['case_city'] = request.params.getone("wohnort")
-            session.save()
+            session_case = session['case']
         except KeyError:
-            pass
+            session_case = SessionCase()
 
+        session_case.setData(request.params)
+        session.save()
+
+        # Do we want to print the statement?
         if request.params.has_key('print'):
             c.print_version = 1
             statement = PrivacyStatement()
             agency = Agency()
-            dummy = TempDigest(request.params)
-            c.content = statement.fillout(dummy, agency) 
+            c.content = statement.fillout(session_case, agency) 
             return render('statement/default_statement.mako')
 
+        # Or do we want to store the new case?
         elif request.params.has_key('save'):
-            # TODO: Because of a change in the workflow we always want to
-            # create a new case, regardless if there is a signed statement or
-            # not. Change to following line to reactivate old behavoir
+            validator = NewCaseForm()
+            try:
+                form_result = validator.to_python(request.params)
+                # 1. Create a new case
+                factory = CaseFactory()
+                case = factory.createNew()
+                statement = case.getPrivacyStatement()
 
-            #if request.params.has_key('statement_signed'):
-            if True:
-                validator = NewCaseForm()
-                try:
-                    form_result = validator.to_python(request.params)
-                    dsf = DSFactory()
-                    ds = dsf.createDataset()
-                    ds.initData()
-                    # Prepare params so that _save will eat them an gets all needed
-                    # values
-                    new_params = request.params.dict_of_lists()
-                    new_params['ds'] = [ds.id]
-                    # Does the new case has a signed statement?
-                    if request.params.has_key('statement_signed'):
-                        statement = PrivacyStatement(ds.id)
-                        statement.sign()
+                # 2. Do we want to sign the statement?
+                if form_result.has_key('statement_signed'):
+                    statement.sign()
 
-                    self.__save("page_1", new_params, {})
-                    self.__init_case(ds.id)
-                except formencode.Invalid, error:
-                    c.form_result = error.value
-                    c.form_errors = error.error_dict or {}
-                    return render('/casemanagement/new.mako')
+                self.__init_case(case.id)
+                # 3. Get Page from case and store the data 
+                # TODO: Enable this is the future
 
-                if c.digest.hasSignedPrivacyStatement():
-                    return self.edit(str(ds.id), '0')
-                else:
-                    # Render Nagscreen to inform the user that he is about to open a
-                    # case which does not have a signed statement
-                    return render('statement/dialogs/missing_statement.mako')
+                document = g.formedTree
+                page = document.getPageStore("page_1")
+                page.setId(case.id)
 
-            else:
-                c.context = "../main.mako" 
-                c.alert_for = u'Keine Einverst&auml;ndniserkl&auml;rung vorhanden'
-                c.question = u"""Sie sind im Begriff, eine Fallakte ohne vorliegende Einverst&auml;ndniserkl&auml;rung des Jugendlichen zu erstellen. Dies bedeutet, dass <strong>keine personenbezogenen Daten gespeichert </strong>werden k&ouml;nnen.<br>
-                Es wird lediglich festgehalten, dass ein Erstgespr&auml;ch stattgefunden hat. Eine weitere Speicherung der Daten ist nicht m&ouml;glich!
-                <p>Wenn Sie wirklich eine solche Fallakte anlegen wollen, dann best&auml;tigen Sie bitte mit <strong>OK</strong><br>Um wieder auf die Einverst&auml;ndniserkl&auml;rungsseite zu gelangen klicken Sie auf <strong>Abbrechen</strong>"""
+                new_errors = page.save(
+                    request.params.dict_of_lists(),
+                    {}, document)
 
-                c.url_ok = "/case/newAction/1/"
-                c.url_cancel  = "/case/new2/"
-                return render('/casemanagement/dialogs/alert.mako')
+                session_case.setFormErrors(new_errors)
+                session.save()
 
-    def editToggle(self, ds_id, page_id):
-        ti = self.navigation.getTreeItem(page_id)
-        c.ds_id = ti.realId(ds_id)
-        c.page_id = page_id
-        c.show_form_actions = True
-        c.print_form = "show" # Which page to open in popup on printing?           
-        ti.toggle()
-        session.save()
-        c.form_navigation = self._getFormNavigation(
-            ds_id,
-            mode="edit",
-            selected_key=ti.key)
-        if not c.form_navigation:
-            return "404"
-        # Determine if we have an repeat group or a formular page
-        what = ti.page.startswith("rg_") and "rg_aid_overview" or "formular"
-        if what == "rg_aid_overview":
-            c.rg_list = DataSetAidList(ds_id)
-        else:
-            formdata = self._getFormdata(ti, ds_id)
-            vr = ViewRenderer(formdata, ro_mode=False)
-            c.formular = vr.renderView(
-                #ti.page, 
-                ti.key, 
-                ds_id, 
-                "/case/save",
-                showNext = not ti.nextKey() is None)
-        return render('/casemanagement/%s.mako' % what)
+                # Prepare params so that _save will eat them an gets all needed
+                # values
+                new_params = request.params.dict_of_lists()
+                new_params['ds'] = [case.id]
 
-    def showToggle(self, ds_id, page_id):
-        ti = self.navigation.getTreeItem(page_id)
-        c.ds_id = ti.realId(ds_id)
-        c.page_id = page_id
-        c.show_form_actions = True
-        c.print_form = "show" # Which page to open in popup on printing?           
-        ti.toggle()
-        session.save()
-        c.form_navigation = self._getFormNavigation(
-            ds_id, 
-            mode="show",
-            selected_key=ti.key)
-        if not c.form_navigation:
-            return "404"
-        # Determine if we have an repeat group or a formular page
-        what = ti.page.startswith("rg_") and "rg_aid_overview" or "formular"
-        if what == "rg_aid_overview":
-            c.rg_list = DataSetAidList(ds_id)
-        else:
-            formdata = self._getFormdata(ti, ds_id)
-            vr = ViewRenderer(formdata)
-            c.formular = vr.renderView(
-                #ti.page,
-                ti.key,
-                ds_id,
-                "/case/save",
-                showNext = not ti.nextKey() is None)
-        return render('/casemanagement/%s.mako' % what)
+            except formencode.Invalid, error:
+                c.form_result = error.value
+                c.form_errors = error.error_dict or {}
+                return render('/casemanagement/new.mako')
 
+            if statement.isSigned():
+                return self.edit(str(case.id), '0')
+            else:
+                # Render Nagscreen to inform the user that he is about to open a
+                # case which does not have a signed statement
+                c.ds_id = case.id
+                return render('statement/dialogs/missing_statement.mako')
+
+    @checkRole('cm_ka')
     def edit(self, ds_id, page_id):
-        session["case_modus"] = "edit"
+        ds_id        = self._checkInt(ds_id)
+        page_id      = self._checkInt(page_id)
+        ti           = self.navigation.getTreeItem(page_id)
+        c.ds_id      = ds_id
+        real_id      = ti.realId(ds_id)
+        # TODO: Move repieatgroup handling in an own controller
+        #factory     = CaseFactory()
+        #c.case      = factory.loadById(ds_id)
+        case_session = session.get('case')
+        case_session.setPageId(page_id)
+        case_session.setMode("edit")
+        case_session.setPageId(page_id)
         session.save()
-        ti = self.navigation.getTreeItem(page_id)
-        c.ds_id = ti.realId(ds_id)
+
         c.page_id = page_id
-        c.show_form_actions = True
         c.print_form = "show" # Which page to open in popup on printing?           
+        content, navigation = self._getRenderdFormElements(ti, ds_id, page_id, ro_mode=False)
+        c.formular = content
+        c.form_navigation = navigation 
+        return render('/casemanagement/formular.mako')
+
         # Determine if we have an repeat group or a formular page
-        what = ti.page.startswith("rg_") and "rg_aid_overview" or "formular"
-        if what == "rg_aid_overview":
-            c.form_navigation = self._getFormNavigation(
-                ds_id, 
-                mode="edit",
-                selected_key="14")
-            c.rg_list = DataSetAidList(ds_id)
-        else:
-            c.form_navigation = self._getFormNavigation(
-                ds_id, 
-                mode="edit",
-                selected_key=ti.key)
-            formdata = self._getFormdata(ti, ds_id)
-            vr = ViewRenderer(formdata, ro_mode=False)
-            c.formular = vr.renderView(
-                ti.key, 
-                ds_id,  
-                "/case/save", 
-                showNext = not ti.nextKey() is None)
-        return render('/casemanagement/%s.mako' % what)
+        #what = int(ti.key) == 14 and "rg_aid_overview" or "formular"
+        #if what == "rg_aid_overview":
+        #    c.form_navigation = self._getFormNavigation(selected_key="14")
+        #    c.rg_list = AidList(ds_id)
+        #else:
+        #    c.form_navigation = self._getFormNavigation(selected_key=ti.key)
+        #    formdata = self._getFormdata(ti, real_id)
+        #    vr = ViewRenderer(formdata, ro_mode=False)
+        #    c.formular = vr.renderView(
+        #        ti.key, 
+        #        ds_id,  
+        #        "/case/save", 
+        #        showNext = not ti.nextKey() is None)
+        #return render('/casemanagement/%s.mako' % what)
 
-
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def show(self, ds_id, page_id):
-        session["case_modus"] = "show"
-        session.save()
-        ti = self.navigation.getTreeItem(page_id)
-        c.ds_id = ti.realId(ds_id)
-        c.page_id = page_id
-        c.show_form_actions = True
+        ds_id        = self._checkInt(ds_id)
+        page_id      = self._checkInt(page_id)
+        ti           = self.navigation.getTreeItem(page_id)
+        c.ds_id      = ds_id
+        real_id      = ti.realId(ds_id)
+        c.page_id    = page_id
         c.print_form = "show" # Which page to open in popup on printing?           
-        # Determine if we have an repeat group or a formular page
-        what = ti.page.startswith("rg_") and "rg_aid_overview" or "formular"
-        if what == "rg_aid_overview":
-            c.form_navigation = self._getFormNavigation(
-                ds_id, 
-                mode="show",
-                selected_key="14")
-            c.rg_list = DataSetAidList(ds_id)
-        else:
-            c.form_navigation = self._getFormNavigation(
-                ds_id, 
-                mode="show",
-                selected_key=ti.key)
-            formdata = self._getFormdata(ti, ds_id)
-            vr = ViewRenderer(formdata)
-            c.formular = vr.renderView(
-                #ti.page, 
-                ti.key, 
-                ds_id,  
-                "/case/save", 
-                showNext = not ti.nextKey() is None)
-        return render('/casemanagement/%s.mako' % what)
+        case_session = session.get('case')
+        case_session.setPageId(page_id)
+        case_session.setMode("show")
+        session.save()
+        content, navigation = self._getRenderdFormElements(ti, ds_id, page_id, ro_mode=True)
+        c.formular = content
+        c.form_navigation = navigation 
+        return render('/casemanagement/formular.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def showHelp(self, help_id):
-        c.helpdata = unicode(g.helpData.getHelp(help_id), 'utf-8')
+        c.helpdata  = unicode(g.helpData.getHelp(help_id), 'utf-8')
         return render('/casemanagement/help.mako')
 
-    def _getFormNavigation(self, ds_id, mode=None, selected_key=None):
-        # TODO:
-        # 1. Get rid of session var. Problem: We do not differ anymore between
-        # case datasets and rg datasets. This results in rendering an broken
-        # navigation. 
-
-        # Set errors for navigation
-        errors = session.get('case_errors', {})
-        self.navigation.setErrors([err.page for err in errors.itervalues()])
-        return self.navigation.render(
-            lambda t: '/case/%sToggle/%s/%s' % (
-                mode, session.get('case_id'), t.key),
-            selected_key)
-
-    def _getFormdata(self, treeItem, ds_id):
-        db_view = "%s_view" % treeItem.page 
-        doc = g.formedTree
-        help = g.helpData
-        nc = doc.findByClassAndName(PageNode, treeItem.page)
-        widgets = nc.allWidgets()
-        widgets_names = [w.getName() for w in widgets]
-        page = DataPage(db_view, widgets_names, ds_id)
-        form_errors = session.get('case_errors', {})
-        formdata = FormDataImpl(help=help, page=page, errors=form_errors, nc=[nc])
-        return formdata
-
+    @checkRole('cm_ka')
     def save(self):
+        case_session = session.get('case')
         try:
             ti = self.navigation.getTreeItem(request.params["page"])
         except:
             ti = None
 
         if ti is None:
-            redirect_to(action='overview')
+            redirect_to(controller="/case_overview")
 
         #ti = self.navigation.getTreeItemByPageName(request.params["page"])
         # If we edit page_1 we better update the infofield because the names
         # may have been edited 
         if ti.page == "page_1":
             try:
-                session['case_last_name'] = request.params.getone("name_1")
-                session['case_first_name'] = request.params.getone("vorname_1")
+                case_session.last_name = request.params.getone("name_1")
+                case_session.first_name = request.params.getone("vorname_1")
                 session.save()
             except KeyError:
                 print >> sys.stderr, "Error! Could not update Infofield"
 
         elif ti.page == "page_0":
             try:
-                session['case_nr'] = request.params.getone("kundennummer")
+                case_session.knr = request.params.getone("kundennummer")
                 session.save()
             except KeyError:
                 print >> sys.stderr, "Error! Could not update Infofield"
         # Get old formerrors, save data and store new formdata
-        old_errors = session.get('case_errors', {})
-        new_errors = self.__save(ti.page, request.params.dict_of_lists(), old_errors)
-        session['case_errors'] = new_errors
-        session.save()
+        old_errors = case_session.getFormErrors()
         ds_id = request.params["ds"]
+        new_errors = self.__save(ti.page, request.params.dict_of_lists(), old_errors, ti.realId(ds_id))
+        case_session.setFormErrors(new_errors)
+        session.save()
 
         if request.params.get('__formular_next'):
 
             # XXX: This ultra ugly!
-            if ti.key.endswith("rg"):
+            if int(ti.key) in [27,28,29,30]:
                 try:
-                    nds = int(session['case_id'])
+                    nds = int(case_session.id)
                 except:
                     print >> sys.stderr, "Case id not found"
                     nds = None
                 if not nds is None:
                     ti.showPath()
-                    c.ds_id   = ti.realId(int(nds))
-                    c.page_id = "14"
-                    c.rg_list = DataSetAidList(nds)
-                    c.form_navigation = self._getFormNavigation(
-                        nds,
-                        mode="edit",
-                        selected_key=ti.key)
-                    return render('/casemanagement/rg_aid_overview.mako')
+                    ds_id   = ti.realId(int(nds))
+                    page_id = "14"
+                    return self.edit(ds_id, page_id) 
 
             nkey = ti.nextKey()
             if not nkey is None:
@@ -442,274 +324,71 @@
                 if not nti is None:
                     ti = nti
                     ti.showPath()
-        return self.edit(str(ti.realId(ds_id)), ti.key) 
+        return self.edit(ds_id, ti.key) 
 
-    def __save(self, pageName, params, old_errors):
+    def __save(self, pageName, params, old_errors, ds_id):
 
-        try:
-            ds_id = params["ds"][0]
-        except KeyError:
-            print >> sys.stderr, "No page name given or no case id given"
-            return old_errors
-
+        # fetch dataset if valid
         document = g.formedTree
+        page = document.getPageStore(pageName)
+        page.setId(ds_id)
+        return page.save(params, old_errors, document)
 
-        # fetch dataset if valid
-        db_view = "%s_view" % pageName 
-        try:
-            nc = document.findByClassAndName(PageNode, pageName)
-            nwidgets = nc.allWidgets()
-            widgets_names = [w.getName() for w in nwidgets]
-            dbPage = DataPage(db_view, widgets_names, ds_id)
-        except:
-            print >> sys.stderr, "Could not load datapage"
-            return "Could not load datapage"
-
-        # widgets on current page
-        widgets = dict([
-            (widget.getName(), widget) for widget in nwidgets if widget.getName()])
-
-        # empty parameters will nullify values
-        delete_vars = []
-
-        # for updating the errors
-        #old_errors = session.setdefault("$ERRORS", {})
-        # Note: old_errors is now passed as argument
-
-        # vars that passed lexical and syntactic check
-        to_be_set = {}
-
-        for k, v in params.iteritems():
-            if k.startswith("__"):
-                continue
-            try:
-                value = v[0]
-                widget = widgets.pop(k)
-                #print "widget: %s"  % repr(widget)
-                if value == "": # no value -> delete it
-                    delete_vars.append(k)
-                else:
-                    # Hopefully this one causes no trouble any more
-                    old_errors.pop(k, None)
-                    # the empty array is for the rules
-                    to_be_set[k] = (checkAndConvert(widget, value), [])
-            except SematicError, inst:
-                ei = ErrorItem(pageName, value, widget.getDescription())
-                ei.addMessage(inst.value)
-                # overwrite old errors
-                old_errors[k] = ei
-            except KeyError, inst:
-                pass
-
-        # flag to indicate if we should flush the page
-        dirty = False
-
-        # remove variable from dataset which are set to ""
-        for wname in list(widgets.iterkeys()) + delete_vars:
-            dbPage.setData(wname, None)
-            dirty = True
-            # an unset value causes no problems.
-            old_errors.pop(wname, None)
-
-        # find all rules that depend on variables to be set.
-        # build up a lookup var-name -> list of rules
-        for r in document.findAllByClass(RuleLeaf):
-            expr = r.getExpr()
-            if not expr: continue
-            for var in expr.getDependencies():
-                try:
-                    to_be_set[var][1].append(r)
-                except KeyError:
-                    pass
-
-        # set vars into db page and check rules.
-        for k, tup in to_be_set.iteritems():
-            v, rules = tup[0], tup[1]
-            hasNoProblems = True
-            for rule in rules:
-                vars = {}
-                isNull = False # only process rule if all values are not null
-                for dependency in rule.getExpr().getDependencies():
-                    if dependency == k: # ignore because this comes from the web
-                        continue
-                    # XXX: Normally they are distributed over all kind of pages.
-                    value = ds.getValue(dependency)
-                    if value is None: isNull = True; break
-                    vars[dependency] = value
-                if isNull:
-                    continue
-                expr = rule.getExpr()
-                # Now evaluate the rule to see if its violated
-                try:
-                    vars[k] = v # test it with new value from web
-                    isOkay = expr.evaluate(vars)
-                except:
-                    print_exc()
-                    isOkay = False
-                if not isOkay:
-                    hasNoProblems = False
-                    ie = old_errors.get(k, None)
-                    if ie is None:
-                        ie = ErrorItem(pageName, v)
-                        old_errors[k] = ie
-                    msg = rule.getValue()
-                    if msg: ie.addMessage(msg)
-                    else:   ie.addMessage("There is a problem with '%s'." % k)
-            if hasNoProblems: # No new errors -> set it
-                dbPage.setData(k, v)
-                dirty = True
-                # TODO: Solve transitive problems!
-                # e.g. A was set. B contradicts A. That prevents B from
-                # being set. -> B is marked was wrong input.
-                # Now A is set to a value that does not contradicts B
-                # any more. Therefore B is not an error input any more.
-                # -> B can be applied. This scheme has to be applied 
-                # recursively along the dependencies.
-                old_errors.pop(k, None)
-
-        if dirty: # flush the db page
-            dbPage.store()
-        return old_errors
-
-    def newAidAction(self):
-        try:
-            case_id = request.params.getone('case_id')
-            page_id = request.params.getone('page_id')
-            aid_type = request.params.getone('aid_type')
-            aid = DataSetAidObject(aid_type)
-            ds_id = aid.create(int(case_id))
-            #print >> sys.stderr, "aid:%s, %s, %s" % (aid, ds_id, aid.page_id) 
-            if ds_id and aid.page_id:
-                return self.edit(str(ds_id), aid.page_id)
-            else:
-                return "Error. Could not create new Aid"
-        except KeyError:
-            pass
-
-    def deleteAid(self, ds_id, ds_type, confirmed=False):
-        if confirmed == '1':
-            aid = DataSetAidObject(ds_type, ds_id)
-            if aid.delete():
-                return self.show(session.get('case_id'), '14') # 14 should be the overview page
-            # TODO: Create Errorpage
-            return "Error! Could not delete ds."
-        else:
-            c.context = "../main.mako" 
-            c.confirm_for = 'L&ouml;schen Unterst&uuml;tzungsangebot'
-            c.question = 'Wollen Sie wirklich das Angebot l&ouml;schen und die Daten unwiederbringlich verlieren?' 
-            c.url_yes = "/case/deleteAid/%s/%s/1" % (ds_id, ds_type) 
-            c.url_no  = "/case/show/%s/14" % session.get('case_id')
-            return render('/casemanagement/dialogs/confirm.mako')
-        
-            
-        
+    @checkRole('cm_ka')
     def importCase(self):
         return render('/casemanagement/upload.mako')
 
-    def __fetchKundennummerFromPDF(self, tbls):
-        for n, rels, sep in tbls:
-            for rel in rels:
-                try:
-                    return rel.getColumn(u"kundennummer")
-                except KeyError:
-                    pass
-        
-        return None
-
+    @checkRole('cm_ka')
     def importAction(self):
-
-        # XXX: We are loading it all into memory. This is bad -> DoS
-        buf = StringIO.StringIO()
-
+        factory = CaseFactory()
         try:
-            myfile = request.POST['pdffile']
-            shutil.copyfileobj(myfile.file, buf)
-        except:
-            return self.importCase()
-
-        myfile.file.close()
-        b = buf.getvalue()
-        buf.close()
-        try:
-            fe = FieldExtractor(g.formedTree)
-
-            xfa = None
-            try:
-                xfa = asXFA(b)
-                print >> sys.stderr, "XFA fetched"
-                fe.extractFields(xfa)
-            finally:
-                if xfa:
-                    xfa.unlink()
-                    xfa = None
-
-            tbls = fe.requiredTables()
-
-            knummer = self.__fetchKundennummerFromPDF(tbls)
-            if not knummer is None:
-                in_db = caseExists(knummer)
-                if in_db:
-                    c.notification_for  = PDF_DUB_NOTIFICATION 
-                    c.notification_text = PDF_DUB_NOTIFICATION_TEXT % knummer
-                    c.url_ok = "/case/importCase"
-                    return render('/casemanagement/dialogs/notificate_import_dub.mako')
-
-            ds_id = createTables(tbls)
-            #c.messages = fe.allMessages()
-        except:
+            pdf = request.POST['pdffile']
+            case = factory.importPdf(pdf)
+            pdf.file.close()
+        except ImportCaseExistsError, err:
             c.notification_for  = PDF_DUB_NOTIFICATION 
-            c.notification_text = PDF_IMPORT_FAILED_NOTIFICATION_TEXT
+            c.notification_text = PDF_DUB_NOTIFICATION_TEXT % err.value 
             c.url_ok = "/case/importCase"
             return render('/casemanagement/dialogs/notificate_import_dub.mako')
+        except StandardError, err:
+            return self.importCase()
+        return self.select(str(case.id), "0")
 
-        return self.select(str(ds_id), "0")
-
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def export(self):
         return render('/casemanagement/export.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def createExportScheme(self):
         return render('casemanagement/create_export_scheme.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def evaluate(self):
         return render('casemanagement/evaluation.mako')
 
-    def bundle(self):
-        action = request.params.getone('action')
-        if action == 'delete':
-            pass
-        elif action == 'export':
-            return self.export() 
-        elif action == 'evaluate':
-            return self.evaluate() 
-        elif action == 'stand-in':
-            pass
-        elif action == 'transfer':
-            pass
-        else:
-            return render('/casemanagement/overview.mako')
-
+    @checkRole(('admin_ka', 'cm_ka'))
     def organisation(self, id):
-        list = UserListObject()
-        c.case = Dataset(id)
-        c.standin_list = c.case.getStandin()
+        id        = self._checkInt(id)
+        list      = UserListObject()
+        c.case    = self._loadCase(id)
+        c.standin = c.case.getStandin()
+        c.editor  = UserObject(c.case.getEditor())
         c.current_user = session['USER_AUTHORIZED']
-        c.editor = UserObject(c.case.getEditor())
         # Get available users for standin. filter out admins and the current
         # user
         filter = [u.id for u in list.getAdminList()]
         filter.append(c.current_user.id)
         c.user_list = list.getUserList(filter) 
         c.ds_id = id
-        c.form_navigation = self._getFormNavigation(
-            id, 
-            mode=session.get('case_modus'))
+        c.form_navigation = self._getFormNavigation()
         return render('/casemanagement/organisation.mako')
 
+    @checkRole('admin_ka')
     def setEditorAction(self):
         validator = SetEditorForm()
         try:
             form_result = validator.to_python(request.params)
-            case = Dataset(form_result.get('case_id'))
+            case = self._loadCase(form_result.get('case_id'))
             case.setEditor(form_result.get('editor'))
             return self.organisation(form_result.get('case_id'))
         except formencode.Invalid, error:
@@ -717,59 +396,66 @@
             c.form_errors = error.error_dict or {}
             return render('/casemanagement/organisation.mako')
 
+    @checkRole(('admin_ka', 'cm_ka'))
     def setStandinAction(self):
         validator = SetStandinForm()
         data = formencode.variabledecode.variable_decode(request.params)
         try:
             form_result = validator.to_python(data)
-            case = Dataset(form_result.get('case_id'))
-            case.setStandin(form_result.get('standin'))
+            case = self._loadCase(form_result.get('case_id'))
+            standin = case.getStandin()
+            standin.setUser(form_result.get('standin'))
             return self.organisation(form_result.get('case_id'))
         except formencode.Invalid, error:
             c.form_result = error.value
             c.form_errors = error.error_dict or {}
             return render('/casemanagement/organisation.mako')
 
-
+    @checkRole(('admin_ka', 'cm_ka'))
     def appointments(self, id):
-        c.ds_id = id
-        c.form_navigation = self._getFormNavigation(
-            id, 
-            mode=session.get('case_modus'))
+        id                = self._checkInt(id)
+        case              = self._loadCase(id)
+        c.ds_id           = id
+        c.form_navigation = self._getFormNavigation()
         return render('/casemanagement/appointments.mako')
 
-    def newAppointment(self):
-        c.ds_id = id
-        c.form_navigation = self._getFormNavigation(
-            id, 
-            mode=session.get('case_modus'))
+    @checkRole('cm_ka')
+    def newAppointment(self, id):
+        id                = self._checkInt(id)
+        case              = self._loadCase(id)
+        c.ds_id           = id
+        c.form_navigation = self._getFormNavigation()
         return render('/casemanagement/new_appointment.mako')
 
+    @checkRole(('admin_ka', 'cm_ka'))
     def documents(self, id):
+        id = self._checkInt(id)
         try:
             c.ds_id = id
-            c.form_navigation = self._getFormNavigation(
-                id, 
-                mode=session.get('case_modus'))
-            id = int(id)
-            c.files = listDocuments(id)
+            case = self._loadCase(id)
+            c.form_navigation = self._getFormNavigation()
+            c.files = case.getDocuments()
         except:
             return render('/tests/trace.mako')
         return render('/documents/case_overview.mako')
 
+    @checkRole('cm_ka')
     def newDocument(self, id):
-        c.ds_id = id
-        c.form_navigation = self._getFormNavigation(
-            id, 
-            mode=session.get('case_modus'))
+        id                = self._checkInt(id)
+        case              = self._loadCase(id)
+        c.ds_id           = id
+        c.form_navigation = self._getFormNavigation()
         return render('/documents/case_new.mako')
 
+    @checkRole('admin_ka')
     def delete(self, id, confirmed):
-        c.ds_id = id
+        id        = self._checkInt(id)
+        confirmed = self._checkBool(confirmed)
+        c.ds_id   = id
         if confirmed == '1':
-            ds = Dataset(id)
-            if ds.delete():
-                return self.overview()
+            case = self._loadCase(id)
+            if case.delete():
+                redirect_to(controller="/case_overview")
             # TODO: Create Errorpage
             return "Error! Could not delete ds."
         else:
@@ -777,5 +463,7 @@
             c.confirm_for = 'L&ouml;schen Fallakte'
             c.question = 'Wollen Sie wirklich die Fallakte l&ouml;schen und die Daten unwiederbringlich verlieren?' 
             c.url_yes = "/case/delete/%s/1" % id
-            c.url_no  = "/case/overview/"
+            c.url_no  = "/case_overview/"
             return render('/casemanagement/dialogs/confirm.mako')
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Added: trunk/waskaweb/controllers/case_overview.py
===================================================================
--- trunk/waskaweb/controllers/case_overview.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/case_overview.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,218 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+#
+
+import logging
+import formencode
+from paste.httpexceptions                   import HTTPNotFound
+
+from waskaweb.lib.base                      import *
+from waskaweb.lib.validators                import SearchCaseForm, BundleActionForm, SetBundleEditorForm, SetBundleStandinForm
+from waskaweb.lib.security                  import checkRole
+from waskaweb.model.case                    import CaseOverview, CaseBundle 
+from waskaweb.model.user                    import UserListObject, UserObject 
+from waskaweb.controllers.CaseBase          import CasebaseController 
+
+log = logging.getLogger(__name__)
+
+DIALOG_EMPTY_SELECTION = u'''Keine Fallakten ausgewählt'''
+DIALOG_EMPTY_SELECTION_EXPLAINATION = u'''Sie haben keine Fallakten ausgewählt für die Sie die gewählte Aktion ausführen können. Bitte klicken Sie auf "OK" um zur Fallaktenübersicht zu gelangen und dort Fallakten auszuwählen'''
+DIALOG_CONFIRM_EXPLAINATION = u'''Wollen Sie wirklich die folgenden Fallakten löschen?%s'''
+DIALOG_CONFIRM_DELETE = u'''Fallakten löschen'''
+DIALOG_CONFIRM_EXPLAINATION = u'''Wollen Sie wirklich die folgenden Fallakten löschen?%s'''
+
+DIALOG_CONFIRM_SETEDITOR = u"""Fallakten übertragen"""
+SETEDITOR_NOTIFICATION_SUCCSESS = u"""Es wurden %s Fallakten erfolgreich an <strong>%s %s</strong> übertragen. Klicken Sie auf 'OK' um zur Fallaktenübersicht zu gelangen."""
+SETEDITOR_NOTIFICATION_ERROR = u"""Bei dem Übertragen der Fallakten ist eine Fehler aufgetreten. Klicken Sie auf 'OK' um zur Fallaktenübersicht zu gelangen."""
+
+DIALOG_CONFIRM_SETSTANDIN = u"""Vertretung zuweisen"""
+SETSTANDIN_NOTIFICATION_SUCCSESS = u"""Es wurde für %s Fallakten erfolgreich die Vertretung gesetzt. Klicken Sie auf 'OK' um zur Fallaktenübersicht zu gelangen."""
+SETSTANDIN_NOTIFICATION_ERROR = u"""Bei dem Zuweisen der Vertretung für die Fallakten ist ein Fehler aufgetreten. Klicken Sie auf 'OK' um zur Fallaktenübersicht zu gelangen."""
+
+DELETE_NOTIFICATION_SUCCSESS = u'''Es wurden %s Fallakten erfolgreich gelöscht. Klicken Sie auf 'OK' um zur Fallaktenübersicht zu gelangen.''' 
+DELETE_NOTIFICATION_ERROR = u'''Bei dem Löschen der Fallakten ist ein Fehler aufgetreten. Klicken Sie auf 'OK' um zur Fallaktenübersicht zu gelangen.''' 
+DELETE_NOTIFICATION_EMPTYLIST = u'''Keine Fälle''' 
+
+class CaseOverviewController(CasebaseController):
+
+    def __before__(self):
+        CasebaseController.__before__(self)
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def index(self):
+        return self.overview()
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def overview(self):
+        c.cases = CaseOverview()
+        c.cases.search()
+        c.cases.sortByLastname()
+        return render('/casemanagement/overview.mako')
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def search(self):
+        validator = SearchCaseForm()
+        try:
+            form_result = validator.to_python(request.params)
+            c.cases = CaseOverview()
+            if form_result.get('show_own') == '1':
+                user = session['USER_AUTHORIZED']
+                c.cases.search('bearbeiter:%s' % user.id)
+            else:
+                c.cases.search(form_result.get('search_str'))
+            c.cases.sortByLastname()
+        except formencode.Invalid, error:
+            c.form_result = error.value
+            c.form_errors = error.error_dict or {}
+            c.cases = CaseOverview()
+            c.cases.search()
+            return render('/casemanagement/overview.mako')
+        return render('/casemanagement/overview.mako')
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def bundleAction(self):
+        validator = BundleActionForm()
+        c.context           = "../main.mako" 
+        c.url_ok            = "/case_overview"
+        c.notification_for  = DIALOG_EMPTY_SELECTION    
+        c.notification_text = DIALOG_EMPTY_SELECTION_EXPLAINATION 
+        try:
+            data        = formencode.variabledecode.variable_decode(request.params)
+            form_result = validator.to_python(data)
+            action      = form_result.get('action') 
+            case_bundle = CaseBundle(form_result.get('case_id', []))
+
+            if action == 'no_action':
+                return self.overview() 
+            if case_bundle.isEmpty():
+                return render('/casemanagement/dialogs/bundle_noselection.mako')
+
+            session['casebundle'] = case_bundle
+            session.save()
+
+            list   = UserListObject()
+            c.current_user = session['USER_AUTHORIZED']
+            filter = [u.id for u in list.getAdminList()]
+            filter.append(c.current_user.id)
+            c.user_list = list.getUserList(filter)
+            c.case_list = case_bundle.getCases()
+            if action == 'delete':
+                return self.delete(0)
+            elif action == 'stand-in':
+                # filter out cases where the user is not the editor and
+                # therefor is not allowed to set the standin
+                filtered = []
+                for case in c.case_list:
+                    if case.getEditor() == c.current_user.id or c.current_user.isAdmin():
+                        filtered.append(case.id)
+                session['casebundle'] = CaseBundle(filtered)
+                session.save()
+                return render('/casemanagement/bundle_standin.mako')
+            elif action == 'transfer':
+                return render('/casemanagement/bundle_editor.mako')
+            elif action == 'export':
+                return u"Exportieren"
+            elif action == 'evaluate':
+                return u"Auswerten"
+            else:
+                raise HTTPNotFound()
+
+        except formencode.Invalid, error:
+            c.form_result = error.value
+            c.form_errors = error.error_dict or {}
+            form = render('/casemanagement/overview.mako')
+            return htmlfill.render(unicode(form, 'utf-8'), c.form_result, c.form_errors, auto_insert_errors=False)
+        return render('/casemanagement/overview.mako')
+
+    def _buildCaseList(self, bundle):
+        list = ["<ul>"]
+        for case in bundle.getCases():
+            list.append("<li>%s, %s</li>" % (case.first_name, case.last_name))
+        list.append("</ul>")
+        return list
+
+    @checkRole(('admin_ka'))
+    def setEditorAction(self):
+        c.context           = "../main.mako" 
+        c.url_ok            = "/case_overview"
+        c.notification_for  = DIALOG_CONFIRM_SETEDITOR 
+        case_bundle         = session.get('casebundle')
+        validator           = SetBundleEditorForm()
+        try:
+            form_result = validator.to_python(request.params)
+            if case_bundle and not case_bundle.isEmpty():
+                try:
+                    num = case_bundle.setEditor(form_result.get('editor'))
+                    user = UserObject(form_result.get('editor'))
+                    c.notification_text = SETEDITOR_NOTIFICATION_SUCCSESS % (str(num), user.first_name, user.last_name)
+                except StandardError, err:
+                    print err
+                    c.notification_text = SETEDITOR_NOTIFICATION_ERROR
+                del session['casebundle']
+            else:
+                c.notification_text = DELETE_NOTIFICATION_EMPTYLIST
+                return render('/casemanagement/dialogs/bundle_noselection.mako')
+        except formencode.Invalid, error:
+            c.form_result = error.value
+            c.form_errors = error.error_dict or {}
+            return render('/casemanagement/bundle_editor.mako')
+        return render('/casemanagement/dialogs/notificate_bundle_seteditor.mako')
+
+    @checkRole(('admin_ka', 'cm_ka'))
+    def setStandinAction(self):
+        c.context           = "../main.mako" 
+        c.url_ok            = "/case_overview"
+        c.notification_for  = DIALOG_CONFIRM_SETSTANDIN 
+        case_bundle         = session.get('casebundle')
+        validator           = SetBundleStandinForm()
+        try:
+            data = formencode.variabledecode.variable_decode(request.params)
+            form_result = validator.to_python(data)
+            if case_bundle and not case_bundle.isEmpty():
+                try:
+                    num = case_bundle.setStandin(form_result.get('standin'))
+                    c.notification_text = SETSTANDIN_NOTIFICATION_SUCCSESS % str(num)
+                except StandardError, err:
+                    print err
+                    c.notification_text = SETSTANDIN_NOTIFICATION_ERROR
+                del session['casebundle']
+            else:
+                c.notification_text = DELETE_NOTIFICATION_EMPTYLIST
+                return render('/casemanagement/dialogs/bundle_noselection.mako')
+        except formencode.Invalid, error:
+            c.form_result = error.value
+            c.form_errors = error.error_dict or {}
+            return render('/casemanagement/bundle_standin.mako')
+        return render('/casemanagement/dialogs/notificate_bundle_setstandin.mako')
+
+    @checkRole(('admin_ka'))
+    def delete(self, confirmed):
+        confirmed           = self._checkBool(confirmed)
+        c.context           = "../main.mako" 
+        c.url_ok            = "/case_overview"
+        c.notification_for  = DIALOG_CONFIRM_DELETE 
+        case_bundle         = session.get('casebundle')
+        if case_bundle and not case_bundle.isEmpty():
+            if confirmed == 1:
+                try:
+                    num = case_bundle.delete()
+                    c.notification_text = DELETE_NOTIFICATION_SUCCSESS % str(num)
+                except StandardError, err:
+                    print err
+                    c.notification_text = DELETE_NOTIFICATION_ERROR
+                del session['casebundle']
+            else:
+                c.context     = "../main.mako" 
+                c.confirm_for = DIALOG_CONFIRM_DELETE
+                c.question    = DIALOG_CONFIRM_EXPLAINATION % "\n".join(self._buildCaseList(case_bundle)) 
+                c.url_yes     = "/case_overview/delete/1"
+                c.url_no      = "/case_overview/"
+                return render('/casemanagement/dialogs/confirm.mako')
+        else:
+            c.notification_text = DELETE_NOTIFICATION_EMPTYLIST
+        return render('/casemanagement/dialogs/notificate_bundle_delete.mako')
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/document.py
===================================================================
--- trunk/waskaweb/controllers/document.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/document.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,4 +1,4 @@
-# -*- coding: latin-1 -*-
+# -*- coding: utf-8 -*-
 #
 # Copyright (c) 2007 by Intevation GmbH
 # Authors:
@@ -18,13 +18,17 @@
 
 from pylons import config
 
+from waskaweb.lib.security import checkRole
+
 log = logging.getLogger(__name__)
 
 class DocumentController(BaseController):
 
+    @checkRole(('admin_ka', 'cm_ka'))
     def index(self):
         redirect_to(action='globalOverview')
 
+    @checkRole(('admin_ka', 'cm_ka'))
     def globalOverview(self):
         try:
             c.files = listDocuments()
@@ -34,9 +38,11 @@
             #return render('/tests/trace.mako')
         return render('/documents/global_overview.mako')
 
+    @checkRole('admin_ka')
     def globalUpload(self):
         return render('/documents/global_upload.mako')
 
+    @checkRole('admin_ka')
     def globalUploadAction(self):
         try:
             doc = Document()
@@ -55,6 +61,7 @@
 
         return self.globalOverview() 
 
+    @checkRole('cm_ka')
     def caseUploadAction(self):
         try:
             case = int(request.POST['case'])
@@ -78,49 +85,45 @@
 
         redirect_to(controller="case", action="documents", id=case) 
 
+    @checkRole(('admin_ka', 'cm_ka'))
     def globalShow(self, id):
+        id = self._checkInt(id)
         try:
-            id = int(id)
-        except:
-            return self.globalOverview()
-
-        try:
             document = Document(id)
             document.load()
             data = paste.fileapp.DataApp(
                 document.data,
-                content_type=document.mime)
+                content_type=document.mime,
+                cache_control='must-revalidate',
+                pragma='public')
             return data(request.environ, self.start_response)
         except:
             traceback.print_exc(file=sys.stderr)
             redirect_to(controller="case", action="documents", id=case) 
             #return render('/tests/trace.mako')
 
+    @checkRole(('admin_ka', 'cm_ka'))
     def caseShow(self, id):
+        id = self._checkInt(id)
         try:
-            id = int(id)
-        except:
-            redirect_to(controller="case", action="documents") 
-
-        try:
             document = Document(id)
             document.load(True)
             data = paste.fileapp.DataApp(
                 document.data,
-                content_type=document.mime)
+                content_type=document.mime,
+                cache_control='must-revalidate',
+                pragma='public')
             return data(request.environ, self.start_response)
         except:
             traceback.print_exc(file=sys.stderr)
             redirect_to(controller="case", action="documents") 
             #return render('/tests/trace.mako')
 
-    def globalDelete(self, id, confirmed=False):
-        try:
-            id = int(id)
-        except:
-            return self.globalOverview()
-
-        if confirmed:
+    @checkRole('admin_ka')
+    def globalDelete(self, id, confirmed='0'):
+        id        = self._checkInt(id)
+        confirmed = self._checkBool(confirmed)
+        if confirmed == 1:
             try:
                 deleteDocument(id)
             except:
@@ -129,22 +132,19 @@
                 #return render('/tests/trace.mako')
             return self.globalOverview()
         else:
-            c.context = "../main.mako" 
-            c.confirm_for = 'L&ouml;schen Dokument'
-            c.question = 'Wollen Sie das Dokument wirklich l&ouml;schen und die Daten unwiederbringlich verlieren?'
-            c.url_yes = "/document/globalDelete/%d/1" % id
-            c.url_no  = "/document/globalOverview/"
+            c.context     = "../main.mako" 
+            c.confirm_for = u'Löschen Dokument'
+            c.question    = u'Wollen Sie das Dokument wirklich löschen und die Daten unwiederbringlich verlieren?'
+            c.url_yes     = "/document/globalDelete/%d/1" % id
+            c.url_no      = "/document/globalOverview/"
             return render('/documents/dialogs/confirm.mako')
 
+    @checkRole('cm_ka')
     def caseDelete(self, id, case, confirmed):
-        try:
-            id   = int(id)
-            case = int(case)
-            confirmed = confirmed == "1"
-        except:
-            redirect_to(controller="case", action="overview") 
-
-        if confirmed:
+        id        = self._checkInt(id)
+        case      = self._checkInt(case)
+        confirmed = self._checkBool(confirmed)
+        if confirmed == 1:
             try:
                 deleteDocument(id, True)
             except:
@@ -152,11 +152,11 @@
                 #return render('/tests/trace.mako') 
             redirect_to(controller="/case", action="documents", id=case) 
         else:
-            c.context = "../main.mako" 
-            c.confirm_for = 'L&ouml;schen Dokument'
-            c.question = 'Wollen Sie das Dokument wirklich l&ouml;schen und die Daten unwiederbringlich verlieren?'
-            c.url_yes = "/document/caseDelete/%d/%d/1" % (id, case)
-            c.url_no  = h.url_for(controller="/case", action="documents", id=case)
+            c.context     = "../main.mako" 
+            c.confirm_for = u'Löschen Dokument'
+            c.question    = u'Wollen Sie das Dokument wirklich löschen und die Daten unwiederbringlich verlieren?'
+            c.url_yes     = "/document/caseDelete/%d/%d/1" % (id, case)
+            c.url_no      = h.url_for(controller="/case", action="documents", id=case)
             return render('/documents/dialogs/confirm.mako')
 
-# vim:set ts=4 sw=4 si et sta sts=4 fenc=latin1:
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/evaluate.py
===================================================================
--- trunk/waskaweb/controllers/evaluate.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/evaluate.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,3 +1,10 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
 import logging
 import paste
 
@@ -9,14 +16,16 @@
 import sys
 import traceback
 
+from waskaweb.lib.security import checkRole
+from paste.httpexceptions  import HTTPNotFound
+
 class EvaluateController(BaseController):
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def index(self):
-        # Return a rendered template
-        #   return render('/some/template.mako')
-        # or, Return a response
-        raise paste.httpexceptions.HTTPException(404)
+        raise HTTPNotFound()
         
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def evaluate(self):
         try:
             e1 = Evaluation_1()
@@ -57,85 +66,99 @@
         data = paste.fileapp.DataApp(
             content,
             content_type='text/comma-separated-values',
-            content_encoding='UTF-8')
+            content_encoding='UTF-8',
+            cache_control='must-revalidate',
+            pragma='public')
         return data(request.environ, self.start_response)
         
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_1(self):
         try:
             e = Evaluation_1()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_2(self):
         try:
             e = Evaluation_2()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_3(self):
         try:
             e = Evaluation_3()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_4(self):
         try:
             e = Evaluation_4()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_5(self):
         try:
             e = Evaluation_5()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_6(self):
         try:
             e = Evaluation_6()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_7(self):
         try:
             e = Evaluation_7()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_8(self):
         try:
             e = Evaluation_8()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_9(self):
         try:
             e = Evaluation_9()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def exportEvaluation_10(self):
         try:
             e = Evaluation_10()
             return self._export(e)
         except:
             traceback.print_exc(file=sys.stderr)
-            raise paste.httpexceptions.HTTPException(404)
+            raise HTTPNotFound()
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Added: trunk/waskaweb/controllers/navigation.py
===================================================================
--- trunk/waskaweb/controllers/navigation.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/navigation.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
+import logging
+from paste.httpexceptions           import HTTPNotFound
+
+from waskaweb.controllers.CaseBase  import CasebaseController 
+from waskaweb.model.repeatgroup     import AidList 
+from waskaweb.lib.security          import checkRole
+from waskaweb.lib.renderer          import ViewRenderer
+from waskaweb.lib.base              import *
+
+log = logging.getLogger(__name__)
+
+class NavigationController(CasebaseController):
+
+    def __before__(self):
+        CasebaseController.__before__(self)
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def index(self):
+        # Return a rendered template
+        #   return render('/some/template.mako')
+        # or, Return a response
+        return 'Hello World'
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def toggle(self, ds_id, page_id):
+        '''This function toggles the selected item in thenavigation tree and
+        than returns the last selected page. If no page was selected (e.g fresh
+        opened case) it will return the rendered page of the item which will be
+        toggeled'''
+        
+        # Check values and toggle navigation tree
+        ds_id        = self._checkInt(ds_id)
+        page_id      = self._checkInt(page_id)
+        ti           = self.navigation.getTreeItem(page_id)
+        ti.toggle()
+
+        # Load last selected page
+        session_case = session.get('case')
+        sti          = self.navigation.getTreeItem(session_case.getPageId())
+        if not sti:
+            # session page_id is none (e.g after selecting a case)
+            sti = ti
+        c.ds_id      = ds_id
+        real_id      = sti.realId(ds_id)
+        c.case       = self._loadCase(ds_id)
+        c.page_id    = session_case.getPageId()
+        session.save()
+
+        c.print_form = "show" # Which page to open in popup on printing?
+        read_only = (session_case.getMode() == "show")
+        content, navigation = self._getRenderdFormElements(sti, ds_id, sti.key, ro_mode=read_only)
+        c.formular = content
+        c.form_navigation = navigation 
+        return render('/casemanagement/formular.mako')
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Added: trunk/waskaweb/controllers/rg_aid.py
===================================================================
--- trunk/waskaweb/controllers/rg_aid.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/rg_aid.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
+import paste
+import logging
+
+from paste.httpexceptions          import HTTPNotFound
+from waskaweb.lib.base             import *
+from waskaweb.controllers.CaseBase import CasebaseController
+from waskaweb.lib.security         import checkRole
+from waskaweb.model.repeatgroup    import AidObject, AidList 
+
+log = logging.getLogger(__name__)
+
+DELETE_CONFIRM_HEADER = u'''Löschen Unterstützungsangebot'''
+DELETE_CONFIRM_EXPLAINATION = u'''Wollen Sie wirklich das Angebot löschen und die Daten unwiederbringlich verlieren?'''
+
+class RgAidController(CasebaseController):
+
+    def __before__(self):
+        CasebaseController.__before__(self)
+
+    def index(self):
+        raise HTTPNotFound()
+
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+    def show(self, rg_id, page_id):
+        '''Returns the formular of an aid repeat group in show mode. The dataset is
+        identified by it id (rg_id) and its "type" (page_id)'''
+        rg_id     = self._checkInt(rg_id)
+        page_id   = self._checkInt(page_id)
+        ti        = self.navigation.getTreeItem(page_id)
+        c.ds_id   = ti.realId(rg_id)
+        c.page_id = page_id
+
+        case_session = session.get('case')
+        case_session.setMode("show")
+        session.save()
+
+        c.print_form = "show" # Which page to open in popup on printing?           
+
+        content, navigation = self._getRenderdFormElements(ti, rg_id, page_id, ro_mode=True)
+        c.formular = content
+        c.form_navigation = navigation 
+        return render('/casemanagement/formular.mako')
+
+    @checkRole('cm_ka')
+    def edit(self, rg_id, page_id):
+        '''Returns the formular of an aid repeat group in edit mode. The dataset is
+        identified by it id (rg_id) and its "type" (page_id)'''
+        rg_id     = self._checkInt(rg_id)
+        page_id   = self._checkInt(page_id)
+        ti        = self.navigation.getTreeItem(page_id)
+        c.ds_id   = ti.realId(rg_id)
+        c.page_id = page_id
+
+        case_session = session.get('case')
+        case_session.setMode("edit")
+        session.save()
+
+        c.print_form = "show" # Which page to open in popup on printing?           
+
+        content, navigation = self._getRenderdFormElements(ti, rg_id, page_id, ro_mode=False)
+        c.formular = content
+        c.form_navigation = navigation 
+        return render('/casemanagement/formular.mako')
+
+    @checkRole('cm_ka')
+    def newAction(self):
+        '''Creates a new aid repeat group. Returns the formular page of the new
+        RG in edit-mode'''
+        try:
+            case_id  = request.params.getone('case_id')
+            page_id  = request.params.getone('page_id')
+            aid_type = request.params.getone('aid_type')
+            aid      = AidObject(aid_type)
+            rg_id    = aid.create(int(case_id))
+            #print >> sys.stderr, "aid:%s, %s, %s" % (aid, rg_id, aid.page_id) 
+            if rg_id and aid.page_id:
+                return self.edit(str(rg_id), aid.page_id)
+            else:
+                return "Error. Could not create new Aid"
+        except KeyError:
+            pass
+
+    @checkRole('cm_ka')
+    def delete(self, rg_id, ds_type, confirmed=False):
+        '''Deletes new aid repeat group. If confirmed is false the user will
+        get a confirmation dialog. This function return the overviewpage of the
+        repeatgroups''' 
+        rg_id     = self._checkInt(rg_id)
+        ds_type   = self._checkInt(ds_type)
+        confirmed = self._checkBool(confirmed)
+        if confirmed == 1:
+            aid = AidObject(ds_type, rg_id)
+            if aid.delete():
+                # Redirect to the overview page: 14 should be the correct page key 
+                redirect_to('/case/show/%s/14' % session.get('case').id) 
+            else:
+                return "Error! Could not delete ds."
+        else:
+            c.context     = "../main.mako" 
+            c.confirm_for = DELETE_CONFIRM_HEADER 
+            c.question    = DELETE_CONFIRM_EXPLAINATION 
+            c.url_yes     = "/rg_aid/delete/%s/%s/1" % (rg_id, ds_type) 
+            c.url_no      = "/case/show/%s/14" % session.get('case').id
+            return render('/casemanagement/dialogs/confirm.mako')
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/statement.py
===================================================================
--- trunk/waskaweb/controllers/statement.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/statement.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -7,59 +7,75 @@
 
 import logging
 
-from waskaweb.lib.base import *
-from waskaweb.lib.casedata import DataSetDigest, DataSetAidList 
-from waskaweb.model.agency import *
-from waskaweb.model.statement import * 
+from waskaweb.lib.base                      import *
+from waskaweb.controllers.CaseBase          import CasebaseController 
+from waskaweb.model.repeatgroup             import AidList 
+from waskaweb.model.agency                  import *
+from waskaweb.model.case                    import *
+from waskaweb.model.statement               import * 
+from waskaweb.lib.security                  import checkRole
 
 log = logging.getLogger(__name__)
 
-HEADER = u"""Angaben zur Einverständniserklärung""" 
-ACCEPT_QUESTION = u"""Sie haben angegeben, das eine Einverständniserklärung des Jugendlichen zur Erfassung, Verarbeitung und Speicherung personenbezogener Daten vorliegt. Sind Sie sicher das diese Angabe korrekt ist?"""  
+HEADER           = u"""Angaben zur Einverständniserklärung""" 
+ACCEPT_QUESTION  = u"""Sie haben angegeben, das eine Einverständniserklärung des Jugendlichen zur Erfassung, Verarbeitung und Speicherung personenbezogener Daten vorliegt. Sind Sie sicher das diese Angabe korrekt ist?"""  
 DECLINE_QUESTION = u"""Sie haben angegeben, das keine Einverständniserklärung des Jugendlichen zur Erfassung, Verarbeitung und Speicherung personenbezogener Daten vorliegt. Dies bedeutet das die bislang gespeicherten Daten der Fallakte zur Wahrung des Datenschutzes gelöscht werden und unwiederbringlich verloren gehen. Sind Sie sicher das diese Angabe korrekt ist?"""  
 
-class StatementController(BaseController):
+class StatementController(CasebaseController):
 
+    def __before__(self):
+        CasebaseController.__before__(self)
+
+    @checkRole('cm_ka')
     def index(self):
         redirect_to(controller="waska", action="start")
 
+    @checkRole('cm_ka')
     def printAidPlanStatement(self, id):
-        digest = DataSetDigest(id)
-        statement = AidPlanStatement(id)
-        agency = Agency()
-        rg_list = DataSetAidList(id)
-        c.content = statement.fillout(
-            digest, agency, rg_list=rg_list.getDatasets()) 
+        id        = self._checkInt(id)
+        case      = self._loadCase(id)
+        statement = case.getAidPlanStatement()
+        c.content = statement.getContent() 
         return render('statement/default_statement.mako')
 
+    @checkRole('cm_ka')
     def printPrivacyStatement(self, id):
-        digest = DataSetDigest(id)
-        statement = PrivacyStatement(id)
-        agency = Agency()
-        c.content = statement.fillout(digest, agency) 
+        id        = self._checkInt(id)
+        case      = self._loadCase(id)
+        statement = case.getPrivacyStatement() 
+        c.content = statement.getContent()
         return render('statement/default_statement.mako')
 
+    @checkRole('cm_ka')
     def setPrivacyStatement(self, id):
-        c.form_navigation = self._getFormNavigation(
-            id, session.get("case_modus", "show"))
-        c.ds_id = id
+        id                = self._checkInt(id)
+        case              = self._loadCase(id)
+        c.form_navigation = self._getFormNavigation()
+        c.ds_id           = id
         return render('statement/edit.mako')
 
+    @checkRole('cm_ka')
     def setPrivacyStatementAction(self):
         if request.params['statement_signed'] == "1": 
             self.acceptPrivacyStatement(request.params['case_id'], "1")
         else:
             return self.declinePrivacyStatement(request.params['case_id'], '0')
 
+    @checkRole('cm_ka')
     def acceptPrivacyStatement(self, id, confirmed):
-        c.form_navigation = self._getFormNavigation(
-            id, session.get("case_modus", "show"))
-        if confirmed == '1':
-            statement = PrivacyStatement(id)
+        id                = self._checkInt(id)
+        confirmed         = self._checkBool(confirmed)
+        case              = self._loadCase(id)
+        c.form_navigation = self._getFormNavigation()
+        if confirmed:
+            statement = case.getPrivacyStatement() 
             statement.sign()
-            session['case_hasStatement'] = True
+            # TODO: Think about refreshing the state of the privacy statement
+            # in the statement model
+            session_case = session.get('case')
+            session_case.privacy_statement = True
             session.save()
-            redirect_to('digest', id=id) 
+            redirect_to(controller="case", action="digest", id=id) 
         else:
             c.confirm_for = HEADER 
             c.question = ACCEPT_QUESTION 
@@ -69,19 +85,26 @@
             c.url_no = h.url_for('digest', id=id)
             return render('statement/dialogs/confirm.mako')
 
+    @checkRole('cm_ka')
     def declinePrivacyStatement(self, id, confirmed):
-        c.form_navigation = self._getFormNavigation(
-            id, session.get("case_modus", "show"))
-        if confirmed == '1':
-            statement = PrivacyStatement(id)
-            statement.decline()
+        id                = self._checkInt(id)
+        confirmed         = self._checkBool(confirmed)
+        case              = self._loadCase(id)
+        c.form_navigation = self._getFormNavigation()
+        if confirmed:
+            statement = case.getPrivacyStatement()
             # TODO: Delete case or delete personal data from case, at least hide
             # this case in the case list from further editing by the user.
             # Solution: Anonymize the data 
             # Solution: SQL view? 
-            session['case_hasStatement'] = True
+            statement.decline()
+
+            # TODO: Think about refreshing the state of the privacy statement
+            # in the statement model
+            session_case = session.get('case')
+            session_case.privacy_statement = True
             session.save()
-            redirect_to('digest', id=id) 
+            redirect_to('/case_overview') 
         else:
             c.confirm_for = HEADER 
             c.question = DECLINE_QUESTION 
@@ -91,12 +114,4 @@
             c.url_no = h.url_for('digest', id=id)
             return render('statement/dialogs/confirm.mako')
        
-    def _getFormNavigation(self, ds_id, mode=None):
-        # Set errors for navigation
-        errors = session.get('case_errors', {})
-        navigation = session.get('navigation.tree')
-        return navigation.render(
-            lambda t: '/case/%sToggle/%s/%s' % (
-                mode, session.get('case_id'), t.key))
-
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8:

Modified: trunk/waskaweb/controllers/usersettings.py
===================================================================
--- trunk/waskaweb/controllers/usersettings.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/usersettings.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,9 +1,18 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
 import logging
 import formencode
 
-from waskaweb.lib.base import *
-from waskaweb.model.user import UserListObject, UserObject
+from waskaweb.lib.base       import *
+from waskaweb.model.user     import UserListObject, UserObject, SessionSuperAdmin
 from waskaweb.lib.validators import BaseFormValidator, NewPasswordForm  
+from waskaweb.lib.security   import checkRole
 
 log = logging.getLogger(__name__)
 
@@ -12,22 +21,27 @@
 
 class UsersettingsController(BaseController):
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def index(self):
         # Return a rendered template
         #   return render('/some/template.mako')
         # or, Return a response
-        return 'Hello World'
+        return 'Hello, User'
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def showSettings(self, id):
-        c.uo = UserObject(id)
+        id    = self._checkInt(id)
+        c.uo  = UserObject(id)
         c.vuo = UserObject(c.uo.standin)
         return render('/usersettings/show_settings.mako') 
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def changePassword(self):
         c.form_errors = {}
         c.form_result = {}
         return render('/usersettings/change_password.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def changePasswordAction(self):
         validator = NewPasswordForm() 
         try:
@@ -55,11 +69,13 @@
             return render('/tests/trace.mako')
         return render('/usersettings/dialogs/notificate_setpassword.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def changePasswordOnLogin(self):
         c.form_errors = {}
         c.form_result = {}
         return render('/usersettings/change_password_login.mako')
 
+    @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
     def changePasswordOnLoginAction(self):
         # Do not forget to unset the flag for the need for pass change if this
         # action succseeds 
@@ -89,12 +105,14 @@
             return render('/tests/trace.mako')
         return render('/usersettings/dialogs/notificate_setpassword.mako')
 
+    @checkRole('cm_ka')
     def editStandin(self, id):
+        id            = self._checkInt(id)
         c.form_errors = {}
         c.form_result = {}
-        ulo = UserListObject()
-        c.uo = UserObject(id) 
-        user = session['USER_AUTHORIZED']
+        ulo           = UserListObject()
+        c.uo          = UserObject(id) 
+        user          = session['USER_AUTHORIZED']
         # Get available users for standin. filter out admins and the current
         # user
         filter = [u.id for u in ulo.getAdminList()]
@@ -102,6 +120,7 @@
         c.userlist = ulo.getUserList(filter) 
         return render('usersettings/edit_standin.mako')
 
+    @checkRole('cm_ka')
     def editStandinAction(self):
         validator = BaseFormValidator()
         try:
@@ -114,3 +133,5 @@
             c.form_errors = error.error_dict or {}
             return render('usersettings/edit_standin.mako')
         return self.showSettings(c.form_result.get('uid'))
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/controllers/waska.py
===================================================================
--- trunk/waskaweb/controllers/waska.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/controllers/waska.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,11 +1,21 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
 import logging
 
-from waskaweb.lib.base import *
-from waskaweb.lib.security import checkLogin
-#from waskaweb.model.renderer import * 
-from waskaweb.model.user import UserObject 
+from waskaweb.lib.base     import *
+from waskaweb.lib.security import checkLogin, userIdentity, generateID
+from waskaweb.model.user   import UserObject 
 
+import md5
+
 log = logging.getLogger(__name__)
+
 class WaskaController(BaseController):
 
     def index(self):
@@ -18,17 +28,18 @@
         return render('/start/help.mako') 
 
     def settings(self, id):
+        id = self._checkInt(id)
         redirect_to(controller="usersettings", action="showSettings", id=id)
 
     def info(self):
         return render('/start/responsible.mako') 
 
     def logout(self):
-        try:
-            del session['USER_AUTHORIZED']
-            session.save()
-        except KeyError:
-            pass
+        # XXX: invalidate() does not delete backend data :-/
+        session.delete()
+        session.save()
+        session.invalidate()
+        response.delete_cookie('waska_auth')
         return render('/logout.mako')
 
     def login(self):
@@ -36,13 +47,18 @@
 
     def loginAction(self):
         try:
-            login = request.params.getone('username')
+            login  = request.params.getone('username')
             passwd = request.params.getone('password')
-            user = checkLogin(login, passwd)
+            user   = checkLogin(login, passwd)
             if user:
+                shared = generateID()
                 session['USER_AUTHORIZED'] = user
+                session['AUTH'] = md5.new(shared + userIdentity()).digest()
                 session.save()
+                response.set_cookie('waska_auth', shared)
                 redirect_to(action="start") 
         except KeyError:
             pass
         return self.login()
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po
===================================================================
--- trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/i18n/de/LC_MESSAGES/waskaweb.po	2008-08-13 13:04:40 UTC (rev 16)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: waskaweb 0.0.0\n"
 "Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2007-11-28 04:58+0100\n"
+"POT-Creation-Date: 2007-12-17 14:36+0100\n"
 "PO-Revision-Date: 2007-10-14 20:33+0200\n"
 "Last-Translator: Torsten Irländer<torsten.irlaender at intevation.de>\n"
 "Language-Team: de <LL at li.org>\n"
@@ -49,86 +49,84 @@
 msgid "logout_p_login_again"
 msgstr "um sich erneut in WASKA anzumelden."
 
-#: waskaweb/templates/main.mako:39
-msgid "np_text"
-msgstr "Sie sind hier: "
-
-#: waskaweb/templates/main.mako:62
+#: waskaweb/templates/main.mako:66
 msgid "statusbar_logininfo"
 msgstr "Angemeldet als"
 
-#: waskaweb/templates/main.mako:69 waskaweb/templates/main.mako:99
+#: waskaweb/templates/main.mako:73 waskaweb/templates/main.mako:103
 msgid "sm_menu_link_home"
 msgstr "Schwarzes Brett"
 
-#: waskaweb/templates/main.mako:70
+#: waskaweb/templates/main.mako:74
 msgid "sm_menu_link_help"
 msgstr "Hilfe"
 
-#: waskaweb/templates/main.mako:71
+#: waskaweb/templates/main.mako:75
 msgid "sm_menu_link_settings"
 msgstr "Mein Konto"
 
-#: waskaweb/templates/main.mako:73
+#: waskaweb/templates/main.mako:77
 msgid "sm_menu_link_logout"
 msgstr "Abmelden"
 
-#: waskaweb/templates/main.mako:79 waskaweb/templates/main.mako:97
+#: waskaweb/templates/main.mako:83 waskaweb/templates/main.mako:101
 msgid "np_root"
 msgstr "Waska Start"
 
-#: waskaweb/templates/main.mako:102
+#: waskaweb/templates/main.mako:106
+#: waskaweb/templates/appointments/dialogs/confirm.mako:4
+#: waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako:5
 msgid "menu_app_link_overview"
 msgstr "Termine"
 
-#: waskaweb/templates/main.mako:105
+#: waskaweb/templates/main.mako:109
 msgid "menu_doc_link_overview"
 msgstr "Dokumente"
 
-#: waskaweb/templates/main.mako:114
+#: waskaweb/templates/main.mako:118
 msgid "menu_header_cm"
 msgstr "Case-Management"
 
-#: waskaweb/templates/main.mako:116
+#: waskaweb/templates/main.mako:120
 msgid "menu_cm_link_overview"
 msgstr "Fallakten\t"
 
-#: waskaweb/templates/main.mako:119
+#: waskaweb/templates/main.mako:123
 msgid "menu_cm_link_new"
 msgstr "Fallakte anlegen"
 
-#: waskaweb/templates/main.mako:121
+#: waskaweb/templates/main.mako:125
 msgid "menu_cm_link_import"
 msgstr "Fallakte importieren"
 
-#: waskaweb/templates/main.mako:124
+#: waskaweb/templates/main.mako:128
 #: waskaweb/templates/casemanagement/evaluation.mako:8
 msgid "cm_actions_link_evaluate"
 msgstr "Auswertung"
 
-#: waskaweb/templates/main.mako:133
+#: waskaweb/templates/main.mako:141
 msgid "menu_header_adm"
 msgstr "Administration"
 
-#: waskaweb/templates/main.mako:135
+#: waskaweb/templates/main.mako:143
 msgid "menu_adm_link_useroverview"
 msgstr "Benutzer"
 
-#: waskaweb/templates/main.mako:138
+#: waskaweb/templates/main.mako:146
 msgid "menu_adm_link_showsettings"
 msgstr "Agentur"
 
-#: waskaweb/templates/main.mako:152
+#: waskaweb/templates/main.mako:160
 msgid "main_formular_input_error"
 msgstr "Fehlerhafte Formulareingabe"
 
-#: waskaweb/templates/main.mako:175
+#: waskaweb/templates/main.mako:183
 msgid "footer_title"
 msgstr "WASKA"
 
-#: waskaweb/templates/main.mako:175
+#: waskaweb/templates/main.mako:183
 msgid "footer_version"
-msgstr "03.12.07 | Beta 7"
+msgstr "10.01.08 | Beta 12"
 
 #: waskaweb/templates/main_login.mako:38
 #: waskaweb/templates/start/responsible.mako:71
@@ -156,14 +154,15 @@
 "Bitte setzen Sie sich in dieser Angelegenheit mit der Administration in "
 "Verbindung"
 
+#: waskaweb/templates/administration/delete_user_helper.mako:6
 #: waskaweb/templates/administration/edit_settings.mako:5
-#: waskaweb/templates/administration/edit_user.mako:4
+#: waskaweb/templates/administration/edit_user.mako:5
 #: waskaweb/templates/administration/new_user.mako:5
-#: waskaweb/templates/administration/new_user_result.mako:5
-#: waskaweb/templates/administration/overview_user.mako:5
-#: waskaweb/templates/administration/reset_password.mako:5
+#: waskaweb/templates/administration/new_user_result.mako:6
+#: waskaweb/templates/administration/overview_user.mako:6
+#: waskaweb/templates/administration/reset_password.mako:6
 #: waskaweb/templates/administration/settings.mako:4
-#: waskaweb/templates/administration/show_settings.mako:5
+#: waskaweb/templates/administration/show_settings.mako:6
 #: waskaweb/templates/administration/show_user.mako:5
 #: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:5
 #: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:5
@@ -171,131 +170,171 @@
 msgid "adm_np_root"
 msgstr "Administration"
 
+#: waskaweb/templates/administration/delete_user_helper.mako:7
+#: waskaweb/templates/administration/edit_user.mako:6
+#: waskaweb/templates/administration/new_user.mako:6
+#: waskaweb/templates/administration/new_user_result.mako:7
+#: waskaweb/templates/administration/overview_user.mako:7
+#: waskaweb/templates/administration/reset_password.mako:7
+#: waskaweb/templates/administration/show_user.mako:6
+#: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:6
+#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:6
+msgid "adm_np_overview"
+msgstr "Benutzerübersicht"
+
+#: waskaweb/templates/administration/delete_user_helper.mako:8
+#: waskaweb/templates/administration/dialogs/notificate_deleteuser.mako:6
+msgid "adm_np_deleteuser"
+msgstr "Benutzer löschen"
+
+#: waskaweb/templates/administration/delete_user_helper.mako:9
+msgid "adm_np_deleteuser_helper"
+msgstr "Assistent Benutzer löschen"
+
+#: waskaweb/templates/administration/delete_user_helper.mako:13
+msgid "cm_header_delete_user_helper"
+msgstr "Assistent Benutzer löschen"
+
+#: waskaweb/templates/administration/delete_user_helper.mako:16
+msgid "cm_delete_user_helper_explain_explain"
+msgstr ""
+"Der von Ihnen gewählte Benutzer ist noch als Hauptbearbeiter für die "
+"folgenden Fallakten eingetragen und kann daher nicht direkt gelöscht werden. "
+"Sie haben nun die Möglichkeit für die Fallakten einen neuen Bearbeiter "
+"auszuwählen."
+
+#: waskaweb/templates/administration/delete_user_helper.mako:25
+#: waskaweb/templates/casemanagement/bundle_editor.mako:26
+#: waskaweb/templates/casemanagement/organisation.mako:35
+msgid "cm_form_editor_submit"
+msgstr "Fallakte übertragen"
+
 #: waskaweb/templates/administration/edit_settings.mako:6
+#: waskaweb/templates/administration/show_settings.mako:7
+msgid "adm_np_showsettings"
+msgstr "Agentureinstellungen"
+
+#: waskaweb/templates/administration/edit_settings.mako:7
 msgid "adm_np_editsettings"
 msgstr "Einstellungen bearbeiten"
 
-#: waskaweb/templates/administration/edit_settings.mako:11
+#: waskaweb/templates/administration/edit_settings.mako:12
 msgid "adm_header_editsettings"
 msgstr "Einstellungen bearbeiten"
 
-#: waskaweb/templates/administration/edit_settings.mako:16
+#: waskaweb/templates/administration/edit_settings.mako:17
 msgid "adm_actions_link_showsettings"
 msgstr "Zurück zu: Agentureinstellungen"
 
-#: waskaweb/templates/administration/edit_settings.mako:22
+#: waskaweb/templates/administration/edit_settings.mako:23
 msgid "adm_con_es_editsettings"
 msgstr "Hier können Sie die agenturweiten Einstellungen bearbeiten."
 
-#: waskaweb/templates/administration/edit_settings.mako:27
-#: waskaweb/templates/administration/show_settings.mako:25
+#: waskaweb/templates/administration/edit_settings.mako:28
+#: waskaweb/templates/administration/show_settings.mako:26
 msgid "adm_form_settings_kaname"
 msgstr "Name der KA"
 
-#: waskaweb/templates/administration/edit_settings.mako:36
-#: waskaweb/templates/administration/show_settings.mako:29
+#: waskaweb/templates/administration/edit_settings.mako:37
+#: waskaweb/templates/administration/show_settings.mako:30
 msgid "adm_form_settings_fkz"
 msgstr "FKZ der KA"
 
-#: waskaweb/templates/administration/edit_settings.mako:53
-#: waskaweb/templates/administration/show_settings.mako:33
+#: waskaweb/templates/administration/edit_settings.mako:54
+#: waskaweb/templates/administration/show_settings.mako:34
 msgid "adm_form_settings_anontransfer"
 msgstr "Anonymisierte Fallakten übermitteln"
 
-#: waskaweb/templates/administration/edit_settings.mako:70
+#: waskaweb/templates/administration/edit_settings.mako:71
 msgid "adm_form_settings_save"
 msgstr "Einstellungen speichern"
 
-#: waskaweb/templates/administration/edit_user.mako:5
-#: waskaweb/templates/administration/new_user.mako:6
-#: waskaweb/templates/administration/new_user_result.mako:6
-#: waskaweb/templates/administration/overview_user.mako:6
-#: waskaweb/templates/administration/reset_password.mako:6
-#: waskaweb/templates/administration/show_user.mako:6
-#: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:6
-#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:6
-msgid "adm_np_overview"
-msgstr "Benutzerübersicht"
+#: waskaweb/templates/administration/edit_user.mako:7
+#: waskaweb/templates/administration/reset_password.mako:8
+#: waskaweb/templates/administration/show_user.mako:7
+#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:7
+msgid "adm_np_showuser"
+msgstr "Benutzer anzeigen"
 
-#: waskaweb/templates/administration/edit_user.mako:6
+#: waskaweb/templates/administration/edit_user.mako:8
 msgid "adm_np_edituser"
 msgstr "Benutzer bearbeiten"
 
-#: waskaweb/templates/administration/edit_user.mako:10
+#: waskaweb/templates/administration/edit_user.mako:12
 msgid "adm_header_edituser"
 msgstr "Benutzer bearbeiten"
 
-#: waskaweb/templates/administration/edit_user.mako:15
+#: waskaweb/templates/administration/edit_user.mako:17
 msgid "adm_actions_link_userpassreset"
 msgstr "Benutzerpasswort zurücksetzen"
 
-#: waskaweb/templates/administration/edit_user.mako:16
+#: waskaweb/templates/administration/edit_user.mako:18
 msgid "menu_adm_link_useredit_back"
 msgstr "Zurück zu: Benutzeransicht"
 
-#: waskaweb/templates/administration/edit_user.mako:25
+#: waskaweb/templates/administration/edit_user.mako:27
 #: waskaweb/templates/administration/new_user.mako:28
-#: waskaweb/templates/administration/new_user_result.mako:21
+#: waskaweb/templates/administration/new_user_result.mako:22
 #: waskaweb/templates/administration/show_user_body.mako:2
 #: waskaweb/templates/administration/userform_body.mako:4
 msgid "adm_form_legend_personal"
 msgstr "Angaben zur Person"
 
-#: waskaweb/templates/administration/edit_user.mako:28
+#: waskaweb/templates/administration/edit_user.mako:30
 #: waskaweb/templates/administration/new_user.mako:31
 #: waskaweb/templates/administration/userform_body.mako:7
 msgid "adm_form_user_firstname"
 msgstr "Vorname"
 
-#: waskaweb/templates/administration/edit_user.mako:36
+#: waskaweb/templates/administration/edit_user.mako:38
 #: waskaweb/templates/administration/new_user.mako:39
 #: waskaweb/templates/administration/userform_body.mako:12
 msgid "adm_form_user_lastname"
 msgstr "Nachname"
 
-#: waskaweb/templates/administration/edit_user.mako:44
+#: waskaweb/templates/administration/edit_user.mako:46
 #: waskaweb/templates/administration/new_user.mako:47
 #: waskaweb/templates/administration/userform_body.mako:17
 msgid "adm_form_user_telephone"
 msgstr "Telefon"
 
-#: waskaweb/templates/administration/edit_user.mako:49
+#: waskaweb/templates/administration/edit_user.mako:51
 msgid "adm_form_user_roomnumer"
 msgstr "Raumnummer"
 
-#: waskaweb/templates/administration/edit_user.mako:54
+#: waskaweb/templates/administration/edit_user.mako:56
 #: waskaweb/templates/administration/new_user.mako:57
 msgid "adm_form_user_branchoffice"
 msgstr "Filiale"
 
-#: waskaweb/templates/administration/edit_user.mako:58
+#: waskaweb/templates/administration/edit_user.mako:60
 #: waskaweb/templates/administration/new_user.mako:61
-#: waskaweb/templates/administration/new_user_result.mako:44
+#: waskaweb/templates/administration/new_user_result.mako:45
 #: waskaweb/templates/administration/userform_body.mako:21
 #: waskaweb/templates/usersettings/change_password_login.mako:17
 msgid "adm_form_legend_login"
 msgstr "Angaben zum Konto"
 
-#: waskaweb/templates/administration/edit_user.mako:76
+#: waskaweb/templates/administration/edit_user.mako:78
 #: waskaweb/templates/administration/new_user.mako:79
 #: waskaweb/templates/administration/userform_body.mako:28
 msgid "adm_form_user_activated"
 msgstr "Benutzer darf sich anmelden"
 
-#: waskaweb/templates/administration/edit_user.mako:84
+#: waskaweb/templates/administration/edit_user.mako:86
 #: waskaweb/templates/administration/new_user.mako:83
 #: waskaweb/templates/administration/userform_body.mako:36
 msgid "adm_form_user_newpass"
 msgstr "Benutzer muss bei der nächsten Anmeldung das Passwort setzen"
 
-#: waskaweb/templates/administration/edit_user.mako:87
+#: waskaweb/templates/administration/edit_user.mako:89
 #: waskaweb/templates/administration/new_user.mako:86
 #: waskaweb/templates/administration/userform_body.mako:54
 msgid "adm_form_user_submit"
 msgstr "Benutzer speichern"
 
 #: waskaweb/templates/administration/new_user.mako:7
-#: waskaweb/templates/administration/new_user_result.mako:7
+#: waskaweb/templates/administration/new_user_result.mako:8
 msgid "adm_np_newuser"
 msgstr "Neuen Benutzer anlegen"
 
@@ -304,7 +343,7 @@
 msgstr "Neuen Benutzer anlegen"
 
 #: waskaweb/templates/administration/new_user.mako:16
-#: waskaweb/templates/administration/new_user_result.mako:16
+#: waskaweb/templates/administration/new_user_result.mako:17
 #: waskaweb/templates/administration/show_user.mako:17
 msgid "menu_adm_link_useroverview_back"
 msgstr "Zurück zu: Benutzerübersicht"
@@ -322,87 +361,88 @@
 msgid "adm_form_user_role"
 msgstr "Benutzerrolle"
 
-#: waskaweb/templates/administration/new_user_result.mako:11
+#: waskaweb/templates/administration/new_user_result.mako:12
 msgid "adm_header_newuser_Result"
 msgstr "Benutzerdaten des neu angelegten Benutzers"
 
-#: waskaweb/templates/administration/new_user_result.mako:24
+#: waskaweb/templates/administration/new_user_result.mako:25
 msgid "adm_form_label_forename"
 msgstr "Vorname"
 
-#: waskaweb/templates/administration/new_user_result.mako:28
+#: waskaweb/templates/administration/new_user_result.mako:29
 msgid "adm_form_label_name"
 msgstr "Name"
 
-#: waskaweb/templates/administration/new_user_result.mako:32
+#: waskaweb/templates/administration/new_user_result.mako:33
 msgid "adm_form_label_phone"
 msgstr "Telefon"
 
-#: waskaweb/templates/administration/new_user_result.mako:36
+#: waskaweb/templates/administration/new_user_result.mako:37
 msgid "adm_form_label_room"
 msgstr "Raumnummer"
 
-#: waskaweb/templates/administration/new_user_result.mako:40
+#: waskaweb/templates/administration/new_user_result.mako:41
 msgid "adm_form_label_agency"
 msgstr "Agentur"
 
-#: waskaweb/templates/administration/new_user_result.mako:47
+#: waskaweb/templates/administration/new_user_result.mako:48
 msgid "adm_form_label_login"
 msgstr "Login"
 
-#: waskaweb/templates/administration/new_user_result.mako:51
+#: waskaweb/templates/administration/new_user_result.mako:52
 msgid "adm_form_label_password"
 msgstr "Passwort"
 
-#: waskaweb/templates/administration/new_user_result.mako:55
+#: waskaweb/templates/administration/new_user_result.mako:56
 msgid "adm_form_label_role"
 msgstr "Rolle"
 
-#: waskaweb/templates/administration/new_user_result.mako:59
+#: waskaweb/templates/administration/new_user_result.mako:60
 msgid "adm_form_label_activated"
 msgstr "Aktiviert"
 
-#: waskaweb/templates/administration/new_user_result.mako:62
+#: waskaweb/templates/administration/new_user_result.mako:63
 msgid "adm_form_is_activated_yes"
 msgstr "Ja"
 
-#: waskaweb/templates/administration/new_user_result.mako:64
+#: waskaweb/templates/administration/new_user_result.mako:65
 msgid "adm_form_is_activated_no"
 msgstr "Nein"
 
-#: waskaweb/templates/administration/new_user_result.mako:69
+#: waskaweb/templates/administration/new_user_result.mako:70
 msgid "adm_form_label_login_pw"
 msgstr "Bei Anmeldung neues Passwort verlangen"
 
-#: waskaweb/templates/administration/new_user_result.mako:72
+#: waskaweb/templates/administration/new_user_result.mako:73
 msgid "adm_form_needs_pw_yes"
 msgstr "Ja"
 
-#: waskaweb/templates/administration/new_user_result.mako:74
+#: waskaweb/templates/administration/new_user_result.mako:75
 msgid "adm_form_needs_pw_no"
 msgstr "Nein"
 
-#: waskaweb/templates/administration/overview_user.mako:12
+#: waskaweb/templates/administration/overview_user.mako:13
 msgid "adm_header_overview"
 msgstr "Benutzerübersicht"
 
-#: waskaweb/templates/administration/overview_user.mako:17
+#: waskaweb/templates/administration/overview_user.mako:18
 msgid "adm_actions_link_newuser"
 msgstr "Neuen Benutzer anlegen"
 
-#: waskaweb/templates/administration/overview_user.mako:24
+#: waskaweb/templates/administration/overview_user.mako:25
 msgid "adm_overview_tbl_header_lastname"
 msgstr "Name"
 
-#: waskaweb/templates/administration/overview_user.mako:25
+#: waskaweb/templates/administration/overview_user.mako:26
 msgid "adm_overview_tbl_header_firstname"
 msgstr "Vorname"
 
-#: waskaweb/templates/administration/overview_user.mako:26
+#: waskaweb/templates/administration/overview_user.mako:27
 msgid "adm_overview_tbl_header_actions"
 msgstr "Aktionen"
 
-#: waskaweb/templates/administration/overview_user.mako:33
+#: waskaweb/templates/administration/overview_user.mako:36
+#: waskaweb/templates/administration/overview_user.mako:46
 #: waskaweb/templates/appointments/overview_body.mako:14
 #: waskaweb/templates/appointments/overview_body.mako:22
 #: waskaweb/templates/appointments/overview_body.mako:30
@@ -411,7 +451,8 @@
 msgid "app_overview_body_table_show"
 msgstr "Anzeigen"
 
-#: waskaweb/templates/administration/overview_user.mako:34
+#: waskaweb/templates/administration/overview_user.mako:37
+#: waskaweb/templates/administration/overview_user.mako:47
 #: waskaweb/templates/appointments/overview_body.mako:15
 #: waskaweb/templates/appointments/overview_body.mako:23
 #: waskaweb/templates/appointments/overview_body.mako:38
@@ -419,35 +460,29 @@
 msgid "app_overview_body_table_delete"
 msgstr "Löschen"
 
-#: waskaweb/templates/administration/reset_password.mako:7
-#: waskaweb/templates/administration/show_user.mako:7
-#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:7
-msgid "adm_np_showuser"
-msgstr "Benutzer anzeigen"
-
-#: waskaweb/templates/administration/reset_password.mako:8
+#: waskaweb/templates/administration/reset_password.mako:9
 #: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:8
 #: waskaweb/templates/usersettings/dialogs/notificate_setpassword.mako:5
 msgid "adm_np_resetpassword"
 msgstr "Passwort zurücksetzen"
 
-#: waskaweb/templates/administration/reset_password.mako:10
+#: waskaweb/templates/administration/reset_password.mako:12
 msgid "adm_header_resetpassword"
-msgstr "Benutzerpasswort zurücksetzen"
+msgstr "Benutzerpasswort zurücksgesetzt!"
 
-#: waskaweb/templates/administration/reset_password.mako:11
+#: waskaweb/templates/administration/reset_password.mako:13
 msgid "adm_con_rp_the_password"
 msgstr "Das Password für den Benutzer"
 
-#: waskaweb/templates/administration/reset_password.mako:11
+#: waskaweb/templates/administration/reset_password.mako:13
 msgid "adm_con_rp_has_been_changed"
 msgstr "wurde erfolgreich geändert."
 
-#: waskaweb/templates/administration/reset_password.mako:11
+#: waskaweb/templates/administration/reset_password.mako:14
 msgid "adm_con_rp_new_pw"
 msgstr "Das neue Passwort lautet:"
 
-#: waskaweb/templates/administration/reset_password.mako:12
+#: waskaweb/templates/administration/reset_password.mako:15
 msgid "adm_con_rp_to_useroverview"
 msgstr "Weiter zu: Benutzerübersicht"
 
@@ -467,27 +502,23 @@
 msgid "adm_header_synchronisation"
 msgstr "Synchronisation"
 
-#: waskaweb/templates/administration/show_settings.mako:6
-msgid "adm_np_showsettings"
-msgstr "Agentureinstellungen"
-
-#: waskaweb/templates/administration/show_settings.mako:11
+#: waskaweb/templates/administration/show_settings.mako:12
 msgid "adm_header_showsettings"
 msgstr "Agentureinstellungen"
 
-#: waskaweb/templates/administration/show_settings.mako:16
+#: waskaweb/templates/administration/show_settings.mako:17
 msgid "adm_actions_link_editsettings"
 msgstr "Einstellungen bearbeiten"
 
-#: waskaweb/templates/administration/show_settings.mako:22
+#: waskaweb/templates/administration/show_settings.mako:23
 msgid "adm_con_ss_view_agency"
 msgstr "Hier können Sie die agenturweiten Einstellungen sehen."
 
-#: waskaweb/templates/administration/show_settings.mako:36
+#: waskaweb/templates/administration/show_settings.mako:37
 msgid "adm_form_settings_anontransfer_yes"
 msgstr "Ja"
 
-#: waskaweb/templates/administration/show_settings.mako:38
+#: waskaweb/templates/administration/show_settings.mako:39
 msgid "adm_form_settings_anontransfer_no"
 msgstr "Nein"
 
@@ -561,39 +592,10 @@
 msgid "adm_form_user_passwd_confirm"
 msgstr "Passwortwiederholung"
 
-#: waskaweb/templates/administration/dialogs/alert.mako:5
-#: waskaweb/templates/casemanagement/evaluation.mako:4
-#: waskaweb/templates/casemanagement/evaluation_result.mako:5
-#: waskaweb/templates/casemanagement/main.mako:8
-#: waskaweb/templates/casemanagement/new.mako:5
-#: waskaweb/templates/casemanagement/overview.mako:6
-#: waskaweb/templates/casemanagement/upload.mako:4
-#: waskaweb/templates/casemanagement/dialogs/alert.mako:5
-#: waskaweb/templates/casemanagement/dialogs/confirm.mako:5
-#: waskaweb/templates/casemanagement/dialogs/notificate_import_dub.mako:5
-#: waskaweb/templates/casemanagement/dialogs/notificate_printall.mako:5
-#: waskaweb/templates/casemanagement/static_form/statement.mako:5
-#: waskaweb/templates/casemanagement/static_form/statement_print.mako:5
-#: waskaweb/templates/statement/dialogs/confirm.mako:5
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:5
-msgid "cm_np_root"
-msgstr "Case-Management"
-
-#: waskaweb/templates/administration/dialogs/alert.mako:6
-#: waskaweb/templates/casemanagement/new.mako:6
-#: waskaweb/templates/casemanagement/dialogs/alert.mako:6
-#: waskaweb/templates/casemanagement/static_form/statement.mako:6
-msgid "cm_np_new"
-msgstr "Fallakte anlegen"
-
 #: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:7
 msgid "adm_np_delteuser"
 msgstr "Benutzer löschen"
 
-#: waskaweb/templates/administration/dialogs/notificate_deleteuser.mako:6
-msgid "adm_np_deleteuser"
-msgstr "Benutzer löschen"
-
 #: waskaweb/templates/appointments/appointment_form.mako:6
 msgid "app_form_label_title"
 msgstr "Titel"
@@ -641,23 +643,26 @@
 #: waskaweb/templates/appointments/new.mako:4
 #: waskaweb/templates/appointments/overview.mako:4
 #: waskaweb/templates/appointments/show.mako:4
-#: waskaweb/templates/appointments/beta/show_10.mako:4
+#: waskaweb/templates/appointments/beta/show_1.mako:4
+#: waskaweb/templates/appointments/beta/show_2.mako:4
+#: waskaweb/templates/appointments/beta/show_3.mako:4
+#: waskaweb/templates/appointments/beta/show_4.mako:4
 #: waskaweb/templates/appointments/beta/show_5.mako:4
 #: waskaweb/templates/appointments/beta/show_6.mako:4
 #: waskaweb/templates/appointments/beta/show_7.mako:4
-#: waskaweb/templates/appointments/beta/show_8.mako:4
-#: waskaweb/templates/appointments/beta/show_9.mako:4
-#: waskaweb/templates/casemanagement/new_appointment.mako:5
-msgid "app_np_root"
-msgstr "Termine"
+#: waskaweb/templates/appointments/dialogs/confirm.mako:5
+#: waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako:6
+#: waskaweb/templates/casemanagement/appointments.mako:5
+msgid "app_np_list"
+msgstr "Terminübersicht"
 
 #: waskaweb/templates/appointments/new.mako:5
-#: waskaweb/templates/casemanagement/new_appointment.mako:6
+#: waskaweb/templates/casemanagement/new_appointment.mako:7
 msgid "app_np_new"
 msgstr "Neuen Termin anlegen"
 
 #: waskaweb/templates/appointments/new.mako:9
-#: waskaweb/templates/casemanagement/new_appointment.mako:10
+#: waskaweb/templates/casemanagement/new_appointment.mako:11
 msgid "cm_app_header_new"
 msgstr "Neuen Termin anlegen"
 
@@ -671,23 +676,18 @@
 msgid "menu_app_link_overview_back"
 msgstr "Zurück zu: Terminübersicht"
 
-#: waskaweb/templates/appointments/overview.mako:5
-#: waskaweb/templates/casemanagement/appointments.mako:5
-msgid "app_np_list"
-msgstr "Terminübersicht"
-
-#: waskaweb/templates/appointments/overview.mako:10
-#: waskaweb/templates/appointments/overview.mako:24
+#: waskaweb/templates/appointments/overview.mako:9
+#: waskaweb/templates/appointments/overview.mako:23
 #: waskaweb/templates/casemanagement/appointments.mako:10
 msgid "app_header_overview"
 msgstr "Terminübersicht"
 
-#: waskaweb/templates/appointments/overview.mako:15
+#: waskaweb/templates/appointments/overview.mako:14
 #: waskaweb/templates/casemanagement/appointments.mako:17
 msgid "app_actions_link_newappointment"
 msgstr "Neuen Termin anlegen"
 
-#: waskaweb/templates/appointments/overview.mako:27
+#: waskaweb/templates/appointments/overview.mako:26
 msgid "app_con_list_all_appointments"
 msgstr "Hier wird eine Auflistung aller Termine angezeigt"
 
@@ -713,11 +713,11 @@
 msgstr "Aktionen"
 
 #: waskaweb/templates/appointments/show.mako:5
-#: waskaweb/templates/appointments/beta/show_1.mako:4
+#: waskaweb/templates/appointments/beta/show_1.mako:5
 #: waskaweb/templates/appointments/beta/show_10.mako:5
-#: waskaweb/templates/appointments/beta/show_2.mako:4
-#: waskaweb/templates/appointments/beta/show_3.mako:4
-#: waskaweb/templates/appointments/beta/show_4.mako:4
+#: waskaweb/templates/appointments/beta/show_2.mako:5
+#: waskaweb/templates/appointments/beta/show_3.mako:5
+#: waskaweb/templates/appointments/beta/show_4.mako:5
 #: waskaweb/templates/appointments/beta/show_5.mako:5
 #: waskaweb/templates/appointments/beta/show_6.mako:5
 #: waskaweb/templates/appointments/beta/show_7.mako:5
@@ -727,11 +727,11 @@
 msgstr "Terminansicht"
 
 #: waskaweb/templates/appointments/show.mako:9
-#: waskaweb/templates/appointments/beta/show_1.mako:9
+#: waskaweb/templates/appointments/beta/show_1.mako:10
 #: waskaweb/templates/appointments/beta/show_10.mako:10
-#: waskaweb/templates/appointments/beta/show_2.mako:9
-#: waskaweb/templates/appointments/beta/show_3.mako:8
-#: waskaweb/templates/appointments/beta/show_4.mako:9
+#: waskaweb/templates/appointments/beta/show_2.mako:10
+#: waskaweb/templates/appointments/beta/show_3.mako:9
+#: waskaweb/templates/appointments/beta/show_4.mako:10
 #: waskaweb/templates/appointments/beta/show_5.mako:10
 #: waskaweb/templates/appointments/beta/show_6.mako:10
 #: waskaweb/templates/appointments/beta/show_7.mako:9
@@ -741,10 +741,10 @@
 msgstr "Terminansicht"
 
 #: waskaweb/templates/appointments/show.mako:14
-#: waskaweb/templates/appointments/beta/show_1.mako:14
-#: waskaweb/templates/appointments/beta/show_2.mako:14
-#: waskaweb/templates/appointments/beta/show_3.mako:13
-#: waskaweb/templates/appointments/beta/show_4.mako:14
+#: waskaweb/templates/appointments/beta/show_1.mako:15
+#: waskaweb/templates/appointments/beta/show_2.mako:15
+#: waskaweb/templates/appointments/beta/show_3.mako:14
+#: waskaweb/templates/appointments/beta/show_4.mako:15
 msgid "sm_menu_link_home_back"
 msgstr "Zurück zu: Schwarzes Brett"
 
@@ -760,17 +760,97 @@
 msgid "app_table_description"
 msgstr "Beschreibung"
 
+#: waskaweb/templates/appointments/beta/show_10.mako:4
+#: waskaweb/templates/appointments/beta/show_8.mako:4
+#: waskaweb/templates/appointments/beta/show_9.mako:4
+#: waskaweb/templates/casemanagement/new_appointment.mako:6
+msgid "app_np_root"
+msgstr "Termine"
+
+#: waskaweb/templates/appointments/dialogs/confirm.mako:6
+#: waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako:7
+msgid "app_np_delete"
+msgstr "Termin lösschen"
+
 #: waskaweb/templates/casemanagement/appointments.mako:4
 #: waskaweb/templates/casemanagement/digest.mako:5
 #: waskaweb/templates/casemanagement/formular.mako:34
-#: waskaweb/templates/casemanagement/new_appointment.mako:4
-#: waskaweb/templates/casemanagement/organisation.mako:4
+#: waskaweb/templates/casemanagement/new_appointment.mako:5
+#: waskaweb/templates/casemanagement/organisation.mako:5
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:6
 #: waskaweb/templates/documents/case_new.mako:4
 #: waskaweb/templates/documents/case_overview.mako:5
 msgid "cm_np_select"
 msgstr "Ausgewählte Fallakte"
 
+#: waskaweb/templates/casemanagement/bundle_editor.mako:10
+#: waskaweb/templates/casemanagement/bundle_standin.mako:10
+#: waskaweb/templates/casemanagement/organisation.mako:11
+msgid "cm_header_organisation"
+msgstr "Organisation"
+
+#: waskaweb/templates/casemanagement/bundle_editor.mako:13
+msgid "cm_bundle_editor_explain"
+msgstr "Bitte wählen Sie den neuen Bearbeiter für die folgenden Akten aus"
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:13
+#: waskaweb/templates/casemanagement/organisation.mako:38
+msgid "cm_header_standin"
+msgstr "Vertretung"
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:14
+msgid "cm_bundle_standin_explain"
+msgstr "Bitte wählen Sie die neuen Vertreter für die folgenden Akten aus"
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:16
+msgid "cm_bundle_standin_explain_cm_ka"
+msgstr ""
+"Beachten Sie, dass aus der folgenden Liste nur für die Fälle die Vertretung "
+"gesetzt werden wird, für die Sie der Hauptbearbeiter sind"
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:28
+msgid "attention"
+msgstr "Achtung"
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:28
+msgid "cm_bundle_standin_explain_attention"
+msgstr "Die bereits existierenden Vertretungsregeln werden überschrieben"
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:50
+#: waskaweb/templates/casemanagement/organisation.mako:69
+msgid "cm_form_standin_submit"
+msgstr "Vertretung ändern"
+
+#: waskaweb/templates/casemanagement/caselist.mako:6
+msgid "cm_overview_tbl_header_id"
+msgstr "Knr."
+
+#: waskaweb/templates/casemanagement/caselist.mako:7
+msgid "cm_overview_tbl_header_firstname"
+msgstr "Vorname"
+
+#: waskaweb/templates/casemanagement/caselist.mako:8
+msgid "cm_overview_tbl_header_lastname"
+msgstr "Name"
+
+#: waskaweb/templates/casemanagement/caselist.mako:9
+msgid "cm_overview_tbl_header_actions"
+msgstr "Aktionen"
+
+#: waskaweb/templates/casemanagement/caselist.mako:20
+#: waskaweb/templates/casemanagement/caselist.mako:33
+msgid "cm_overview_a_show"
+msgstr "Anzeigen"
+
+#: waskaweb/templates/casemanagement/caselist.mako:22
+#: waskaweb/templates/casemanagement/caselist.mako:35
+msgid "cm_overview_a_delete"
+msgstr "Löschen"
+
+#: waskaweb/templates/casemanagement/caselist.mako:45
+msgid "cm_overview_tbl_no_data_found"
+msgstr "Es wurden keine Datensätze gefunden."
+
 #: waskaweb/templates/casemanagement/create_export_scheme.mako:2
 msgid "cm_header_export_createscheme"
 msgstr "Exportschema erstellen"
@@ -789,55 +869,72 @@
 msgid "cm_header_digest"
 msgstr "Zusammenfassung der Fallakte"
 
-#: waskaweb/templates/casemanagement/digest.mako:14
+#: waskaweb/templates/casemanagement/digest.mako:16
 msgid "cm_digest_con_digest_dossier"
 msgstr ""
 "Hier wird eine Zusammenfassung der Fallakte angezeigt. Diese Zusammenfassung "
 "besteht aus einer Zusammenstellung verschiedener Felder aus dem "
 "Fallaktenformular"
 
-#: waskaweb/templates/casemanagement/digest.mako:15
+#: waskaweb/templates/casemanagement/digest.mako:18
 msgid "cm_header_digest_personal"
 msgstr "Angaben zur Person"
 
-#: waskaweb/templates/casemanagement/digest.mako:18
+#: waskaweb/templates/casemanagement/digest.mako:21
 msgid "cm_digest_tbl_label_lastname"
 msgstr "Name"
 
-#: waskaweb/templates/casemanagement/digest.mako:22
+#: waskaweb/templates/casemanagement/digest.mako:25
 msgid "cm_digest_tbl_label_firstname"
 msgstr "Vorname"
 
-#: waskaweb/templates/casemanagement/digest.mako:26
+#: waskaweb/templates/casemanagement/digest.mako:29
 msgid "cm_digest_tbl_label_caseid"
 msgstr "Kundennummer"
 
-#: waskaweb/templates/casemanagement/digest.mako:30
+#: waskaweb/templates/casemanagement/digest.mako:33
 msgid "cm_digest_tbl_label_age"
 msgstr "Alter"
 
-#: waskaweb/templates/casemanagement/digest.mako:34
+#: waskaweb/templates/casemanagement/digest.mako:37
 msgid "cm_digest_header_address"
 msgstr "Kontaktdaten"
 
-#: waskaweb/templates/casemanagement/digest.mako:37
+#: waskaweb/templates/casemanagement/digest.mako:40
 msgid "cm_digest_tbl_label_street"
 msgstr "Straße"
 
-#: waskaweb/templates/casemanagement/digest.mako:41
+#: waskaweb/templates/casemanagement/digest.mako:44
 msgid "cm_digest_tbl_label_plz"
 msgstr "PLZ"
 
-#: waskaweb/templates/casemanagement/digest.mako:45
+#: waskaweb/templates/casemanagement/digest.mako:48
 msgid "cm_digest_tbl_label_city"
 msgstr "Ort"
 
-#: waskaweb/templates/casemanagement/digest.mako:49
+#: waskaweb/templates/casemanagement/digest.mako:52
 msgid "cm_digest_tbl_label_telephone"
 msgstr "Telefon"
 
+#: waskaweb/templates/casemanagement/evaluation.mako:4
+#: waskaweb/templates/casemanagement/evaluation_result.mako:6
+#: waskaweb/templates/casemanagement/main.mako:8
+#: waskaweb/templates/casemanagement/new.mako:5
+#: waskaweb/templates/casemanagement/overview.mako:6
+#: waskaweb/templates/casemanagement/upload.mako:5
+#: waskaweb/templates/casemanagement/dialogs/alert.mako:5
+#: waskaweb/templates/casemanagement/dialogs/confirm.mako:5
+#: waskaweb/templates/casemanagement/dialogs/notificate_import_dub.mako:5
+#: waskaweb/templates/casemanagement/dialogs/notificate_printall.mako:5
+#: waskaweb/templates/casemanagement/static_form/statement.mako:5
+#: waskaweb/templates/casemanagement/static_form/statement_print.mako:5
+#: waskaweb/templates/statement/dialogs/confirm.mako:5
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:5
+msgid "cm_np_root"
+msgstr "Case-Management"
+
 #: waskaweb/templates/casemanagement/evaluation.mako:5
-#: waskaweb/templates/casemanagement/evaluation_result.mako:6
+#: waskaweb/templates/casemanagement/evaluation_result.mako:7
 msgid "cm_np_evaluate"
 msgstr "Auswertung"
 
@@ -845,43 +942,42 @@
 msgid "cm_header_evaluate"
 msgstr "Auswertung"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:7
+#: waskaweb/templates/casemanagement/evaluation_result.mako:8
 msgid "cm_np_evaluate_result"
 msgstr "Ergebnis der Auswertung"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:9
+#: waskaweb/templates/casemanagement/evaluation_result.mako:10
 msgid "cm_header_evaluate_result"
 msgstr "Ergebnis der Auswertung"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:11
+#: waskaweb/templates/casemanagement/evaluation_result.mako:12
 msgid "cm_eval_summary_header_1"
 msgstr "1. Verhältnis Beratungskunden/Aufnahmen in das CM"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:12
+#: waskaweb/templates/casemanagement/evaluation_result.mako:13
 msgid "cm_eval_summary_header_2"
 msgstr "2. Verweildauer im CM"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:13
+#: waskaweb/templates/casemanagement/evaluation_result.mako:14
 msgid "cm_eval_summary_header_3"
 msgstr "3. Alters- und Geschlechterstruktur in %"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:14
+#: waskaweb/templates/casemanagement/evaluation_result.mako:15
 msgid "cm_eval_summary_header_4"
 msgstr "4. Migrationshintergrund"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:15
+#: waskaweb/templates/casemanagement/evaluation_result.mako:16
 msgid "cm_eval_summary_header_5"
 msgstr "5. Zugang zur Kompetenzagentur"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:16
+#: waskaweb/templates/casemanagement/evaluation_result.mako:17
 msgid "cm_eval_summary_header_6"
 msgstr "6. Förderbedarf"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:17
+#: waskaweb/templates/casemanagement/evaluation_result.mako:18
 msgid "cm_eval_summary_header_7"
 msgstr "7. Vermittlung"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:22
 #: waskaweb/templates/casemanagement/evaluation_result.mako:23
 #: waskaweb/templates/casemanagement/evaluation_result.mako:24
 #: waskaweb/templates/casemanagement/evaluation_result.mako:25
@@ -890,127 +986,188 @@
 #: waskaweb/templates/casemanagement/evaluation_result.mako:28
 #: waskaweb/templates/casemanagement/evaluation_result.mako:29
 #: waskaweb/templates/casemanagement/evaluation_result.mako:30
+#: waskaweb/templates/casemanagement/evaluation_result.mako:31
 msgid "cm_actions_link_export_evaluate"
 msgstr "Ergebnis der Auswertung exportieren"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:35
+#: waskaweb/templates/casemanagement/evaluation_result.mako:36
 msgid "cm_eval_header_1"
 msgstr "1. Anzahl der Beratungskunden, davon % ins CM aufgenommen"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:38
+#: waskaweb/templates/casemanagement/evaluation_result.mako:39
+msgid "cm_eval_table_adolescent"
+msgstr "Jugendliche"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:40
+#: waskaweb/templates/casemanagement/evaluation_result.mako:97
+#: waskaweb/templates/casemanagement/evaluation_result.mako:125
+#: waskaweb/templates/casemanagement/evaluation_result.mako:157
+#: waskaweb/templates/casemanagement/evaluation_result.mako:176
+#: waskaweb/templates/casemanagement/evaluation_result.mako:206
+#: waskaweb/templates/casemanagement/evaluation_result.mako:238
+#: waskaweb/templates/casemanagement/evaluation_result.mako:271
+#: waskaweb/templates/casemanagement/evaluation_result.mako:301
+msgid "cm_eval_table_number"
+msgstr "Anzahl"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:41
+#: waskaweb/templates/casemanagement/evaluation_result.mako:98
+#: waskaweb/templates/casemanagement/evaluation_result.mako:126
+#: waskaweb/templates/casemanagement/evaluation_result.mako:158
+#: waskaweb/templates/casemanagement/evaluation_result.mako:177
+#: waskaweb/templates/casemanagement/evaluation_result.mako:207
+#: waskaweb/templates/casemanagement/evaluation_result.mako:239
+#: waskaweb/templates/casemanagement/evaluation_result.mako:272
+#: waskaweb/templates/casemanagement/evaluation_result.mako:302
+msgid "cm_eval_table_percent"
+msgstr "Prozent"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:45
 msgid "cm_eval_table_consult_customer"
 msgstr "Beratungskunden"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:44
+#: waskaweb/templates/casemanagement/evaluation_result.mako:51
 msgid "cm_eval_table_taken_over_to_cm"
 msgstr "Ins CM übernommen"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:50
-#: waskaweb/templates/casemanagement/evaluation_result.mako:70
-#: waskaweb/templates/casemanagement/evaluation_result.mako:95
-#: waskaweb/templates/casemanagement/evaluation_result.mako:107
-#: waskaweb/templates/casemanagement/evaluation_result.mako:119
-#: waskaweb/templates/casemanagement/evaluation_result.mako:134
-#: waskaweb/templates/casemanagement/evaluation_result.mako:146
-#: waskaweb/templates/casemanagement/evaluation_result.mako:160
-#: waskaweb/templates/casemanagement/evaluation_result.mako:175
-#: waskaweb/templates/casemanagement/evaluation_result.mako:187
+#: waskaweb/templates/casemanagement/evaluation_result.mako:57
+#: waskaweb/templates/casemanagement/evaluation_result.mako:89
+#: waskaweb/templates/casemanagement/evaluation_result.mako:120
+#: waskaweb/templates/casemanagement/evaluation_result.mako:150
+#: waskaweb/templates/casemanagement/evaluation_result.mako:168
+#: waskaweb/templates/casemanagement/evaluation_result.mako:201
+#: waskaweb/templates/casemanagement/evaluation_result.mako:231
+#: waskaweb/templates/casemanagement/evaluation_result.mako:263
+#: waskaweb/templates/casemanagement/evaluation_result.mako:296
+#: waskaweb/templates/casemanagement/evaluation_result.mako:326
 msgid "cm_eval_table_to_overview"
 msgstr "Zur Ãœbersicht"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:50
-#: waskaweb/templates/casemanagement/evaluation_result.mako:70
-#: waskaweb/templates/casemanagement/evaluation_result.mako:95
-#: waskaweb/templates/casemanagement/evaluation_result.mako:107
-#: waskaweb/templates/casemanagement/evaluation_result.mako:119
-#: waskaweb/templates/casemanagement/evaluation_result.mako:134
-#: waskaweb/templates/casemanagement/evaluation_result.mako:146
-#: waskaweb/templates/casemanagement/evaluation_result.mako:160
-#: waskaweb/templates/casemanagement/evaluation_result.mako:175
-#: waskaweb/templates/casemanagement/evaluation_result.mako:187
+#: waskaweb/templates/casemanagement/evaluation_result.mako:57
+#: waskaweb/templates/casemanagement/evaluation_result.mako:89
+#: waskaweb/templates/casemanagement/evaluation_result.mako:120
+#: waskaweb/templates/casemanagement/evaluation_result.mako:150
+#: waskaweb/templates/casemanagement/evaluation_result.mako:168
+#: waskaweb/templates/casemanagement/evaluation_result.mako:201
+#: waskaweb/templates/casemanagement/evaluation_result.mako:231
+#: waskaweb/templates/casemanagement/evaluation_result.mako:263
+#: waskaweb/templates/casemanagement/evaluation_result.mako:296
+#: waskaweb/templates/casemanagement/evaluation_result.mako:326
 msgid "cm_eval_table_export_analysis"
 msgstr "Auswertung exportieren"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:53
+#: waskaweb/templates/casemanagement/evaluation_result.mako:60
 msgid "cm_eval_header_2"
 msgstr ""
 "2. Anzahl der Jugendlichen im CM, davon % abgeschlossen nach "
 "durchschnittlich x Monaten"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:56
+#: waskaweb/templates/casemanagement/evaluation_result.mako:63
 msgid "cm_eval_table_month"
 msgstr "Monat"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:57
+#: waskaweb/templates/casemanagement/evaluation_result.mako:64
 msgid "cm_eval_table_completed"
 msgstr "Abgeschlossen"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:58
+#: waskaweb/templates/casemanagement/evaluation_result.mako:65
 msgid "cm_eval_table_aborted"
 msgstr "Abgebrochen"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:73
+#: waskaweb/templates/casemanagement/evaluation_result.mako:92
 msgid "cm_eval_header_3"
 msgstr "3. Alters- und Geschlechterstruktur in %"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:74
+#: waskaweb/templates/casemanagement/evaluation_result.mako:93
 msgid "cm_eval_header_on_gender"
 msgstr "Angaben zur Geschlechtsstruktur"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:77
+#: waskaweb/templates/casemanagement/evaluation_result.mako:96
+msgid "cm_eval_table_gender"
+msgstr "Geschlecht"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:102
 msgid "cm_eval_label_male"
 msgstr "männlich"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:83
+#: waskaweb/templates/casemanagement/evaluation_result.mako:108
 msgid "cm_eval_label_female"
 msgstr "weiblich"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:89
+#: waskaweb/templates/casemanagement/evaluation_result.mako:114
 msgid "cm_eval_label_intersexual"
 msgstr "intersexuell"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:96
+#: waskaweb/templates/casemanagement/evaluation_result.mako:121
 msgid "cm_eval_header_on_age"
 msgstr "Angaben zur Altersverteilung"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:110
+#: waskaweb/templates/casemanagement/evaluation_result.mako:124
+msgid "cm_eval_table_age"
+msgstr "Alter"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:153
 msgid "cm_eval_header_4"
 msgstr ""
 "4. Migrationshintergrund in % (Staatsangehörigkeit nicht Deutsch oder Mutter/"
 "Vater nicht in Deutschland geboren)"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:113
+#: waskaweb/templates/casemanagement/evaluation_result.mako:156
+msgid "cm_eval_table_category"
+msgstr "Kategorie"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:162
 msgid "cm_eval_label_migration_background"
 msgstr "Migrationshintergrund"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:122
+#: waskaweb/templates/casemanagement/evaluation_result.mako:171
 msgid "cm_eval_header_5"
 msgstr "5. Angaben zum Zugang des Jugendlichen zur Kompetenzagentur in %"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:123
+#: waskaweb/templates/casemanagement/evaluation_result.mako:172
 msgid "cm_eval_header_access_youngster_to_agency"
 msgstr "Zugang des Jugendlichen zur Kompetenzagentur in %"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:135
+#: waskaweb/templates/casemanagement/evaluation_result.mako:175
+msgid "cm_eval_table_access"
+msgstr "Zugang"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:202
 msgid "cm_eval_head_law_access_agency"
 msgstr "Rechtskreis der Jugendlichen beim Zugang zur Kompetenzagentur in %"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:149
+#: waskaweb/templates/casemanagement/evaluation_result.mako:205
+msgid "cm_eval_table_law"
+msgstr "Rechtkreis"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:234
 msgid "cm_eval_header_6"
 msgstr "6. Förderbedarf in % nach den vier Bereichen 4.2.1 - 4.2.4"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:163
+#: waskaweb/templates/casemanagement/evaluation_result.mako:237
+msgid "cm_eval_table_offer"
+msgstr "Angebot"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:266
 msgid "cm_eval_header_7"
 msgstr "7. Angaben zur Vermittlung der Jugendlichen"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:164
+#: waskaweb/templates/casemanagement/evaluation_result.mako:267
 msgid "cm_eval_head_where_to_place_youngster"
 msgstr "Wohin wurden die Jugendlichen vermittlelt?"
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:176
+#: waskaweb/templates/casemanagement/evaluation_result.mako:270
+msgid "cm_eval_table_place"
+msgstr "Vermittlung"
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:297
 msgid "cm_eval_header_law_changed_after_place"
 msgstr "Angaben zur Veränderung des Rechtskreises nach der Vermittlung"
 
+#: waskaweb/templates/casemanagement/evaluation_result.mako:300
+msgid "cm_eval_table_law_change"
+msgstr "Rechtskreis"
+
 #: waskaweb/templates/casemanagement/export.mako:4
 msgid "cm_np_root<"
 msgstr "Fallakten"
@@ -1040,17 +1197,17 @@
 msgstr "Fallaktenansicht"
 
 #: waskaweb/templates/casemanagement/formular.mako:17
-#: waskaweb/templates/casemanagement/formular.mako:72
+#: waskaweb/templates/casemanagement/formular.mako:71
 msgid "cm_actions_link_show"
 msgstr "Bearbeitung beenden"
 
 #: waskaweb/templates/casemanagement/formular.mako:19
-#: waskaweb/templates/casemanagement/formular.mako:74
+#: waskaweb/templates/casemanagement/formular.mako:73
 msgid "cm_actions_link_edit"
 msgstr "In Bearbeitung nehmen"
 
 #: waskaweb/templates/casemanagement/formular.mako:22
-#: waskaweb/templates/casemanagement/formular.mako:79
+#: waskaweb/templates/casemanagement/formular.mako:76
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:18
 msgid "cm_actions_link_printout"
 msgstr "Druckversion"
@@ -1065,6 +1222,7 @@
 
 #: waskaweb/templates/casemanagement/main.mako:9
 #: waskaweb/templates/casemanagement/overview.mako:7
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:6
 msgid "cm_np_overview"
 msgstr "Fallaktenübersicht"
 
@@ -1076,6 +1234,10 @@
 msgid "cm_info_nr"
 msgstr "Kundennr."
 
+#: waskaweb/templates/casemanagement/main.mako:29
+msgid "cm_main_header_data_protection"
+msgstr "Datenschutz"
+
 #: waskaweb/templates/casemanagement/main.mako:33
 msgid "cm_main_print_statement"
 msgstr "Erklärung drucken"
@@ -1120,6 +1282,12 @@
 msgid "cm_menu_header_structure"
 msgstr "Gliederung"
 
+#: waskaweb/templates/casemanagement/new.mako:6
+#: waskaweb/templates/casemanagement/dialogs/alert.mako:6
+#: waskaweb/templates/casemanagement/static_form/statement.mako:6
+msgid "cm_np_new"
+msgstr "Fallakte anlegen"
+
 #: waskaweb/templates/casemanagement/new.mako:32
 msgid "cm_new_p_please_consider_statement"
 msgstr ""
@@ -1135,53 +1303,37 @@
 "personenbezogener Daten wurde bereits zur Eingangsamnese bzw. Beratung vor "
 "dem Case Management eingeholt."
 
-#: waskaweb/templates/casemanagement/new_appointment.mako:16
+#: waskaweb/templates/casemanagement/new_appointment.mako:17
 msgid "cm_menu_link_appointment_back"
 msgstr "Zurück zu: Terminübersicht"
 
-#: waskaweb/templates/casemanagement/organisation.mako:5
+#: waskaweb/templates/casemanagement/organisation.mako:6
 msgid "cm_np_organisation"
 msgstr "Organisation"
 
-#: waskaweb/templates/casemanagement/organisation.mako:10
-msgid "cm_header_organisation"
-msgstr "Organisation"
-
-#: waskaweb/templates/casemanagement/organisation.mako:13
+#: waskaweb/templates/casemanagement/organisation.mako:14
 msgid "cm_organisation_con_whois_cm_replace"
 msgstr ""
 "Diese Seite zeigt an, wer der Mitarbeiter dieser Fallakte ist und wer die "
 "Vertretung für die Bearbeitung übernimmt."
 
-#: waskaweb/templates/casemanagement/organisation.mako:14
+#: waskaweb/templates/casemanagement/organisation.mako:15
 msgid "cm_header_organisation_editor"
 msgstr "Bearbeiter"
 
-#: waskaweb/templates/casemanagement/organisation.mako:17
+#: waskaweb/templates/casemanagement/organisation.mako:18
 msgid "cm_organisation_tbl_label_lastname"
 msgstr "Nachname"
 
-#: waskaweb/templates/casemanagement/organisation.mako:20
+#: waskaweb/templates/casemanagement/organisation.mako:21
 msgid "cm_organisation_tbl_label_firstname"
 msgstr "Vorname"
 
-#: waskaweb/templates/casemanagement/organisation.mako:23
+#: waskaweb/templates/casemanagement/organisation.mako:24
 msgid "cm_organisation_tbl_label_telephone"
 msgstr "Telefon"
 
-#: waskaweb/templates/casemanagement/organisation.mako:34
-msgid "cm_form_editor_submit"
-msgstr "Fallakte übertragen"
-
-#: waskaweb/templates/casemanagement/organisation.mako:37
-msgid "cm_header_standin"
-msgstr "Vertretung"
-
-#: waskaweb/templates/casemanagement/organisation.mako:57
-msgid "cm_form_standin_submit"
-msgstr "Vertretung ändern"
-
-#: waskaweb/templates/casemanagement/organisation.mako:62
+#: waskaweb/templates/casemanagement/organisation.mako:74
 msgid "cm_organisation_table_cm"
 msgstr "Bearbeiter"
 
@@ -1192,8 +1344,8 @@
 #: waskaweb/templates/casemanagement/overview.mako:11
 msgid "cm_overview_con_list_dossiers_admin"
 msgstr ""
-"Hier wird eine Auflistung aller Fallakten der Kompetenzagenturder Fälle des "
-"angemeldeten Benutzers angezeigt"
+"Hier wird eine Auflistung aller Fallakten der Kompetenzagentur bzw. der "
+"Fälle des angemeldeten Benutzers angezeigt"
 
 #: waskaweb/templates/casemanagement/overview.mako:15
 msgid "cm_overview_con_list_dossiers_cm"
@@ -1204,38 +1356,10 @@
 msgid "cm_header_search"
 msgstr "Suche"
 
-#: waskaweb/templates/casemanagement/overview.mako:22
+#: waskaweb/templates/casemanagement/overview.mako:23
 msgid "cm_form_overview_search_submit"
 msgstr "Suchen"
 
-#: waskaweb/templates/casemanagement/overview.mako:30
-msgid "cm_overview_tbl_header_id"
-msgstr "Knr."
-
-#: waskaweb/templates/casemanagement/overview.mako:31
-msgid "cm_overview_tbl_header_firstname"
-msgstr "Vorname"
-
-#: waskaweb/templates/casemanagement/overview.mako:32
-msgid "cm_overview_tbl_header_lastname"
-msgstr "Name"
-
-#: waskaweb/templates/casemanagement/overview.mako:33
-msgid "cm_overview_tbl_header_actions"
-msgstr "Aktionen"
-
-#: waskaweb/templates/casemanagement/overview.mako:56
-msgid "cm_overview_a_show"
-msgstr "Anzeigen"
-
-#: waskaweb/templates/casemanagement/overview.mako:58
-msgid "cm_overview_a_delete"
-msgstr "Löschen"
-
-#: waskaweb/templates/casemanagement/overview.mako:66
-msgid "cm_overview_tbl_no_data_found"
-msgstr "Es wurden keine Datensätze gefunden."
-
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:11
 msgid "cm_rg_aid_overview_header_overview_support_offer"
 msgstr "Übersicht Unterstützungsangebote"
@@ -1256,89 +1380,92 @@
 msgid "cm_rg_aid_overview_table_actions"
 msgstr "Aktionen"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:44
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:46
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:48
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:63
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:65
 msgid "cm_rg_aid_overview_table_show"
 msgstr "Anzeigen"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:49
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:51
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:68
 msgid "cm_rg_aid_overview_table_"
 msgstr "Löschen"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:56
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:78
 msgid "cm_rg_aid_overview_table_no_offer_found"
 msgstr "Keine Angebote gefunden"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_legend"
 msgstr "Legende:"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_bb"
 msgstr "(BB)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_common_educational_area"
 msgstr "Allgemein bildenden Bereich"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_bv"
 msgstr "(BV)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_vocational_preparation"
 msgstr "Bereich der Berufsvorbereitung"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_bq"
 msgstr "(BQ)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_qualifications"
 msgstr "Berufliche Qualifizierung"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_lb"
 msgstr "(LB)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_life_skills"
 msgstr "Lebensbewältigung"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:66
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:88
 msgid "cm_rg_aid_overview_legend_new_offer"
 msgstr "Neues Angebot hinzufügen"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:68
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:90
 msgid "cm_rg_aid_overview_option_common_educational_area"
 msgstr "allg. bildender Bereich (BB)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:69
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:91
 msgid "cm_rg_aid_overview_option_vocational_preparation"
 msgstr "Berufsvorbereitung (BV)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:70
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:92
 msgid "cm_rg_aid_overview_option_qualifications"
 msgstr "berufl. Qualifizierung (BQ)"
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:71
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:93
 msgid "cm_rg_aid_overview_option_life_skills"
 msgstr "Lebensbewältigung (LB)"
 
-#: waskaweb/templates/casemanagement/upload.mako:5
+#: waskaweb/templates/casemanagement/upload.mako:6
 #: waskaweb/templates/casemanagement/dialogs/notificate_import_dub.mako:6
 msgid "cm_np_import"
-msgstr "Importieren"
+msgstr "Fallakte importieren"
 
-#: waskaweb/templates/casemanagement/upload.mako:7
+#: waskaweb/templates/casemanagement/upload.mako:8
 msgid "cm_header_import"
 msgstr "Fallakte importieren"
 
-#: waskaweb/templates/casemanagement/upload.mako:11
+#: waskaweb/templates/casemanagement/upload.mako:12
 msgid "cm_from_import_label_file"
 msgstr "PDF-Formular"
 
-#: waskaweb/templates/casemanagement/upload.mako:14
+#: waskaweb/templates/casemanagement/upload.mako:15
 msgid "cm_from_import_submit"
 msgstr "Importieren"
 
@@ -1420,49 +1547,50 @@
 msgstr "Neue Anlage hinzufügen"
 
 #: waskaweb/templates/documents/case_overview.mako:27
-#: waskaweb/templates/documents/global_overview.mako:27
+#: waskaweb/templates/documents/global_overview.mako:26
 msgid "doc_overview_tbl_header_filename"
 msgstr "Dateiname"
 
 #: waskaweb/templates/documents/case_overview.mako:28
-#: waskaweb/templates/documents/global_overview.mako:28
+#: waskaweb/templates/documents/global_overview.mako:27
 msgid "doc_overview_tbl_header_filesize"
 msgstr "Dateigröße"
 
 #: waskaweb/templates/documents/case_overview.mako:29
-#: waskaweb/templates/documents/global_overview.mako:29
+#: waskaweb/templates/documents/global_overview.mako:28
 msgid "doc_overview_tbl_header_actions"
 msgstr "Aktionen"
 
-#: waskaweb/templates/documents/case_overview.mako:40
-#: waskaweb/templates/documents/global_overview.mako:37
+#: waskaweb/templates/documents/case_overview.mako:42
+#: waskaweb/templates/documents/case_overview.mako:51
+#: waskaweb/templates/documents/global_overview.mako:38
+#: waskaweb/templates/documents/global_overview.mako:49
 msgid "doc_overview_tbl_show"
 msgstr "Anzeigen"
 
-#: waskaweb/templates/documents/case_overview.mako:41
-#: waskaweb/templates/documents/global_overview.mako:39
+#: waskaweb/templates/documents/case_overview.mako:43
+#: waskaweb/templates/documents/case_overview.mako:52
+#: waskaweb/templates/documents/global_overview.mako:40
+#: waskaweb/templates/documents/global_overview.mako:51
 msgid "doc_overview_tbl_delete"
 msgstr "Löschen"
 
-#: waskaweb/templates/documents/case_overview.mako:48
-#: waskaweb/templates/documents/global_overview.mako:47
+#: waskaweb/templates/documents/case_overview.mako:61
+#: waskaweb/templates/documents/global_overview.mako:61
 msgid "doc_overview_nofilesfound"
 msgstr "Es wurden keine Dateien gefunden"
 
 #: waskaweb/templates/documents/global_overview.mako:6
 #: waskaweb/templates/documents/global_upload.mako:4
-msgid "doc_np_root"
-msgstr "Dokumente"
-
-#: waskaweb/templates/documents/global_overview.mako:7
+#: waskaweb/templates/documents/dialogs/confirm.mako:4
 msgid "doc_np_overview"
 msgstr "Dokumentenübersicht"
 
-#: waskaweb/templates/documents/global_overview.mako:11
+#: waskaweb/templates/documents/global_overview.mako:10
 msgid "doc_header_overview"
 msgstr "Dokumentenübersicht"
 
-#: waskaweb/templates/documents/global_overview.mako:17
+#: waskaweb/templates/documents/global_overview.mako:16
 msgid "doc_actions_link_new"
 msgstr "Neues Dokument hinzufügen"
 
@@ -1478,6 +1606,10 @@
 msgid "menu_doc_link_overview_back"
 msgstr "Zurück zu: Dokumentenübersicht"
 
+#: waskaweb/templates/documents/dialogs/confirm.mako:5
+msgid "doc_np_delete"
+msgstr "Dokument lösschen"
+
 #: waskaweb/templates/start/responsible.mako:4
 msgid "responsible_info_sponsorship"
 msgstr "Information zur Trägerschaft"
@@ -1544,15 +1676,15 @@
 msgid "statement_np_edit"
 msgstr "Einverständniserklärung setzen"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:6
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:7
 msgid "cm_np_show"
 msgstr "Fallakte anzeigen"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:9
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:10
 msgid "statement_dialog_header_statement_no"
 msgstr "Fehlende Einverständniserklärung"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:10
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:11
 msgid "statement_dialog_p_statement_no_explanation"
 msgstr ""
 "Für die gewählte Fallakte liegt noch keine Einverständniserklärung seitens "
@@ -1560,36 +1692,36 @@
 "enthalten. Die entsprechende Einhaltung der gesetzlichen Bestimmungen liegt "
 "in Ihrer Verantwortung."
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:12
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:13
 msgid "statement_dialog_p_options"
 msgstr "Sie haben nun folgende Möglichkeiten:"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:14
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
 msgid "statement_dialog_li_statement_set"
 msgstr "Erklärung jetzt setzen"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:14
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
 msgid "statement_dialog_li_statement_set_explanation"
 msgstr ""
 ", wenn der Status zur Einverständniserklärung inzwischen geklärt wurde."
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:16
 msgid "statement_dialog_li_statement_not_set"
 msgstr "Erklärung weiterhin unklar"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:16
 msgid "statement_dialog_li_statement_not_set_explanation"
 msgstr ", wenn die Einverständniserklärung noch eingeholt werden soll."
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:18
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:19
 msgid "statement_dialog_a_statement_set"
 msgstr "Erklärung jetzt setzen"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:19
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:20
 msgid "statement_dialog_a_statement_not_set"
 msgstr "Erklärung weiterhin unklar"
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:23
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:24
 msgid "statement_dialog_a_ok"
 msgstr "OK"
 
@@ -1661,7 +1793,7 @@
 msgid "usrset_form_changestandin_standin"
 msgstr "VertreterIn"
 
-#: waskaweb/templates/usersettings/edit_standin.mako:36
+#: waskaweb/templates/usersettings/edit_standin.mako:40
 msgid "usrset_form_changestandin_submit"
 msgstr "Vertretung setzen"
 
@@ -1677,6 +1809,12 @@
 msgid "usersettings_p_overview_personal_data"
 msgstr "Hier sehen sie eine Übersicht Ihrer persönlichen Daten."
 
+#~ msgid "doc_np_root"
+#~ msgstr "Dokumente"
+
+#~ msgid "np_text"
+#~ msgstr "Sie sind hier: "
+
 #~ msgid "start_header_appointments_period"
 #~ msgstr "Termine"
 

Modified: trunk/waskaweb/i18n/waskaweb.pot
===================================================================
--- trunk/waskaweb/i18n/waskaweb.pot	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/i18n/waskaweb.pot	2008-08-13 13:04:40 UTC (rev 16)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: waskaweb 0.0.0\n"
 "Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2007-11-28 04:58+0100\n"
+"POT-Creation-Date: 2007-12-17 14:36+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -49,84 +49,82 @@
 msgid "logout_p_login_again"
 msgstr ""
 
-#: waskaweb/templates/main.mako:39
-msgid "np_text"
-msgstr ""
-
-#: waskaweb/templates/main.mako:62
+#: waskaweb/templates/main.mako:66
 msgid "statusbar_logininfo"
 msgstr ""
 
-#: waskaweb/templates/main.mako:69 waskaweb/templates/main.mako:99
+#: waskaweb/templates/main.mako:73 waskaweb/templates/main.mako:103
 msgid "sm_menu_link_home"
 msgstr ""
 
-#: waskaweb/templates/main.mako:70
+#: waskaweb/templates/main.mako:74
 msgid "sm_menu_link_help"
 msgstr ""
 
-#: waskaweb/templates/main.mako:71
+#: waskaweb/templates/main.mako:75
 msgid "sm_menu_link_settings"
 msgstr ""
 
-#: waskaweb/templates/main.mako:73
+#: waskaweb/templates/main.mako:77
 msgid "sm_menu_link_logout"
 msgstr ""
 
-#: waskaweb/templates/main.mako:79 waskaweb/templates/main.mako:97
+#: waskaweb/templates/main.mako:83 waskaweb/templates/main.mako:101
 msgid "np_root"
 msgstr ""
 
-#: waskaweb/templates/main.mako:102
+#: waskaweb/templates/main.mako:106
+#: waskaweb/templates/appointments/dialogs/confirm.mako:4
+#: waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako:5
 msgid "menu_app_link_overview"
 msgstr ""
 
-#: waskaweb/templates/main.mako:105
+#: waskaweb/templates/main.mako:109
 msgid "menu_doc_link_overview"
 msgstr ""
 
-#: waskaweb/templates/main.mako:114
+#: waskaweb/templates/main.mako:118
 msgid "menu_header_cm"
 msgstr ""
 
-#: waskaweb/templates/main.mako:116
+#: waskaweb/templates/main.mako:120
 msgid "menu_cm_link_overview"
 msgstr ""
 
-#: waskaweb/templates/main.mako:119
+#: waskaweb/templates/main.mako:123
 msgid "menu_cm_link_new"
 msgstr ""
 
-#: waskaweb/templates/main.mako:121
+#: waskaweb/templates/main.mako:125
 msgid "menu_cm_link_import"
 msgstr ""
 
-#: waskaweb/templates/main.mako:124
+#: waskaweb/templates/main.mako:128
 #: waskaweb/templates/casemanagement/evaluation.mako:8
 msgid "cm_actions_link_evaluate"
 msgstr ""
 
-#: waskaweb/templates/main.mako:133
+#: waskaweb/templates/main.mako:141
 msgid "menu_header_adm"
 msgstr ""
 
-#: waskaweb/templates/main.mako:135
+#: waskaweb/templates/main.mako:143
 msgid "menu_adm_link_useroverview"
 msgstr ""
 
-#: waskaweb/templates/main.mako:138
+#: waskaweb/templates/main.mako:146
 msgid "menu_adm_link_showsettings"
 msgstr ""
 
-#: waskaweb/templates/main.mako:152
+#: waskaweb/templates/main.mako:160
 msgid "main_formular_input_error"
 msgstr ""
 
-#: waskaweb/templates/main.mako:175
+#: waskaweb/templates/main.mako:183
 msgid "footer_title"
 msgstr ""
 
-#: waskaweb/templates/main.mako:175
+#: waskaweb/templates/main.mako:183
 msgid "footer_version"
 msgstr ""
 
@@ -151,14 +149,15 @@
 msgid "adm_con_ad_contact_admin"
 msgstr ""
 
+#: waskaweb/templates/administration/delete_user_helper.mako:6
 #: waskaweb/templates/administration/edit_settings.mako:5
-#: waskaweb/templates/administration/edit_user.mako:4
+#: waskaweb/templates/administration/edit_user.mako:5
 #: waskaweb/templates/administration/new_user.mako:5
-#: waskaweb/templates/administration/new_user_result.mako:5
-#: waskaweb/templates/administration/overview_user.mako:5
-#: waskaweb/templates/administration/reset_password.mako:5
+#: waskaweb/templates/administration/new_user_result.mako:6
+#: waskaweb/templates/administration/overview_user.mako:6
+#: waskaweb/templates/administration/reset_password.mako:6
 #: waskaweb/templates/administration/settings.mako:4
-#: waskaweb/templates/administration/show_settings.mako:5
+#: waskaweb/templates/administration/show_settings.mako:6
 #: waskaweb/templates/administration/show_user.mako:5
 #: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:5
 #: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:5
@@ -166,131 +165,167 @@
 msgid "adm_np_root"
 msgstr ""
 
+#: waskaweb/templates/administration/delete_user_helper.mako:7
+#: waskaweb/templates/administration/edit_user.mako:6
+#: waskaweb/templates/administration/new_user.mako:6
+#: waskaweb/templates/administration/new_user_result.mako:7
+#: waskaweb/templates/administration/overview_user.mako:7
+#: waskaweb/templates/administration/reset_password.mako:7
+#: waskaweb/templates/administration/show_user.mako:6
+#: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:6
+#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:6
+msgid "adm_np_overview"
+msgstr ""
+
+#: waskaweb/templates/administration/delete_user_helper.mako:8
+#: waskaweb/templates/administration/dialogs/notificate_deleteuser.mako:6
+msgid "adm_np_deleteuser"
+msgstr ""
+
+#: waskaweb/templates/administration/delete_user_helper.mako:9
+msgid "adm_np_deleteuser_helper"
+msgstr ""
+
+#: waskaweb/templates/administration/delete_user_helper.mako:13
+msgid "cm_header_delete_user_helper"
+msgstr ""
+
+#: waskaweb/templates/administration/delete_user_helper.mako:16
+msgid "cm_delete_user_helper_explain_explain"
+msgstr ""
+
+#: waskaweb/templates/administration/delete_user_helper.mako:25
+#: waskaweb/templates/casemanagement/bundle_editor.mako:26
+#: waskaweb/templates/casemanagement/organisation.mako:35
+msgid "cm_form_editor_submit"
+msgstr ""
+
 #: waskaweb/templates/administration/edit_settings.mako:6
+#: waskaweb/templates/administration/show_settings.mako:7
+msgid "adm_np_showsettings"
+msgstr ""
+
+#: waskaweb/templates/administration/edit_settings.mako:7
 msgid "adm_np_editsettings"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:11
+#: waskaweb/templates/administration/edit_settings.mako:12
 msgid "adm_header_editsettings"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:16
+#: waskaweb/templates/administration/edit_settings.mako:17
 msgid "adm_actions_link_showsettings"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:22
+#: waskaweb/templates/administration/edit_settings.mako:23
 msgid "adm_con_es_editsettings"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:27
-#: waskaweb/templates/administration/show_settings.mako:25
+#: waskaweb/templates/administration/edit_settings.mako:28
+#: waskaweb/templates/administration/show_settings.mako:26
 msgid "adm_form_settings_kaname"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:36
-#: waskaweb/templates/administration/show_settings.mako:29
+#: waskaweb/templates/administration/edit_settings.mako:37
+#: waskaweb/templates/administration/show_settings.mako:30
 msgid "adm_form_settings_fkz"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:53
-#: waskaweb/templates/administration/show_settings.mako:33
+#: waskaweb/templates/administration/edit_settings.mako:54
+#: waskaweb/templates/administration/show_settings.mako:34
 msgid "adm_form_settings_anontransfer"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_settings.mako:70
+#: waskaweb/templates/administration/edit_settings.mako:71
 msgid "adm_form_settings_save"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:5
-#: waskaweb/templates/administration/new_user.mako:6
-#: waskaweb/templates/administration/new_user_result.mako:6
-#: waskaweb/templates/administration/overview_user.mako:6
-#: waskaweb/templates/administration/reset_password.mako:6
-#: waskaweb/templates/administration/show_user.mako:6
-#: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:6
-#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:6
-msgid "adm_np_overview"
+#: waskaweb/templates/administration/edit_user.mako:7
+#: waskaweb/templates/administration/reset_password.mako:8
+#: waskaweb/templates/administration/show_user.mako:7
+#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:7
+msgid "adm_np_showuser"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:6
+#: waskaweb/templates/administration/edit_user.mako:8
 msgid "adm_np_edituser"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:10
+#: waskaweb/templates/administration/edit_user.mako:12
 msgid "adm_header_edituser"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:15
+#: waskaweb/templates/administration/edit_user.mako:17
 msgid "adm_actions_link_userpassreset"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:16
+#: waskaweb/templates/administration/edit_user.mako:18
 msgid "menu_adm_link_useredit_back"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:25
+#: waskaweb/templates/administration/edit_user.mako:27
 #: waskaweb/templates/administration/new_user.mako:28
-#: waskaweb/templates/administration/new_user_result.mako:21
+#: waskaweb/templates/administration/new_user_result.mako:22
 #: waskaweb/templates/administration/show_user_body.mako:2
 #: waskaweb/templates/administration/userform_body.mako:4
 msgid "adm_form_legend_personal"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:28
+#: waskaweb/templates/administration/edit_user.mako:30
 #: waskaweb/templates/administration/new_user.mako:31
 #: waskaweb/templates/administration/userform_body.mako:7
 msgid "adm_form_user_firstname"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:36
+#: waskaweb/templates/administration/edit_user.mako:38
 #: waskaweb/templates/administration/new_user.mako:39
 #: waskaweb/templates/administration/userform_body.mako:12
 msgid "adm_form_user_lastname"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:44
+#: waskaweb/templates/administration/edit_user.mako:46
 #: waskaweb/templates/administration/new_user.mako:47
 #: waskaweb/templates/administration/userform_body.mako:17
 msgid "adm_form_user_telephone"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:49
+#: waskaweb/templates/administration/edit_user.mako:51
 msgid "adm_form_user_roomnumer"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:54
+#: waskaweb/templates/administration/edit_user.mako:56
 #: waskaweb/templates/administration/new_user.mako:57
 msgid "adm_form_user_branchoffice"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:58
+#: waskaweb/templates/administration/edit_user.mako:60
 #: waskaweb/templates/administration/new_user.mako:61
-#: waskaweb/templates/administration/new_user_result.mako:44
+#: waskaweb/templates/administration/new_user_result.mako:45
 #: waskaweb/templates/administration/userform_body.mako:21
 #: waskaweb/templates/usersettings/change_password_login.mako:17
 msgid "adm_form_legend_login"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:76
+#: waskaweb/templates/administration/edit_user.mako:78
 #: waskaweb/templates/administration/new_user.mako:79
 #: waskaweb/templates/administration/userform_body.mako:28
 msgid "adm_form_user_activated"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:84
+#: waskaweb/templates/administration/edit_user.mako:86
 #: waskaweb/templates/administration/new_user.mako:83
 #: waskaweb/templates/administration/userform_body.mako:36
 msgid "adm_form_user_newpass"
 msgstr ""
 
-#: waskaweb/templates/administration/edit_user.mako:87
+#: waskaweb/templates/administration/edit_user.mako:89
 #: waskaweb/templates/administration/new_user.mako:86
 #: waskaweb/templates/administration/userform_body.mako:54
 msgid "adm_form_user_submit"
 msgstr ""
 
 #: waskaweb/templates/administration/new_user.mako:7
-#: waskaweb/templates/administration/new_user_result.mako:7
+#: waskaweb/templates/administration/new_user_result.mako:8
 msgid "adm_np_newuser"
 msgstr ""
 
@@ -299,7 +334,7 @@
 msgstr ""
 
 #: waskaweb/templates/administration/new_user.mako:16
-#: waskaweb/templates/administration/new_user_result.mako:16
+#: waskaweb/templates/administration/new_user_result.mako:17
 #: waskaweb/templates/administration/show_user.mako:17
 msgid "menu_adm_link_useroverview_back"
 msgstr ""
@@ -317,87 +352,88 @@
 msgid "adm_form_user_role"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:11
+#: waskaweb/templates/administration/new_user_result.mako:12
 msgid "adm_header_newuser_Result"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:24
+#: waskaweb/templates/administration/new_user_result.mako:25
 msgid "adm_form_label_forename"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:28
+#: waskaweb/templates/administration/new_user_result.mako:29
 msgid "adm_form_label_name"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:32
+#: waskaweb/templates/administration/new_user_result.mako:33
 msgid "adm_form_label_phone"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:36
+#: waskaweb/templates/administration/new_user_result.mako:37
 msgid "adm_form_label_room"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:40
+#: waskaweb/templates/administration/new_user_result.mako:41
 msgid "adm_form_label_agency"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:47
+#: waskaweb/templates/administration/new_user_result.mako:48
 msgid "adm_form_label_login"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:51
+#: waskaweb/templates/administration/new_user_result.mako:52
 msgid "adm_form_label_password"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:55
+#: waskaweb/templates/administration/new_user_result.mako:56
 msgid "adm_form_label_role"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:59
+#: waskaweb/templates/administration/new_user_result.mako:60
 msgid "adm_form_label_activated"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:62
+#: waskaweb/templates/administration/new_user_result.mako:63
 msgid "adm_form_is_activated_yes"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:64
+#: waskaweb/templates/administration/new_user_result.mako:65
 msgid "adm_form_is_activated_no"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:69
+#: waskaweb/templates/administration/new_user_result.mako:70
 msgid "adm_form_label_login_pw"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:72
+#: waskaweb/templates/administration/new_user_result.mako:73
 msgid "adm_form_needs_pw_yes"
 msgstr ""
 
-#: waskaweb/templates/administration/new_user_result.mako:74
+#: waskaweb/templates/administration/new_user_result.mako:75
 msgid "adm_form_needs_pw_no"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:12
+#: waskaweb/templates/administration/overview_user.mako:13
 msgid "adm_header_overview"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:17
+#: waskaweb/templates/administration/overview_user.mako:18
 msgid "adm_actions_link_newuser"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:24
+#: waskaweb/templates/administration/overview_user.mako:25
 msgid "adm_overview_tbl_header_lastname"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:25
+#: waskaweb/templates/administration/overview_user.mako:26
 msgid "adm_overview_tbl_header_firstname"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:26
+#: waskaweb/templates/administration/overview_user.mako:27
 msgid "adm_overview_tbl_header_actions"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:33
+#: waskaweb/templates/administration/overview_user.mako:36
+#: waskaweb/templates/administration/overview_user.mako:46
 #: waskaweb/templates/appointments/overview_body.mako:14
 #: waskaweb/templates/appointments/overview_body.mako:22
 #: waskaweb/templates/appointments/overview_body.mako:30
@@ -406,7 +442,8 @@
 msgid "app_overview_body_table_show"
 msgstr ""
 
-#: waskaweb/templates/administration/overview_user.mako:34
+#: waskaweb/templates/administration/overview_user.mako:37
+#: waskaweb/templates/administration/overview_user.mako:47
 #: waskaweb/templates/appointments/overview_body.mako:15
 #: waskaweb/templates/appointments/overview_body.mako:23
 #: waskaweb/templates/appointments/overview_body.mako:38
@@ -414,35 +451,29 @@
 msgid "app_overview_body_table_delete"
 msgstr ""
 
-#: waskaweb/templates/administration/reset_password.mako:7
-#: waskaweb/templates/administration/show_user.mako:7
-#: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:7
-msgid "adm_np_showuser"
-msgstr ""
-
-#: waskaweb/templates/administration/reset_password.mako:8
+#: waskaweb/templates/administration/reset_password.mako:9
 #: waskaweb/templates/administration/dialogs/confirm_resetpassword.mako:8
 #: waskaweb/templates/usersettings/dialogs/notificate_setpassword.mako:5
 msgid "adm_np_resetpassword"
 msgstr ""
 
-#: waskaweb/templates/administration/reset_password.mako:10
+#: waskaweb/templates/administration/reset_password.mako:12
 msgid "adm_header_resetpassword"
 msgstr ""
 
-#: waskaweb/templates/administration/reset_password.mako:11
+#: waskaweb/templates/administration/reset_password.mako:13
 msgid "adm_con_rp_the_password"
 msgstr ""
 
-#: waskaweb/templates/administration/reset_password.mako:11
+#: waskaweb/templates/administration/reset_password.mako:13
 msgid "adm_con_rp_has_been_changed"
 msgstr ""
 
-#: waskaweb/templates/administration/reset_password.mako:11
+#: waskaweb/templates/administration/reset_password.mako:14
 msgid "adm_con_rp_new_pw"
 msgstr ""
 
-#: waskaweb/templates/administration/reset_password.mako:12
+#: waskaweb/templates/administration/reset_password.mako:15
 msgid "adm_con_rp_to_useroverview"
 msgstr ""
 
@@ -462,27 +493,23 @@
 msgid "adm_header_synchronisation"
 msgstr ""
 
-#: waskaweb/templates/administration/show_settings.mako:6
-msgid "adm_np_showsettings"
-msgstr ""
-
-#: waskaweb/templates/administration/show_settings.mako:11
+#: waskaweb/templates/administration/show_settings.mako:12
 msgid "adm_header_showsettings"
 msgstr ""
 
-#: waskaweb/templates/administration/show_settings.mako:16
+#: waskaweb/templates/administration/show_settings.mako:17
 msgid "adm_actions_link_editsettings"
 msgstr ""
 
-#: waskaweb/templates/administration/show_settings.mako:22
+#: waskaweb/templates/administration/show_settings.mako:23
 msgid "adm_con_ss_view_agency"
 msgstr ""
 
-#: waskaweb/templates/administration/show_settings.mako:36
+#: waskaweb/templates/administration/show_settings.mako:37
 msgid "adm_form_settings_anontransfer_yes"
 msgstr ""
 
-#: waskaweb/templates/administration/show_settings.mako:38
+#: waskaweb/templates/administration/show_settings.mako:39
 msgid "adm_form_settings_anontransfer_no"
 msgstr ""
 
@@ -556,39 +583,10 @@
 msgid "adm_form_user_passwd_confirm"
 msgstr ""
 
-#: waskaweb/templates/administration/dialogs/alert.mako:5
-#: waskaweb/templates/casemanagement/evaluation.mako:4
-#: waskaweb/templates/casemanagement/evaluation_result.mako:5
-#: waskaweb/templates/casemanagement/main.mako:8
-#: waskaweb/templates/casemanagement/new.mako:5
-#: waskaweb/templates/casemanagement/overview.mako:6
-#: waskaweb/templates/casemanagement/upload.mako:4
-#: waskaweb/templates/casemanagement/dialogs/alert.mako:5
-#: waskaweb/templates/casemanagement/dialogs/confirm.mako:5
-#: waskaweb/templates/casemanagement/dialogs/notificate_import_dub.mako:5
-#: waskaweb/templates/casemanagement/dialogs/notificate_printall.mako:5
-#: waskaweb/templates/casemanagement/static_form/statement.mako:5
-#: waskaweb/templates/casemanagement/static_form/statement_print.mako:5
-#: waskaweb/templates/statement/dialogs/confirm.mako:5
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:5
-msgid "cm_np_root"
-msgstr ""
-
-#: waskaweb/templates/administration/dialogs/alert.mako:6
-#: waskaweb/templates/casemanagement/new.mako:6
-#: waskaweb/templates/casemanagement/dialogs/alert.mako:6
-#: waskaweb/templates/casemanagement/static_form/statement.mako:6
-msgid "cm_np_new"
-msgstr ""
-
 #: waskaweb/templates/administration/dialogs/confirm_deleteuser.mako:7
 msgid "adm_np_delteuser"
 msgstr ""
 
-#: waskaweb/templates/administration/dialogs/notificate_deleteuser.mako:6
-msgid "adm_np_deleteuser"
-msgstr ""
-
 #: waskaweb/templates/appointments/appointment_form.mako:6
 msgid "app_form_label_title"
 msgstr ""
@@ -636,23 +634,26 @@
 #: waskaweb/templates/appointments/new.mako:4
 #: waskaweb/templates/appointments/overview.mako:4
 #: waskaweb/templates/appointments/show.mako:4
-#: waskaweb/templates/appointments/beta/show_10.mako:4
+#: waskaweb/templates/appointments/beta/show_1.mako:4
+#: waskaweb/templates/appointments/beta/show_2.mako:4
+#: waskaweb/templates/appointments/beta/show_3.mako:4
+#: waskaweb/templates/appointments/beta/show_4.mako:4
 #: waskaweb/templates/appointments/beta/show_5.mako:4
 #: waskaweb/templates/appointments/beta/show_6.mako:4
 #: waskaweb/templates/appointments/beta/show_7.mako:4
-#: waskaweb/templates/appointments/beta/show_8.mako:4
-#: waskaweb/templates/appointments/beta/show_9.mako:4
-#: waskaweb/templates/casemanagement/new_appointment.mako:5
-msgid "app_np_root"
+#: waskaweb/templates/appointments/dialogs/confirm.mako:5
+#: waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako:6
+#: waskaweb/templates/casemanagement/appointments.mako:5
+msgid "app_np_list"
 msgstr ""
 
 #: waskaweb/templates/appointments/new.mako:5
-#: waskaweb/templates/casemanagement/new_appointment.mako:6
+#: waskaweb/templates/casemanagement/new_appointment.mako:7
 msgid "app_np_new"
 msgstr ""
 
 #: waskaweb/templates/appointments/new.mako:9
-#: waskaweb/templates/casemanagement/new_appointment.mako:10
+#: waskaweb/templates/casemanagement/new_appointment.mako:11
 msgid "cm_app_header_new"
 msgstr ""
 
@@ -666,23 +667,18 @@
 msgid "menu_app_link_overview_back"
 msgstr ""
 
-#: waskaweb/templates/appointments/overview.mako:5
-#: waskaweb/templates/casemanagement/appointments.mako:5
-msgid "app_np_list"
-msgstr ""
-
-#: waskaweb/templates/appointments/overview.mako:10
-#: waskaweb/templates/appointments/overview.mako:24
+#: waskaweb/templates/appointments/overview.mako:9
+#: waskaweb/templates/appointments/overview.mako:23
 #: waskaweb/templates/casemanagement/appointments.mako:10
 msgid "app_header_overview"
 msgstr ""
 
-#: waskaweb/templates/appointments/overview.mako:15
+#: waskaweb/templates/appointments/overview.mako:14
 #: waskaweb/templates/casemanagement/appointments.mako:17
 msgid "app_actions_link_newappointment"
 msgstr ""
 
-#: waskaweb/templates/appointments/overview.mako:27
+#: waskaweb/templates/appointments/overview.mako:26
 msgid "app_con_list_all_appointments"
 msgstr ""
 
@@ -705,11 +701,11 @@
 msgstr ""
 
 #: waskaweb/templates/appointments/show.mako:5
-#: waskaweb/templates/appointments/beta/show_1.mako:4
+#: waskaweb/templates/appointments/beta/show_1.mako:5
 #: waskaweb/templates/appointments/beta/show_10.mako:5
-#: waskaweb/templates/appointments/beta/show_2.mako:4
-#: waskaweb/templates/appointments/beta/show_3.mako:4
-#: waskaweb/templates/appointments/beta/show_4.mako:4
+#: waskaweb/templates/appointments/beta/show_2.mako:5
+#: waskaweb/templates/appointments/beta/show_3.mako:5
+#: waskaweb/templates/appointments/beta/show_4.mako:5
 #: waskaweb/templates/appointments/beta/show_5.mako:5
 #: waskaweb/templates/appointments/beta/show_6.mako:5
 #: waskaweb/templates/appointments/beta/show_7.mako:5
@@ -719,11 +715,11 @@
 msgstr ""
 
 #: waskaweb/templates/appointments/show.mako:9
-#: waskaweb/templates/appointments/beta/show_1.mako:9
+#: waskaweb/templates/appointments/beta/show_1.mako:10
 #: waskaweb/templates/appointments/beta/show_10.mako:10
-#: waskaweb/templates/appointments/beta/show_2.mako:9
-#: waskaweb/templates/appointments/beta/show_3.mako:8
-#: waskaweb/templates/appointments/beta/show_4.mako:9
+#: waskaweb/templates/appointments/beta/show_2.mako:10
+#: waskaweb/templates/appointments/beta/show_3.mako:9
+#: waskaweb/templates/appointments/beta/show_4.mako:10
 #: waskaweb/templates/appointments/beta/show_5.mako:10
 #: waskaweb/templates/appointments/beta/show_6.mako:10
 #: waskaweb/templates/appointments/beta/show_7.mako:9
@@ -733,10 +729,10 @@
 msgstr ""
 
 #: waskaweb/templates/appointments/show.mako:14
-#: waskaweb/templates/appointments/beta/show_1.mako:14
-#: waskaweb/templates/appointments/beta/show_2.mako:14
-#: waskaweb/templates/appointments/beta/show_3.mako:13
-#: waskaweb/templates/appointments/beta/show_4.mako:14
+#: waskaweb/templates/appointments/beta/show_1.mako:15
+#: waskaweb/templates/appointments/beta/show_2.mako:15
+#: waskaweb/templates/appointments/beta/show_3.mako:14
+#: waskaweb/templates/appointments/beta/show_4.mako:15
 msgid "sm_menu_link_home_back"
 msgstr ""
 
@@ -752,17 +748,95 @@
 msgid "app_table_description"
 msgstr ""
 
+#: waskaweb/templates/appointments/beta/show_10.mako:4
+#: waskaweb/templates/appointments/beta/show_8.mako:4
+#: waskaweb/templates/appointments/beta/show_9.mako:4
+#: waskaweb/templates/casemanagement/new_appointment.mako:6
+msgid "app_np_root"
+msgstr ""
+
+#: waskaweb/templates/appointments/dialogs/confirm.mako:6
+#: waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako:7
+msgid "app_np_delete"
+msgstr ""
+
 #: waskaweb/templates/casemanagement/appointments.mako:4
 #: waskaweb/templates/casemanagement/digest.mako:5
 #: waskaweb/templates/casemanagement/formular.mako:34
-#: waskaweb/templates/casemanagement/new_appointment.mako:4
-#: waskaweb/templates/casemanagement/organisation.mako:4
+#: waskaweb/templates/casemanagement/new_appointment.mako:5
+#: waskaweb/templates/casemanagement/organisation.mako:5
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:6
 #: waskaweb/templates/documents/case_new.mako:4
 #: waskaweb/templates/documents/case_overview.mako:5
 msgid "cm_np_select"
 msgstr ""
 
+#: waskaweb/templates/casemanagement/bundle_editor.mako:10
+#: waskaweb/templates/casemanagement/bundle_standin.mako:10
+#: waskaweb/templates/casemanagement/organisation.mako:11
+msgid "cm_header_organisation"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_editor.mako:13
+msgid "cm_bundle_editor_explain"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:13
+#: waskaweb/templates/casemanagement/organisation.mako:38
+msgid "cm_header_standin"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:14
+msgid "cm_bundle_standin_explain"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:16
+msgid "cm_bundle_standin_explain_cm_ka"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:28
+msgid "attention"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:28
+msgid "cm_bundle_standin_explain_attention"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/bundle_standin.mako:50
+#: waskaweb/templates/casemanagement/organisation.mako:69
+msgid "cm_form_standin_submit"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:6
+msgid "cm_overview_tbl_header_id"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:7
+msgid "cm_overview_tbl_header_firstname"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:8
+msgid "cm_overview_tbl_header_lastname"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:9
+msgid "cm_overview_tbl_header_actions"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:20
+#: waskaweb/templates/casemanagement/caselist.mako:33
+msgid "cm_overview_a_show"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:22
+#: waskaweb/templates/casemanagement/caselist.mako:35
+msgid "cm_overview_a_delete"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/caselist.mako:45
+msgid "cm_overview_tbl_no_data_found"
+msgstr ""
+
 #: waskaweb/templates/casemanagement/create_export_scheme.mako:2
 msgid "cm_header_export_createscheme"
 msgstr ""
@@ -779,52 +853,69 @@
 msgid "cm_header_digest"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:14
+#: waskaweb/templates/casemanagement/digest.mako:16
 msgid "cm_digest_con_digest_dossier"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:15
+#: waskaweb/templates/casemanagement/digest.mako:18
 msgid "cm_header_digest_personal"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:18
+#: waskaweb/templates/casemanagement/digest.mako:21
 msgid "cm_digest_tbl_label_lastname"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:22
+#: waskaweb/templates/casemanagement/digest.mako:25
 msgid "cm_digest_tbl_label_firstname"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:26
+#: waskaweb/templates/casemanagement/digest.mako:29
 msgid "cm_digest_tbl_label_caseid"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:30
+#: waskaweb/templates/casemanagement/digest.mako:33
 msgid "cm_digest_tbl_label_age"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:34
+#: waskaweb/templates/casemanagement/digest.mako:37
 msgid "cm_digest_header_address"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:37
+#: waskaweb/templates/casemanagement/digest.mako:40
 msgid "cm_digest_tbl_label_street"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:41
+#: waskaweb/templates/casemanagement/digest.mako:44
 msgid "cm_digest_tbl_label_plz"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:45
+#: waskaweb/templates/casemanagement/digest.mako:48
 msgid "cm_digest_tbl_label_city"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/digest.mako:49
+#: waskaweb/templates/casemanagement/digest.mako:52
 msgid "cm_digest_tbl_label_telephone"
 msgstr ""
 
+#: waskaweb/templates/casemanagement/evaluation.mako:4
+#: waskaweb/templates/casemanagement/evaluation_result.mako:6
+#: waskaweb/templates/casemanagement/main.mako:8
+#: waskaweb/templates/casemanagement/new.mako:5
+#: waskaweb/templates/casemanagement/overview.mako:6
+#: waskaweb/templates/casemanagement/upload.mako:5
+#: waskaweb/templates/casemanagement/dialogs/alert.mako:5
+#: waskaweb/templates/casemanagement/dialogs/confirm.mako:5
+#: waskaweb/templates/casemanagement/dialogs/notificate_import_dub.mako:5
+#: waskaweb/templates/casemanagement/dialogs/notificate_printall.mako:5
+#: waskaweb/templates/casemanagement/static_form/statement.mako:5
+#: waskaweb/templates/casemanagement/static_form/statement_print.mako:5
+#: waskaweb/templates/statement/dialogs/confirm.mako:5
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:5
+msgid "cm_np_root"
+msgstr ""
+
 #: waskaweb/templates/casemanagement/evaluation.mako:5
-#: waskaweb/templates/casemanagement/evaluation_result.mako:6
+#: waskaweb/templates/casemanagement/evaluation_result.mako:7
 msgid "cm_np_evaluate"
 msgstr ""
 
@@ -832,43 +923,42 @@
 msgid "cm_header_evaluate"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:7
+#: waskaweb/templates/casemanagement/evaluation_result.mako:8
 msgid "cm_np_evaluate_result"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:9
+#: waskaweb/templates/casemanagement/evaluation_result.mako:10
 msgid "cm_header_evaluate_result"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:11
+#: waskaweb/templates/casemanagement/evaluation_result.mako:12
 msgid "cm_eval_summary_header_1"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:12
+#: waskaweb/templates/casemanagement/evaluation_result.mako:13
 msgid "cm_eval_summary_header_2"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:13
+#: waskaweb/templates/casemanagement/evaluation_result.mako:14
 msgid "cm_eval_summary_header_3"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:14
+#: waskaweb/templates/casemanagement/evaluation_result.mako:15
 msgid "cm_eval_summary_header_4"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:15
+#: waskaweb/templates/casemanagement/evaluation_result.mako:16
 msgid "cm_eval_summary_header_5"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:16
+#: waskaweb/templates/casemanagement/evaluation_result.mako:17
 msgid "cm_eval_summary_header_6"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:17
+#: waskaweb/templates/casemanagement/evaluation_result.mako:18
 msgid "cm_eval_summary_header_7"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:22
 #: waskaweb/templates/casemanagement/evaluation_result.mako:23
 #: waskaweb/templates/casemanagement/evaluation_result.mako:24
 #: waskaweb/templates/casemanagement/evaluation_result.mako:25
@@ -877,123 +967,184 @@
 #: waskaweb/templates/casemanagement/evaluation_result.mako:28
 #: waskaweb/templates/casemanagement/evaluation_result.mako:29
 #: waskaweb/templates/casemanagement/evaluation_result.mako:30
+#: waskaweb/templates/casemanagement/evaluation_result.mako:31
 msgid "cm_actions_link_export_evaluate"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:35
+#: waskaweb/templates/casemanagement/evaluation_result.mako:36
 msgid "cm_eval_header_1"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:38
+#: waskaweb/templates/casemanagement/evaluation_result.mako:39
+msgid "cm_eval_table_adolescent"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:40
+#: waskaweb/templates/casemanagement/evaluation_result.mako:97
+#: waskaweb/templates/casemanagement/evaluation_result.mako:125
+#: waskaweb/templates/casemanagement/evaluation_result.mako:157
+#: waskaweb/templates/casemanagement/evaluation_result.mako:176
+#: waskaweb/templates/casemanagement/evaluation_result.mako:206
+#: waskaweb/templates/casemanagement/evaluation_result.mako:238
+#: waskaweb/templates/casemanagement/evaluation_result.mako:271
+#: waskaweb/templates/casemanagement/evaluation_result.mako:301
+msgid "cm_eval_table_number"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:41
+#: waskaweb/templates/casemanagement/evaluation_result.mako:98
+#: waskaweb/templates/casemanagement/evaluation_result.mako:126
+#: waskaweb/templates/casemanagement/evaluation_result.mako:158
+#: waskaweb/templates/casemanagement/evaluation_result.mako:177
+#: waskaweb/templates/casemanagement/evaluation_result.mako:207
+#: waskaweb/templates/casemanagement/evaluation_result.mako:239
+#: waskaweb/templates/casemanagement/evaluation_result.mako:272
+#: waskaweb/templates/casemanagement/evaluation_result.mako:302
+msgid "cm_eval_table_percent"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:45
 msgid "cm_eval_table_consult_customer"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:44
+#: waskaweb/templates/casemanagement/evaluation_result.mako:51
 msgid "cm_eval_table_taken_over_to_cm"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:50
-#: waskaweb/templates/casemanagement/evaluation_result.mako:70
-#: waskaweb/templates/casemanagement/evaluation_result.mako:95
-#: waskaweb/templates/casemanagement/evaluation_result.mako:107
-#: waskaweb/templates/casemanagement/evaluation_result.mako:119
-#: waskaweb/templates/casemanagement/evaluation_result.mako:134
-#: waskaweb/templates/casemanagement/evaluation_result.mako:146
-#: waskaweb/templates/casemanagement/evaluation_result.mako:160
-#: waskaweb/templates/casemanagement/evaluation_result.mako:175
-#: waskaweb/templates/casemanagement/evaluation_result.mako:187
+#: waskaweb/templates/casemanagement/evaluation_result.mako:57
+#: waskaweb/templates/casemanagement/evaluation_result.mako:89
+#: waskaweb/templates/casemanagement/evaluation_result.mako:120
+#: waskaweb/templates/casemanagement/evaluation_result.mako:150
+#: waskaweb/templates/casemanagement/evaluation_result.mako:168
+#: waskaweb/templates/casemanagement/evaluation_result.mako:201
+#: waskaweb/templates/casemanagement/evaluation_result.mako:231
+#: waskaweb/templates/casemanagement/evaluation_result.mako:263
+#: waskaweb/templates/casemanagement/evaluation_result.mako:296
+#: waskaweb/templates/casemanagement/evaluation_result.mako:326
 msgid "cm_eval_table_to_overview"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:50
-#: waskaweb/templates/casemanagement/evaluation_result.mako:70
-#: waskaweb/templates/casemanagement/evaluation_result.mako:95
-#: waskaweb/templates/casemanagement/evaluation_result.mako:107
-#: waskaweb/templates/casemanagement/evaluation_result.mako:119
-#: waskaweb/templates/casemanagement/evaluation_result.mako:134
-#: waskaweb/templates/casemanagement/evaluation_result.mako:146
-#: waskaweb/templates/casemanagement/evaluation_result.mako:160
-#: waskaweb/templates/casemanagement/evaluation_result.mako:175
-#: waskaweb/templates/casemanagement/evaluation_result.mako:187
+#: waskaweb/templates/casemanagement/evaluation_result.mako:57
+#: waskaweb/templates/casemanagement/evaluation_result.mako:89
+#: waskaweb/templates/casemanagement/evaluation_result.mako:120
+#: waskaweb/templates/casemanagement/evaluation_result.mako:150
+#: waskaweb/templates/casemanagement/evaluation_result.mako:168
+#: waskaweb/templates/casemanagement/evaluation_result.mako:201
+#: waskaweb/templates/casemanagement/evaluation_result.mako:231
+#: waskaweb/templates/casemanagement/evaluation_result.mako:263
+#: waskaweb/templates/casemanagement/evaluation_result.mako:296
+#: waskaweb/templates/casemanagement/evaluation_result.mako:326
 msgid "cm_eval_table_export_analysis"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:53
+#: waskaweb/templates/casemanagement/evaluation_result.mako:60
 msgid "cm_eval_header_2"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:56
+#: waskaweb/templates/casemanagement/evaluation_result.mako:63
 msgid "cm_eval_table_month"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:57
+#: waskaweb/templates/casemanagement/evaluation_result.mako:64
 msgid "cm_eval_table_completed"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:58
+#: waskaweb/templates/casemanagement/evaluation_result.mako:65
 msgid "cm_eval_table_aborted"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:73
+#: waskaweb/templates/casemanagement/evaluation_result.mako:92
 msgid "cm_eval_header_3"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:74
+#: waskaweb/templates/casemanagement/evaluation_result.mako:93
 msgid "cm_eval_header_on_gender"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:77
+#: waskaweb/templates/casemanagement/evaluation_result.mako:96
+msgid "cm_eval_table_gender"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:102
 msgid "cm_eval_label_male"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:83
+#: waskaweb/templates/casemanagement/evaluation_result.mako:108
 msgid "cm_eval_label_female"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:89
+#: waskaweb/templates/casemanagement/evaluation_result.mako:114
 msgid "cm_eval_label_intersexual"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:96
+#: waskaweb/templates/casemanagement/evaluation_result.mako:121
 msgid "cm_eval_header_on_age"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:110
+#: waskaweb/templates/casemanagement/evaluation_result.mako:124
+msgid "cm_eval_table_age"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:153
 msgid "cm_eval_header_4"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:113
+#: waskaweb/templates/casemanagement/evaluation_result.mako:156
+msgid "cm_eval_table_category"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:162
 msgid "cm_eval_label_migration_background"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:122
+#: waskaweb/templates/casemanagement/evaluation_result.mako:171
 msgid "cm_eval_header_5"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:123
+#: waskaweb/templates/casemanagement/evaluation_result.mako:172
 msgid "cm_eval_header_access_youngster_to_agency"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:135
+#: waskaweb/templates/casemanagement/evaluation_result.mako:175
+msgid "cm_eval_table_access"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:202
 msgid "cm_eval_head_law_access_agency"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:149
+#: waskaweb/templates/casemanagement/evaluation_result.mako:205
+msgid "cm_eval_table_law"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:234
 msgid "cm_eval_header_6"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:163
+#: waskaweb/templates/casemanagement/evaluation_result.mako:237
+msgid "cm_eval_table_offer"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:266
 msgid "cm_eval_header_7"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:164
+#: waskaweb/templates/casemanagement/evaluation_result.mako:267
 msgid "cm_eval_head_where_to_place_youngster"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/evaluation_result.mako:176
+#: waskaweb/templates/casemanagement/evaluation_result.mako:270
+msgid "cm_eval_table_place"
+msgstr ""
+
+#: waskaweb/templates/casemanagement/evaluation_result.mako:297
 msgid "cm_eval_header_law_changed_after_place"
 msgstr ""
 
+#: waskaweb/templates/casemanagement/evaluation_result.mako:300
+msgid "cm_eval_table_law_change"
+msgstr ""
+
 #: waskaweb/templates/casemanagement/export.mako:4
 msgid "cm_np_root<"
 msgstr ""
@@ -1023,17 +1174,17 @@
 msgstr ""
 
 #: waskaweb/templates/casemanagement/formular.mako:17
-#: waskaweb/templates/casemanagement/formular.mako:72
+#: waskaweb/templates/casemanagement/formular.mako:71
 msgid "cm_actions_link_show"
 msgstr ""
 
 #: waskaweb/templates/casemanagement/formular.mako:19
-#: waskaweb/templates/casemanagement/formular.mako:74
+#: waskaweb/templates/casemanagement/formular.mako:73
 msgid "cm_actions_link_edit"
 msgstr ""
 
 #: waskaweb/templates/casemanagement/formular.mako:22
-#: waskaweb/templates/casemanagement/formular.mako:79
+#: waskaweb/templates/casemanagement/formular.mako:76
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:18
 msgid "cm_actions_link_printout"
 msgstr ""
@@ -1048,6 +1199,7 @@
 
 #: waskaweb/templates/casemanagement/main.mako:9
 #: waskaweb/templates/casemanagement/overview.mako:7
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:6
 msgid "cm_np_overview"
 msgstr ""
 
@@ -1059,6 +1211,10 @@
 msgid "cm_info_nr"
 msgstr ""
 
+#: waskaweb/templates/casemanagement/main.mako:29
+msgid "cm_main_header_data_protection"
+msgstr ""
+
 #: waskaweb/templates/casemanagement/main.mako:33
 msgid "cm_main_print_statement"
 msgstr ""
@@ -1103,6 +1259,12 @@
 msgid "cm_menu_header_structure"
 msgstr ""
 
+#: waskaweb/templates/casemanagement/new.mako:6
+#: waskaweb/templates/casemanagement/dialogs/alert.mako:6
+#: waskaweb/templates/casemanagement/static_form/statement.mako:6
+msgid "cm_np_new"
+msgstr ""
+
 #: waskaweb/templates/casemanagement/new.mako:32
 msgid "cm_new_p_please_consider_statement"
 msgstr ""
@@ -1111,51 +1273,35 @@
 msgid "cm_new_con_acceptance_statement_true"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/new_appointment.mako:16
+#: waskaweb/templates/casemanagement/new_appointment.mako:17
 msgid "cm_menu_link_appointment_back"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:5
+#: waskaweb/templates/casemanagement/organisation.mako:6
 msgid "cm_np_organisation"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:10
-msgid "cm_header_organisation"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/organisation.mako:13
+#: waskaweb/templates/casemanagement/organisation.mako:14
 msgid "cm_organisation_con_whois_cm_replace"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:14
+#: waskaweb/templates/casemanagement/organisation.mako:15
 msgid "cm_header_organisation_editor"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:17
+#: waskaweb/templates/casemanagement/organisation.mako:18
 msgid "cm_organisation_tbl_label_lastname"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:20
+#: waskaweb/templates/casemanagement/organisation.mako:21
 msgid "cm_organisation_tbl_label_firstname"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:23
+#: waskaweb/templates/casemanagement/organisation.mako:24
 msgid "cm_organisation_tbl_label_telephone"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/organisation.mako:34
-msgid "cm_form_editor_submit"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/organisation.mako:37
-msgid "cm_header_standin"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/organisation.mako:57
-msgid "cm_form_standin_submit"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/organisation.mako:62
+#: waskaweb/templates/casemanagement/organisation.mako:74
 msgid "cm_organisation_table_cm"
 msgstr ""
 
@@ -1175,38 +1321,10 @@
 msgid "cm_header_search"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/overview.mako:22
+#: waskaweb/templates/casemanagement/overview.mako:23
 msgid "cm_form_overview_search_submit"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/overview.mako:30
-msgid "cm_overview_tbl_header_id"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:31
-msgid "cm_overview_tbl_header_firstname"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:32
-msgid "cm_overview_tbl_header_lastname"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:33
-msgid "cm_overview_tbl_header_actions"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:56
-msgid "cm_overview_a_show"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:58
-msgid "cm_overview_a_delete"
-msgstr ""
-
-#: waskaweb/templates/casemanagement/overview.mako:66
-msgid "cm_overview_tbl_no_data_found"
-msgstr ""
-
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:11
 msgid "cm_rg_aid_overview_header_overview_support_offer"
 msgstr ""
@@ -1227,89 +1345,92 @@
 msgid "cm_rg_aid_overview_table_actions"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:44
 #: waskaweb/templates/casemanagement/rg_aid_overview.mako:46
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:48
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:63
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:65
 msgid "cm_rg_aid_overview_table_show"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:49
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:51
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:68
 msgid "cm_rg_aid_overview_table_"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:56
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:78
 msgid "cm_rg_aid_overview_table_no_offer_found"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_legend"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_bb"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_common_educational_area"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_bv"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_vocational_preparation"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_bq"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_qualifications"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_lb"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:61
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:83
 msgid "cm_rg_aid_overview_legend_life_skills"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:66
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:88
 msgid "cm_rg_aid_overview_legend_new_offer"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:68
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:90
 msgid "cm_rg_aid_overview_option_common_educational_area"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:69
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:91
 msgid "cm_rg_aid_overview_option_vocational_preparation"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:70
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:92
 msgid "cm_rg_aid_overview_option_qualifications"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/rg_aid_overview.mako:71
+#: waskaweb/templates/casemanagement/rg_aid_overview.mako:93
 msgid "cm_rg_aid_overview_option_life_skills"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/upload.mako:5
+#: waskaweb/templates/casemanagement/upload.mako:6
 #: waskaweb/templates/casemanagement/dialogs/notificate_import_dub.mako:6
 msgid "cm_np_import"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/upload.mako:7
+#: waskaweb/templates/casemanagement/upload.mako:8
 msgid "cm_header_import"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/upload.mako:11
+#: waskaweb/templates/casemanagement/upload.mako:12
 msgid "cm_from_import_label_file"
 msgstr ""
 
-#: waskaweb/templates/casemanagement/upload.mako:14
+#: waskaweb/templates/casemanagement/upload.mako:15
 msgid "cm_from_import_submit"
 msgstr ""
 
@@ -1391,49 +1512,50 @@
 msgstr ""
 
 #: waskaweb/templates/documents/case_overview.mako:27
-#: waskaweb/templates/documents/global_overview.mako:27
+#: waskaweb/templates/documents/global_overview.mako:26
 msgid "doc_overview_tbl_header_filename"
 msgstr ""
 
 #: waskaweb/templates/documents/case_overview.mako:28
-#: waskaweb/templates/documents/global_overview.mako:28
+#: waskaweb/templates/documents/global_overview.mako:27
 msgid "doc_overview_tbl_header_filesize"
 msgstr ""
 
 #: waskaweb/templates/documents/case_overview.mako:29
-#: waskaweb/templates/documents/global_overview.mako:29
+#: waskaweb/templates/documents/global_overview.mako:28
 msgid "doc_overview_tbl_header_actions"
 msgstr ""
 
-#: waskaweb/templates/documents/case_overview.mako:40
-#: waskaweb/templates/documents/global_overview.mako:37
+#: waskaweb/templates/documents/case_overview.mako:42
+#: waskaweb/templates/documents/case_overview.mako:51
+#: waskaweb/templates/documents/global_overview.mako:38
+#: waskaweb/templates/documents/global_overview.mako:49
 msgid "doc_overview_tbl_show"
 msgstr ""
 
-#: waskaweb/templates/documents/case_overview.mako:41
-#: waskaweb/templates/documents/global_overview.mako:39
+#: waskaweb/templates/documents/case_overview.mako:43
+#: waskaweb/templates/documents/case_overview.mako:52
+#: waskaweb/templates/documents/global_overview.mako:40
+#: waskaweb/templates/documents/global_overview.mako:51
 msgid "doc_overview_tbl_delete"
 msgstr ""
 
-#: waskaweb/templates/documents/case_overview.mako:48
-#: waskaweb/templates/documents/global_overview.mako:47
+#: waskaweb/templates/documents/case_overview.mako:61
+#: waskaweb/templates/documents/global_overview.mako:61
 msgid "doc_overview_nofilesfound"
 msgstr ""
 
 #: waskaweb/templates/documents/global_overview.mako:6
 #: waskaweb/templates/documents/global_upload.mako:4
-msgid "doc_np_root"
-msgstr ""
-
-#: waskaweb/templates/documents/global_overview.mako:7
+#: waskaweb/templates/documents/dialogs/confirm.mako:4
 msgid "doc_np_overview"
 msgstr ""
 
-#: waskaweb/templates/documents/global_overview.mako:11
+#: waskaweb/templates/documents/global_overview.mako:10
 msgid "doc_header_overview"
 msgstr ""
 
-#: waskaweb/templates/documents/global_overview.mako:17
+#: waskaweb/templates/documents/global_overview.mako:16
 msgid "doc_actions_link_new"
 msgstr ""
 
@@ -1449,6 +1571,10 @@
 msgid "menu_doc_link_overview_back"
 msgstr ""
 
+#: waskaweb/templates/documents/dialogs/confirm.mako:5
+msgid "doc_np_delete"
+msgstr ""
+
 #: waskaweb/templates/start/responsible.mako:4
 msgid "responsible_info_sponsorship"
 msgstr ""
@@ -1505,47 +1631,47 @@
 msgid "statement_np_edit"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:6
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:7
 msgid "cm_np_show"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:9
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:10
 msgid "statement_dialog_header_statement_no"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:10
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:11
 msgid "statement_dialog_p_statement_no_explanation"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:12
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:13
 msgid "statement_dialog_p_options"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:14
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
 msgid "statement_dialog_li_statement_set"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:14
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
 msgid "statement_dialog_li_statement_set_explanation"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:16
 msgid "statement_dialog_li_statement_not_set"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:15
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:16
 msgid "statement_dialog_li_statement_not_set_explanation"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:18
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:19
 msgid "statement_dialog_a_statement_set"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:19
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:20
 msgid "statement_dialog_a_statement_not_set"
 msgstr ""
 
-#: waskaweb/templates/statement/dialogs/missing_statement.mako:23
+#: waskaweb/templates/statement/dialogs/missing_statement.mako:24
 msgid "statement_dialog_a_ok"
 msgstr ""
 
@@ -1609,7 +1735,7 @@
 msgid "usrset_form_changestandin_standin"
 msgstr ""
 
-#: waskaweb/templates/usersettings/edit_standin.mako:36
+#: waskaweb/templates/usersettings/edit_standin.mako:40
 msgid "usrset_form_changestandin_submit"
 msgstr ""
 

Modified: trunk/waskaweb/lib/app_globals.py
===================================================================
--- trunk/waskaweb/lib/app_globals.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/app_globals.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -55,8 +55,8 @@
 
         if not host   is None: security.HOST   = host
         if not port   is None: security.PORT   = int(port)
-        if not dbname is None: security.DBNAME = dbname
-        if not user   is None: security.USER   = user
+        if not dbname is None: security.DBNAME = u"%s" % dbname
+        if not user   is None: security.USER   = u"%s" % user
 
         # data for pdf2xfa connections
         pdf_host = config.get('pdf2xfa_host')

Modified: trunk/waskaweb/lib/base.py
===================================================================
--- trunk/waskaweb/lib/base.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/base.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -3,44 +3,45 @@
 Provides the BaseController class for subclassing, and other objects
 utilized by Controllers.
 """
-from pylons import c, cache, config, g, request, response, session
-from pylons.controllers import WSGIController
-from pylons.controllers.util import abort, etag_cache, redirect_to
-from pylons.decorators import jsonify, validate
-from pylons.i18n import _, ungettext, N_
-from pylons.templating import render
+from paste.httpexceptions       import HTTPNotFound
+from pylons                     import c, cache, config, g, request, response, session
+from pylons.controllers         import WSGIController
+from pylons.controllers.util    import abort, etag_cache, redirect_to
+from pylons.decorators          import jsonify, validate
+from pylons.i18n                import _, ungettext, N_
+from pylons.templating          import render
 
-import waskaweb.lib.helpers as h
-import waskaweb.model as model
+import waskaweb.lib.helpers     as h
+import waskaweb.model           as model
 
-import waskaweb.lib.db as db
+import waskaweb.lib.db          as db
 
-from waskaweb.lib.security import HOST, PORT, DBNAME, USER, getDbName
+#from paste.httpexceptions import HTTPUnauthorized
 
+from waskaweb.lib.security import \
+    HOST, PORT, DBNAME, USER, getDbName, userIdentity
+
 import sys
+import md5
 
-POSITIVE = [
-    "ie6.css",
-    "all.css",
-    "screen.css",
-    "print.css",
-    "logo_ka_75.png",
-    "eu_logo_4c_pos_web2.jpg",
-    "BMFSFJ_C_M_web.jpg",
-    "favicon.ico"
-]
-
-def inPositive(path):
-    for p in POSITIVE:
-        if path.endswith(p):
-            return True
-    return False
-
 class BaseController(WSGIController):
     def __init__(self):
         self.db = None
 
     def __before__(self):
+
+        try:
+            storedHash = session['AUTH']
+            try:
+                shared = request.cookies['waska_auth']
+            except KeyError:
+                raise HTTPUnauthorized()
+
+            if storedHash != md5.new(shared + userIdentity()).digest():
+                raise HTTPUnauthorized()
+        except KeyError:
+            pass
+
         # Check if the user is already authorized. 
         # If not then redirect the user to the login page
         try:
@@ -70,7 +71,7 @@
         except KeyError:
             p = str(request.path_info)
             if not p in ( '/waska/login', '/waska/loginAction'):# and not inPositive(p):
-                print >> sys.stderr, "Redirect to: '%s' %s" % (request.path_info, str(inPositive(p)))
+                print >> sys.stderr, "Redirect to: '%s'" % request.path_info
                 redirect_to(h.url_for(controller='/waska', action='login'))
 
     def __call__(self, environ, start_response):
@@ -86,8 +87,39 @@
                 self.db = None
                 db.leave(_db)
                 _db.closeConnections()
+
+    def _checkInt(self, i):
+        try:
+            return int(i)
+        except (TypeError, ValueError):
+            self.showError()
+
+    def _checkBool(self, bool):
+            confirmed = self._checkInt(bool) 
+            if confirmed not in [0,1]: self.showError()
+            return confirmed == 1
+
+    def showError(self, err=None):
+        raise HTTPNotFound()
             
 
+class CaseBaseController(BaseController):
+    
+    def __init__(self):
+        BaseController.__init__(self)
+        self.case_session = None
+        self.case_navigation = None
+
+    def __before__(self):
+        BaseController.__before__(self)
+        self.case_session = session.get('case')
+        self.case_navigation = session.get('case_navigation')
+
+    def __after__(self):
+        BaseController.__after__(self)
+        #session.save()
+
+
 # Include the '_' function in the public names
 __all__ = [__name for __name in locals().keys() if not __name.startswith('_') \
            or __name == '_']

Modified: trunk/waskaweb/lib/casedata.py
===================================================================
--- trunk/waskaweb/lib/casedata.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/casedata.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -21,720 +21,14 @@
 
 
 #sql statements used by the DSFactory
-GET_ALL_DS_SQL = """
-SELECT id FROM master_tbl_view WHERE 
-  einverstaendniserklaerung <> 0
-  ORDER by name_1
-"""
 
-SEARCH_DS_SQL = """
-SELECT id FROM master_tbl_view WHERE
-  einverstaendniserklaerung <> 0 AND
-  (vorname_1 ~* %(needle)s OR
-   name_1 ~* %(needle)s OR
-   kundennummer ~* %(needle)s)
-   ORDER by name_1
-"""
-
-# admin_ka is supposed to see all cases
-ADM_GET_ALL_DS_SQL = """
-SELECT id FROM master_tbl_view
-  ORDER by name_1
-"""
-
-ADM_SEARCH_DS_SQL = """
-SELECT id FROM master_tbl_view WHERE
-  vorname_1 ~* %(needle)s OR
-  name_1 ~* %(needle)s OR
-  kundennummer ~* %(needle)s
-  ORDER by name_1
-"""
-
 #other sql statements
-LOAD_DS_SQL = """SELECT bearbeiter_id FROM master_tbl_view WHERE id = %(id)s"""
-LOAD_STANDIN_SQL = """SELECT n.benutzer_id FROM nm_benutzer_master_tbl_view n
-                        JOIN master_tbl_view m ON 
-                        m.id = n.master_id
-                        WHERE m.id = %(id)s"""
-ADD_STANDIN_SQL = """SELECT create_nm_benutzer_master_ds(%(userid)s, %(caseid)s)"""
-DELETE_STANDIN_SQL = """SELECT delete_nm_benutzer_master_ds(%(userid)s, %(caseid)s)"""
-SET_EDITOR_SQL = """SELECT set_case_editor(%(userid)s, %(caseid)s)"""
-
-DELETE_DS_SQL = """SELECT delete_master_ds(%d)"""
-CREATE_DS_SQL = """SELECT create_master_ds()"""
-INIT_AGENCY_SQL  = """UPDATE page_0_view SET name_kompetenzagentur = %(ka_name)s, fkz = %(fkz)s, vorname = %(vorname)s, name = %(nachname)s WHERE id = %(id)s"""
-
 CREATE_RG_KOMPETENZ_DS = """SELECT create_rg_kompetenz_ds(%(id)s)"""
 CREATE_RG_SPRACHE_DS   = """SELECT create_rg_sprache_ds(%(id)s)"""
 CREATE_RG_MASSNAHME_DS = """SELECT create_rg_massnahme_ds(%(id)s)"""
 
-CREATE_RG_BILDEN_DS    = """SELECT create_rg_bilden_ds(%(id)s)"""
-CREATE_RG_LEBEN_DS     = """SELECT create_rg_leben_ds(%(id)s)"""
-CREATE_RG_QUALI_DS     = """SELECT create_rg_quali_ds(%(id)s)"""
-CREATE_RG_BERUF_DS     = """SELECT create_rg_beruf_ds(%(id)s)"""
-DELETE_RG_BILDEN_DS = """select delete_rg_bilden_ds(%(id)s)"""
-DELETE_RG_LEBEN_DS  = """select delete_rg_leben_ds(%(id)s)"""
-DELETE_RG_QUALI_DS = """select delete_rg_quali_ds(%(id)s)"""
-DELETE_RG_BERUF_DS = """select delete_rg_beruf_ds(%(id)s)"""
-
-FETCH_AID_LIST_SQL = """SELECT id FROM %s WHERE master_id = %s"""
-
-AID_0_DB_TBL = "rg_angebote_bildenden_bereich_tbl_view"
-AID_1_DB_TBL = "rg_angebote_berufsvorbereitung_tbl_view"
-AID_2_DB_TBL = "rg_angebote_berufliche_qualifizierung_tbl_view"
-AID_3_DB_TBL = "rg_angebote_lebensbewaeltigung_tbl_view"
-
-FETCH_AID_0_SQL = """SELECT id, angebotsform as form, art_der_unterstuetzung as type, durchfuehrende_institution as institute, unterstuetzung_start as start, unterstuetzung_ende as end FROM rg_angebote_bildenden_bereich_tbl_view WHERE id = %s"""
-FETCH_AID_1_SQL = """SELECT id, angebotsform_1 as form, art_der_unterstuetzung_1 as type, durchfuehrende_institution_1 as institute, unterstuetzung_start_1 as start, unterstuetzung_ende_1 as end FROM rg_angebote_berufsvorbereitung_tbl_view WHERE id = %s"""
-FETCH_AID_2_SQL = """SELECT id, angebotsform_2 as form, angebote_im_bereich as type, durchfuehrende_institution_2 as institute, unterstuetzung_start_2 as start, unterstuetzung_ende_2 as end FROM rg_angebote_berufliche_qualifizierung_tbl_view WHERE id = %s"""
-FETCH_AID_3_SQL = """SELECT id, angebotsform_3 as form, art_der_unterstuetzung_2 as type, durchfuehrende_institution_3 as institute, unterstuetzung_start_3 as start, unterstuetzung_ende_3 as end FROM rg_angebote_lebensbewaeltigung_tbl_view WHERE id = %s"""
-
-FETCH_KOMPETENZ_ID = """SELECT id from rg_kompetenzfestellung_tbl_view WHERE master_id = %(id)s LIMIT 1"""
-
-AID = {"0": ["BB", "14rg", CREATE_RG_BILDEN_DS, AID_0_DB_TBL, DELETE_RG_BILDEN_DS],
-        "1": ["BV", "15rg", CREATE_RG_BERUF_DS, AID_1_DB_TBL, DELETE_RG_BERUF_DS],
-    "2": ["BQ", "16rg", CREATE_RG_QUALI_DS, AID_2_DB_TBL, DELETE_RG_QUALI_DS],
-        "3": ["LB", "17rg", CREATE_RG_LEBEN_DS, AID_3_DB_TBL, DELETE_RG_LEBEN_DS]}
-
-class Id:
-    def __init__(self, id, key, parent):
-        self.id     = id
-        self.key    = key
-        self.parent = parent
-
-    def getIdentifier(self):
-        identifier = []
-        current = self
-        while current:
-            identifier.insert(0, (current.key, current.id))
-            current = current.parent
-        return identifier
-
-class Page(Id):
-
-    def __init__(self, id, key, parent):
-        Id.__init__(self, id, key, parent)
-
-    def isOverview(self):
-        return False
-
-def convert(x):
-    return isinstance(x, str) and unicode(x, 'utf-8') or x
-
-class DataPage(Page):
-    def __init__(self, relation, items, id):
-        self.items     = items # TODO: check for SQL injection
-        self.data      = None
-        self.relation  = relation # TODO: check for SQL injection
-        self.id        = id
-
-    def getData(self, item):
-        if self.data is None:
-            self._fetchData()
-        data = self.data
-        if data is None: return None
-        try:
-            # TODO: Ugly! Better change the db scheme "ja, nein, keine angabe"
-            # fields to int instead of boolean
-            if isinstance(data[item][0], type(True)):
-                return data[item][0] and 1 or 0 
-            return data[item][0]
-        except KeyError:
-            return None
-
-    def setData(self, item, value):
-        if self.data is None:
-            self._fetchData()
-        data = self.data
-        if data is None: return
-        try:
-            v = data[item]
-            # store only if different
-            if v[0] != value:
-                v[0] = value
-                v[1] = True
-        except KeyError:
-            pass
-
-    def store(self):
-        data = self.data
-        if data is None: return
-        fields = {} 
-        keys   = []
-        for k, v in data.iteritems():
-            if v[1]:
-                keys.append("%s=%%(%s)s" % (k, k))
-                fields[k]=v[0]
-
-        if not fields:
-            return
-
-        fields['id'] = int(self.id)
-
-        stmnt = "UPDATE %s SET %s WHERE id = %%(id)s;" % (
-            self.relation, ", ".join(keys))
-
-        try:
-            con, cur = None, None
-            try:
-                con = db.getConnection()
-                cur = con.cursor()
-                #cur.execute(stmnt)
-                cur.execute(stmnt, fields)
-                con.commit()
-            finally:
-                db.recycleConnection(con, cur)
-
-            # mark as written
-            for v in data.itervalues():
-                v[1] = False
-
-        except dbapi.Error, err:
-            print >> sys.stderr, "DB error: %s" % str(err)
-
-
-    def _fetchData(self):
-        try:
-            fields = ", ".join(self.items)
-        except:
-            pass
-        stmnt = "SELECT %s FROM %s WHERE id = %%(id)s;" % (fields, self.relation)
-        try:
-            con, cur = None, None
-            try:
-                con = db.getConnection()
-                cur = con.cursor()
-                cur.execute(stmnt, { 'id': int(self.id)})
-                res = cur.fetchone()
-            finally:
-                db.recycleConnection(con, cur)
-            if res:
-                self.data = dict(
-                    zip(self.items, [[convert(item), False] for item in res]))
-
-        except dbapi.Error, err:
-            print >> sys.stderr, "DB error: %s" % str(err)
-
-class DataSetAidObject:
-    def __init__(self, aid_type=None, id=None, sql=None):
-        self.id = id 
-        self.start_date = "-/-" 
-        self.end_date = "-/-" 
-        self.type = "-/-" 
-        self.institution = "-/-" 
-        self.aid_form = "-/-" 
-        self.type_name = "-/-" 
-
-        self.type_id = aid_type 
-        self.page_id = None
-        try:
-            self.type = AID[str(aid_type)][0] 
-            self.page_id = AID[str(aid_type)][1] 
-        except:
-            pass
-
-        #Do we load an object?
-        if id and sql:
-            self._fetchData(id, sql)
-
-    def _fetchData(self, id, sql):
-        conn, cur = None, None
-        try:
-            try:
-                conn = db.getConnection()
-                cur = conn.cursor()
-                sql = sql % id
-                cur.execute(sql)
-                #print >> sys.stderr, "%s" % sql
-                r = cur.fetchone()
-                # Set data
-                self.id = r[0] 
-                self.form = unicode(str(r[1]), 'utf-8')
-                #self.type = r[2]
-                self.institution = unicode(str(r[3]), 'utf-8')
-                self.start_date = r[4].strftime('%d.%m.%Y')
-                self.end_date = r[5].strftime('%d.%m.%Y')
-            finally:
-                db.recycleConnection(conn, cur)
-        except:
-            pass
-
-    def create(self, case_id):
-        try:
-            conn, cur = None, None
-            try:
-                conn = db.getConnection()
-                cur = conn.cursor()
-                sql = AID[str(self.type_id)][2]
-                cur.execute(sql, { 'id': case_id })
-                r = cur.fetchone()
-                conn.commit()
-                # Set data
-                self.id = r[0]
-            finally:
-                db.recycleConnection(conn, cur)
-        except:
-            traceback.print_exc(file=sys.stderr)
-
-        return self.id
-
-    def delete(self):
-        conn, cur, sql = None, None, None
-        try:
-            try:
-                conn = db.getConnection()
-                cur = conn.cursor()
-                sql = (AID[str(self.type_id)][4]) # get delete function
-                cur.execute(sql, { 'id': self.id })
-                conn.commit()
-            finally:
-                db.recycleConnection(conn, cur)
-        except StandardError, err:
-            print >> sys.stderr, "Error on deleting aid object", str(err), " ", sql 
-        return True
-
-class DataSetAidList:
-    def __init__(self, case_id):
-        self.aid_list = []
-        conn, c = None, None
-        try:
-            try:
-                conn = db.getConnection()
-                # Bildenden Bereich 
-                c = conn.cursor()
-                sql = FETCH_AID_LIST_SQL % (AID_0_DB_TBL, case_id)
-                #print >> sys.stderr, str(sql)
-                c.execute(sql)
-                for r in c.fetchall():
-                    self.aid_list.append(
-                        DataSetAidObject(0, r[0], FETCH_AID_0_SQL))
-                c.close(); c = None
-                # Berufsvorbereitung
-                c = conn.cursor()
-                sql = FETCH_AID_LIST_SQL % (AID_1_DB_TBL, case_id)
-                #print >> sys.stderr, str(sql)
-                c.execute(sql)
-                for r in c.fetchall():
-                    self.aid_list.append(DataSetAidObject(
-                        1, r[0], FETCH_AID_1_SQL))
-                c.close(); c = None
-                # Berufliche Qualifizierung
-                c = conn.cursor()
-                sql = FETCH_AID_LIST_SQL % (AID_2_DB_TBL, case_id)
-                #print >> sys.stderr, str(sql)
-                c.execute(sql)
-                for r in c.fetchall():
-                    self.aid_list.append(
-                        DataSetAidObject(2, r[0], FETCH_AID_2_SQL))
-                c.close(); c = None
-                # Bildenden Bereich 
-                c = conn.cursor()
-                sql = FETCH_AID_LIST_SQL % (AID_3_DB_TBL, case_id)
-                #print >> sys.stderr, str(sql)
-                c.execute(sql)
-                for r in c.fetchall():
-                    self.aid_list.append(DataSetAidObject(
-                        3, r[0], FETCH_AID_3_SQL))
-            finally:
-                db.recycleConnection(conn, c)
-        except StandardError, err:
-            print >> sys.stderr, "%s" % str(err)
-
-    def numDatasets(self):
-        return len(self.aid_list) 
-
-    def getDatasets(self):
-        return self.aid_list
-
-    def listDatasetIds(self, limit, ofs):
-        return [ds.id for ds in self.ds_list]
-
-class DataSetOverviewPage:
-
-    def __init__(self, search_str=None):
-        self.ds_list = []
-
-    def search(self, search_str=None):
-        self.ds_list = []
-        f = DSFactory()
-        for id in f.listDatasetIds(search_str):
-            self.ds_list.append(DataSetOverviewObject(id))
-
-    def numDatasets(self):
-        return len(self.ds_list) 
-
-    def getDatasets(self):
-        return self.ds_list
-
-    def listDatasetIds(self, limit, ofs):
-        return [ds.id for ds in self.ds_list]
-
-class DataSetOverviewObject:
-    def __init__(self, id):
-        self.id = id
-        self.first_name = None
-        self.last_name = None
-        self.knr = None
-        self._loadFromDB(id)
-
-    def _loadFromDB(self, id):
-        try:        
-            conn, c = None, None
-            try:
-                conn = db.getConnection()
-                c = conn.cursor()
-                # XXX: Use prepared statement here
-                sql = """SELECT name_1, vorname_1, kundennummer from master_tbl_view WHERE id = %s""" % str(id)
-                result = None
-                c.execute(sql)
-                result = c.fetchone()
-            finally:
-                db.recycleConnection(conn, c)
-
-            self.last_name  = unicode(str(result[0]), 'utf-8')
-            self.first_name = unicode(str(result[1]), 'utf-8')
-            self.knr        = unicode(str(result[2]), 'utf-8')
-        except:
-            traceback.print_exc(file=sys.stderr)
-
-class TempDigest:
-    def __init__(self, params):
-        self.first_name = params.get('name_1') or '-/-' 
-        self.last_name = params.get('vorname_1') or '-/-' 
-        self.plz = params.get('plz') or '-/-'
-        self.address = params.get('strasse') or '-/-'  
-        self.city = params.get('wohnort') or '-/-'
-
-class DataSetDigest:
-    def __init__(self, id):
-        self.id = id
-        self.first_name = '' 
-        self.last_name = '' 
-        self.knr = '' 
-        self.age = ''
-        self.plz = ''
-        self.city = ''
-        self.address = ''
-        self.telephone = ''
-        self.statement = '' 
-
-        self._loadFromDB(id)
-
-    def hasSignedPrivacyStatement(self):
-        return self.statement
-
-    def _loadFromDB(self, id):
-        try:
-            # XXX: Use prepared statements here
-            sql = """SELECT name_1, 
-                        vorname_1, 
-                        kundennummer,
-                        date_part('year', age(geburtsdatum::timestamp)) as alter,
-                        plz,
-                        strasse,
-                        wohnort,
-                        vorwahl,
-                        telefon_1,
-                        einverstaendniserklaerung
-                        from master_tbl_view WHERE id = %s""" % str(id)
-            result = None
-            conn, c = None, None
-            try:
-                conn = db.getConnection()
-                c    = conn.cursor()
-                c.execute(sql)
-                result = c.fetchone()
-            finally:
-                db.recycleConnection(conn, c)
-            self.last_name  = unicode(str(result[0]), 'utf-8')
-            self.first_name = unicode(str(result[1]), 'utf-8')
-            self.knr        = unicode(str(result[2]), 'utf-8')
-            if result[3]: self.age = "%.0f" % result[3]
-            else:         self.age = ""
-            self.plz         = unicode(str(result[4]), 'utf-8')
-            self.address     = unicode(str(result[5]), 'utf-8')
-            self.city        = unicode(str(result[6]), 'utf-8')
-            self.telephone_1 = u"%s" % unicode(str(result[7]), 'utf-8')
-            self.telephone_2 = u"%s" % unicode(str(result[8]), 'utf-8')
-            self.statement = (result[9] >= 0)
-        except:
-            traceback.print_exc(file=sys.stderr)
-
-class DatasetStandin:
-    def __init__(self, case_id=None):
-        self.case_id = case_id
-        self.user_ids = []
-        self._loadFromDB()
-
-    def _loadFromDB(self):
-        sql = LOAD_STANDIN_SQL
-        fields = {'id': self.case_id}
-        con, cur = None, None
-        try:
-            con = db.getConnection()
-            cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
-            cur.execute(LOAD_STANDIN_SQL, fields)
-            rows = cur.fetchall()
-            for row in rows:
-                self.user_ids.append(row['benutzer_id'])
-        finally:
-            db.recycleConnection(con, cur)
-
-    def getStandin(self):
-        return self.user_ids
-
-    def setStandin(self, userid_list):
-        old = Set(self.getStandin())
-        new = Set(userid_list)
-        self._delete(old - new)
-        self._add(new - old)
-
-    def _delete(self, userid_list):
-        con, cur = None, None
-        fields = {'caseid': self.case_id, 'userid': None}
-        try:
-            con = db.getConnection()
-            for uid in userid_list:
-                fields['userid'] = uid
-                cur = con.cursor()
-                try:
-                    cur.execute(DELETE_STANDIN_SQL, fields)
-                except:
-                    con.rollback()
-                cur.close(); cur = None
-            con.commit()
-        finally:
-            db.recycleConnection(con, cur)
-
-    def _add(self, userid_list):
-        con, cur = None, None
-        fields = {'caseid': self.case_id, 'userid': None}
-        try:
-            con = db.getConnection()
-            for uid in userid_list:
-                fields['userid'] = uid
-                cur = con.cursor()
-                try:
-                    cur.execute(ADD_STANDIN_SQL, fields)
-                except:
-                    con.rollback()
-                cur.close(); cur = None
-            con.commit()
-        finally:
-            db.recycleConnection(con, cur)
-
-class Dataset(Id):
-    def __init__(self, id=None, key=None, parent=None):
-        Id.__init__(self, id, key, parent)
-        self.id = id 
-        self.editor = None
-        if id:
-            self.standin = DatasetStandin(id) 
-            self._loadFromDB()
-
-    def _loadFromDB(self):
-        con, cur = None, None
-        sql = LOAD_DS_SQL
-        fields = {'id': self.id}
-        try:
-            con = db.getConnection()
-            cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
-            cur.execute(LOAD_DS_SQL, fields)
-            row = cur.fetchone()
-            self.editor = row['bearbeiter_id']
-        finally:
-            db.recycleConnection(con, cur)
-
-    def getEditor(self):
-        return self.editor
-
-    def setEditor(self, userid):
-        con, curr = None, None
-        fields = {'caseid': self.id, 'userid': userid}
-        try:
-            con = db.getConnection()
-            cur = con.cursor()
-            try:
-                cur.execute(SET_EDITOR_SQL, fields)
-            except:
-                con.rollback()
-            con.commit()
-        finally:
-            db.recycleConnection(con, cur)
-
-    def getStandin(self):
-        return self.standin.getStandin()
-
-    def setStandin(self, userid_list):
-        self.standin.setStandin(userid_list)
-
-    def numPages(self):
-        return 0
-
-    def getPage(self, id):
-        return None
-
-    def create(self):
-        conn, cur = None, None
-        try:
-            try:
-                conn = db.getConnection()
-                cur  = conn.cursor()
-                cur.execute(CREATE_DS_SQL)
-                self.id = cur.fetchone()[0]
-                conn.commit()
-            finally:
-                db.recycleConnection(conn, cur)
-            # XXX: This a workaround the RGs
-            self.createDependencies()
-        except:
-            traceback.print_exc(file=sys.stderr)
-
-        return self.id 
-
-    def initData(self):
-        conn, cur = None, None
-        try:
-            user = session['USER_AUTHORIZED']
-            agency = Agency()
-            fields = {
-                'ka_name':  agency.getName(), 
-                'vorname':  user.first_name,
-                'nachname': user.last_name,
-                'fkz':      agency.getFKZ(), 
-                'id':       self.id
-                }
-            conn = db.getConnection()
-            cur = conn.cursor()
-            cur.execute(INIT_AGENCY_SQL, fields)
-            conn.commit()
-        finally:
-            db.recycleConnection(conn, cur)
-
-    def createDependencies(self):
-        con, cur = None, None
-        try:
-            con = db.getConnection()
-
-            # create one Kompetenzfestellung
-            cur = con.cursor()
-            cur.execute(CREATE_RG_KOMPETENZ_DS, { 'id': self.id })
-            komp_id = cur.fetchone()[0]
-            cur.close(); cur = None
-
-            # TODO: Uncomment the following as soon as the SP exist.
-            # create three Maßnahmen per master data set
-            #for i in range(3):
-            #    cur = con.cursor()
-            #    cur.execute(CREATE_RG_MASSNAHME_DS, { 'id': komp_id })
-            #    cur.close(); cur = None
-
-            # create three Beherrschungsprache per Kompetenzfestellung
-            #for i in range(3):
-            #    cur = con.cursor()
-            #    cur.execute(CREATE_RG_SPRACHE_DS, { 'id': komp_id })
-            #    cur.close(); cur = None
-
-            # TODO: Uncomment the following as soon as the SP exist.
-            # create three Maßnahmen per master data set
-            #for i in range(3):
-            #    cur = con.cursor()
-            #    cur.execute(CREATE_RG_MASSNAHME_DS, { 'id': komp_id })
-            #    cur.close(); cur = None
-
-            con.commit()
-        finally:
-            db.recycleConnection(con, cur)
-
-    def delete(self):
-        conn, cur = None, None
-        try:
-            try:
-                conn = db.getConnection()
-                cur = conn.cursor()
-                sql = DELETE_DS_SQL % int(self.id)
-                cur.execute(sql)
-                conn.commit()
-                return True
-            finally:
-                db.recycleConnection(conn, cur)
-        except:
-            traceback.print_exc(file=sys.stderr)
-        return False 
-
-class DSFactory:
-
-    def __init__(self):
-        pass
-
-    def getDataset(self, id):
-        return None
-
-    def numDatasets(self):
-        return 0
-
-    def listDatasetIds(self, search_str=None, limit=None, ofs=None):
-        con, cur = None, None
-        ids = []
-        try:
-            con = db.getConnection()
-            cur = con.cursor()
-            # XXX: This is an ugly hack!
-            #isAdm = h.hasRole('admin_ka')
-            if search_str:
-                #query = isAdm and ADM_SEARCH_DS_SQL or SEARCH_DS_SQL
-                query = ADM_SEARCH_DS_SQL
-                cur.execute(query, {'needle': search_str})
-            else:
-                #query = isAdm and ADM_GET_ALL_DS_SQL or GET_ALL_DS_SQL
-                query = ADM_GET_ALL_DS_SQL
-                cur.execute(query)
-            result = cur.fetchall()
-            for r in result:
-                ids.append(r[0])
-        finally:
-            db.recycleConnection(con, cur)
-        return ids 
-
-    def createDataset(self):
-        try:
-            ds = Dataset()
-            ds_id = ds.create()
-            return ds
-        except StandardError, err:
-            print >> sys.stderr, "Fehler beim Anlegen eines Datensatzes: %s" % str(err)
-        return None 
-
-def kompetenzId(id):
-    con, cur = None, None
-    result = None
-    try:
-        con = db.getConnection()
-        # a master dataset has to be created each time
-        cur = con.cursor()
-        cur.execute(FETCH_KOMPETENZ_ID, { 'id': id })
-        row = cur.fetchone()
-        if row: 
-            result = row[0]
-        cur.close(); cur = None
-    finally:
-        db.recycleConnection(con, cur)
-    return result
-
 CASE_EXISTS = "SELECT * FROM case_exists(%(knummer)s)"
 
-def caseExists(knummer):
-    con, cur = None, None
-    try:
-        con = db.getConnection()
-        cur = con.cursor()
-        cur.execute(CASE_EXISTS, { 'knummer': knummer })
-        row = cur.fetchone()
-        if row is None: return False
-        return row[0]
-    finally:
-        db.recycleConnection(con, cur)
-
 CREATE_SQL = {
    'rg_angebote_bildenden_bereich_tbl':         CREATE_RG_BILDEN_DS,
    'rg_angebote_lebensbewaeltigung_tbl':        CREATE_RG_LEBEN_DS,
@@ -742,55 +36,5 @@
    'rg_angebote_berufsvorbereitung_tbl':        CREATE_RG_BERUF_DS
 }
 
-def createTables(relations):
-    masterId, kompetenzId = None, None
 
-    con, cur = None, None
-    createdTables = {}
-    try:
-        con = db.getConnection()
-        # a master dataset has to be created each time
-        cur = con.cursor()
-        cur.execute(CREATE_DS_SQL)
-        masterId = cur.fetchone()[0]
-        cur.close(); cur = None
-        createdTables['master_tbl'] = masterId
-
-        # kompetenz rg has to be created each time
-        cur = con.cursor()
-        cur.execute(CREATE_RG_KOMPETENZ_DS, { 'id': masterId })
-        rid = cur.fetchone()[0]
-        cur.close(); cur = None
-        con.commit()
-
-        createdTables['rg_kompetenzfestellung_tbl'] = rid
-
-        for name, rels, separate in relations:
-            id = None
-            if not separate:
-                id = createdTables.get(name)
-
-            if id is None:
-                try:
-                    stmnt = CREATE_SQL[name]
-                except KeyError:
-                    print >> sys.stderr, "Kann Statement zur Erzeugung von '%s' nicht finden." % name
-                    continue
-                cur = con.cursor()
-                cur.execute(stmnt, { 'id': masterId })
-                id = cur.fetchone()[0]
-                cur.close(); cur = None
-
-            # write the relations
-            for rel in rels:
-                rel.sqlUpdate(con, id)
-
-            if not separate:
-                createdTables[name] = id
-    finally:
-        db.recycleConnection(con, cur)
-
-    return masterId
-
-
 # vim:set ts=4 sw=4 si et sta sts=4:

Modified: trunk/waskaweb/lib/evaluation.py
===================================================================
--- trunk/waskaweb/lib/evaluation.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/evaluation.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -37,11 +37,11 @@
         '''returns current evalution as an UTF-8 encoded string'''
         out = None
         try:
-            Writer = codecs.getwriter('utf-8')
+            Writer = codecs.getwriter('latin-1')
             out = StringIO.StringIO()
-            utf8 = Writer(out)
-            self.doExport(utf8)
-            utf8.flush()
+            latin1 = Writer(out, errors='replace')
+            self.doExport(latin1)
+            latin1.flush()
             return out.getvalue()
         finally:
             if out:
@@ -70,9 +70,9 @@
 
     def doExport(self, f):
         self.perform()
-        f.write(u"Jugendliche;Anzahl;Prozent\n")
-        f.write(u"Erstgespräche;%s;100%%\n" % (self.total))
-        f.write(u"In das CM übernommen;%s;%s%%\n" %(self.total_cm, self.percent))
+        f.write(u"Jugendliche;Anzahl;Prozent\r\n")
+        f.write(u"Erstgespräche;%s;100%%\r\n" % (self.total))
+        f.write(u"In das CM übernommen;%s;%s%%\r\n" %(self.total_cm, self.percent))
 
 class Evaluation_2(Evaluation):
     def __init__(self):
@@ -123,10 +123,10 @@
 
     def doExport(self, f):
         self.perform()
-        f.write(u"Geschlecht;Anzahl;Prozent\n")
-        f.write(u"Männlich;%s;%s%%\n" % (self.m[0], self.m[1]))
-        f.write(u"Weiblich;%s;%s%%\n" %(self.w[0], self.w[1]))
-        f.write(u"Intersexuell;%s;%s%%\n" %(self.i[0], self.i[1]))
+        f.write(u"Geschlecht;Anzahl;Prozent\r\n")
+        f.write(u"Männlich;%s;%s%%\r\n" % (self.m[0], self.m[1]))
+        f.write(u"Weiblich;%s;%s%%\r\n" %(self.w[0], self.w[1]))
+        f.write(u"Intersexuell;%s;%s%%\r\n" %(self.i[0], self.i[1]))
 
 class Evaluation_3(Evaluation):
     """Migrationshintergrund"""
@@ -158,8 +158,8 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write(u"Kategorie;Anzahl;Prozent\n")
-        f.write(u"Migrationshintergrund;%s;%s%%\n" % (p[0], p[1]))
+        f.write(u"Kategorie;Anzahl;Prozent\r\n")
+        f.write(u"Migrationshintergrund;%s;%s%%\r\n" % (p[0], p[1]))
 
 class Evaluation_4(Evaluation):
     """ Zugang der der Jugendichen zu KA"""
@@ -204,9 +204,9 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write(u"Zugang;Anzahl;Prozent\n")
+        f.write(u"Zugang;Anzahl;Prozent\r\n")
         for v in p.itervalues():
-            f.write("%s;%s;%s%%\n" % (v[0], v[1], v[2]))
+            f.write("%s;%s;%s%%\r\n" % (v[0], v[1], v[2]))
 
 class Evaluation_5(Evaluation):
     """Rechtskreis der Jugendlichen beim Zugang zur KA"""
@@ -247,9 +247,9 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write(u"Rechtskreis;Anzahl;Prozent\n")
+        f.write(u"Rechtskreis;Anzahl;Prozent\r\n")
         for v in p.itervalues():
-            f.write(u"%s;%s;%s%%\n" % (v[0], v[1], v[2]))
+            f.write(u"%s;%s;%s%%\r\n" % (v[0], v[1], v[2]))
 
 class Evaluation_6(Evaluation):
     """Vermittlung nach Beendigung"""
@@ -293,9 +293,9 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write("Vermittlung;Anzahl;Prozent\n")
+        f.write("Vermittlung;Anzahl;Prozent\r\n")
         for v in p.itervalues():
-            f.write(u"%s;%s;%s%%\n" % (v[0], v[1], v[2]))
+            f.write(u"%s;%s;%s%%\r\n" % (v[0], v[1], v[2]))
 
 class Evaluation_7(Evaluation):
     """Rechtskreis nach Vermittlung"""
@@ -340,9 +340,9 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write(u"Rechtskreis;Anzahl;Prozent\n")
+        f.write(u"Rechtskreis;Anzahl;Prozent\r\n")
         for v in p.itervalues():
-            f.write(u"%s;%s;%s%%\n" % (v[0], v[1], v[2]))
+            f.write(u"%s;%s;%s%%\r\n" % (v[0], v[1], v[2]))
 
 class Evaluation_8(Evaluation):
     """Altersvreteilung"""
@@ -407,9 +407,9 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write("Altersgruppe;Anzahl;Prozent\n")
+        f.write("Altersgruppe;Anzahl;Prozent\r\n")
         for v in p:
-            f.write("%s;%s;%s%%\n" % (v[0], v[1], v[2]))
+            f.write("%s;%s;%s%%\r\n" % (v[0], v[1], v[2]))
 
 class Evaluation_9(Evaluation):
     """Verteilung Foerderangebote"""
@@ -420,7 +420,7 @@
         result = [[u"berufliche Qualifizierung",0,0],
             [u"berufliche Vorbereitung", 0,0],
             [u"bildenden Bereich", 0,0],
-            [u"%s" % unicode("Lebens- bewältigung", "utf-8"), 0,0]
+            [u"%s" % unicode("Lebensbewältigung", "utf-8"), 0,0]
         ]
         try:
             conn, c1 = None, None
@@ -428,26 +428,26 @@
                 conn = db.getConnection()
                 c1 = conn.cursor()
                 c1.execute(
-                    """select count(id) 
-                       from rg_angebote_berufliche_qualifizierung_tbl_view""")
+                    """select count(rg.id) 
+                       from rg_angebote_berufliche_qualifizierung_tbl_view rg join master_tbl_eval_incm_view m on m.id = rg.master_id""")
                 result[0][1] = c1.fetchone()[0]
                 c1.close(); c1 = None
                 c1 = conn.cursor()
                 c1.execute(
-                    """select count(id) 
-                       from rg_angebote_berufsvorbereitung_tbl_view""")
+                    """select count(rg.id) 
+                       from rg_angebote_berufsvorbereitung_tbl_view rg join master_tbl_eval_incm_view m on m.id = rg.master_id""")
                 result[1][1] = c1.fetchone()[0]
                 c1.close(); c1 = None
                 c1 = conn.cursor()
                 c1.execute(
-                    """select count(id)
-                       from rg_angebote_bildenden_bereich_tbl_view""")
+                    """select count(rg.id)
+                       from rg_angebote_bildenden_bereich_tbl_view rg join master_tbl_eval_incm_view m on m.id = rg.master_id""")
                 result[2][1] = c1.fetchone()[0]
                 c1.close(); c1 = None
                 c1 = conn.cursor()
                 c1.execute(
-                    """select count(id)
-                       from rg_angebote_lebensbewaeltigung_tbl_view""")
+                    """select count(rg.id)
+                       from rg_angebote_lebensbewaeltigung_tbl_view rg join master_tbl_eval_incm_view m on m.id = rg.master_id""")
                 result[3][1] = c1.fetchone()[0]
                 c1.close(); c1 = None
                 
@@ -471,9 +471,9 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write(u"Angebot;Anzahl;Prozent\n")
+        f.write(u"Angebot;Anzahl;Prozent\r\n")
         for v in p:
-            f.write(u"%s;%s;%s%%\n" % (v[0], v[1], v[2]))
+            f.write(u"%s;%s;%s%%\r\n" % (v[0], v[1], v[2]))
 
 class Evaluation_10(Evaluation):
     """Verweildauer im CM"""
@@ -528,8 +528,8 @@
 
     def doExport(self, f):
         p = self.perform()
-        f.write("Monat;Anzahl Abgeschlossen;Prozent Abgeschlossen, Anzahl Abgebrochen, Prozent Abgebrochen\n")
+        f.write("Monat;Anzahl Abgeschlossen;Prozent Abgeschlossen, Anzahl Abgebrochen, Prozent Abgebrochen\r\n")
         for v in p:
-            f.write(u"%s;%s;%s%%;%s;%s%%\n" % (v[0], v[1], v[2], v[3], v[4]))
+            f.write(u"%s;%s;%s%%;%s;%s%%\r\n" % (v[0], v[1], v[2], v[3], v[4]))
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/lib/helpers.py
===================================================================
--- trunk/waskaweb/lib/helpers.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/helpers.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -66,7 +66,7 @@
     # Get treeitem
     navigation = session.get('navigation.tree')
     ti = navigation.getTreeItem(page_id)
-    errors = session.get('case_errors', {})
+    errors = session.get('case').getFormErrors()
     try:
         for key, err in errors.iteritems(): 
             if err.page == ti.page:

Modified: trunk/waskaweb/lib/pdfimporter.py
===================================================================
--- trunk/waskaweb/lib/pdfimporter.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/pdfimporter.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -46,7 +46,11 @@
         "page_20" ],
     'rg_kompetenzfestellung_tbl': [
         "page_8", 
-        "page_9" ],
+        "page_9",
+        "page_26",
+        "page_27",
+        "page_28",
+        "page_29" ],
     'rg_angebote_bildenden_bereich_tbl': [
         "page_21" ],
     'rg_angebote_berufsvorbereitung_tbl': [
@@ -587,7 +591,7 @@
 
     def traverse(self, xfaTree, stdContext):
         base = None
-        for r in ['Formular1', 'Case_Management']:
+        for r in ['Formular1', 'Case_Management', 'root']:
             x = xfaTree.getElementsByTagName(r)
             if x:
                 base = x[0]

Modified: trunk/waskaweb/lib/renderer.py
===================================================================
--- trunk/waskaweb/lib/renderer.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/renderer.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -7,7 +7,9 @@
 
 from waskaweb.model.nodecomponents import Node
 import waskaweb.lib.helpers as h
+import waskaweb.lib.filters as F
 
+
 import waskaweb.model.data as data
 
 from cgi import escape
@@ -182,17 +184,89 @@
     def append(self, item, weight=1.0):
         self.items.append((item, weight))
 
-    def render(self):
+    def render(self, doBreak=True):
         if self.items:
             out = []
             f = 1.0/reduce(lambda x, y: x + y[1], self.items, 0)
             ws = [f*w[1] for w in self.items]
             target = self.target
             out = [item[0].render(target, w) for item, w in zip(self.items, ws)]
-            out.append('<br>')
+            if doBreak: out.append('<br>')
             return "".join(out)
         return ""
 
+class AidListRenderer:
+    def __init__(self, aidList=None, ro_mode=True):
+        self.aidList = aidList
+        self.ro_mode = ro_mode
+
+    def render(self, ds_id, page_id):
+        from waskaweb.lib.base import _ 
+
+        action = self.ro_mode and "show" or "edit"
+        # Translated string here
+        s_inst     = _('cm_rg_aid_overview_table_institution')
+        s_type     = _('cm_rg_aid_overview_table_offer_type')
+        s_act      = _('cm_rg_aid_overview_table_actions')
+        s_show     = _('cm_rg_aid_overview_table_show')
+        s_edit     = _('cm_rg_aid_overview_table_edit')
+        s_delete   = _('cm_rg_aid_overview_table_')
+        s_notfound = _('cm_rg_aid_overview_table_no_offer_found')
+        s_legend   = _('cm_rg_aid_overview_legend_legend')
+        s_bb       = _('cm_rg_aid_overview_legend_bb')
+        s_bb_long  = _('cm_rg_aid_overview_legend_common_educational_area')
+        s_bv       = _('cm_rg_aid_overview_legend_bv')
+        s_bv_long  = _('cm_rg_aid_overview_legend_vocational_preparation')
+        s_bq       = _('cm_rg_aid_overview_legend_bq')
+        s_bq_long  = _('cm_rg_aid_overview_legend_qualifications')
+        s_lb       = _('cm_rg_aid_overview_legend_lb')
+        s_lb_long  = _('cm_rg_aid_overview_legend_life_skills')
+        s_newoffer = _('cm_rg_aid_overview_legend_new_offer')
+
+        out = []
+        # Build table header
+        out.append(u"""<div class="waska_form_element  w100"><table>
+            <tr>
+                <th class="table_header_h table_date">Von</th>
+                <th class="table_header_h table_date">Bis</th>
+                <th class="table_header_h table_date">%s</th>
+                <th class="table_header_h table_date">%s</th>
+                <th class="table_header_h table_action">%s</th>
+            </tr>""" % (s_inst, s_type, s_act))
+        idset = True
+        for aid in self.aidList.getDatasets():
+            class_str = ""
+            out.append(u"""<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td>""" % 
+                    (F.NA(aid.start_date), F.NA(aid.end_date), F.NA(aid.institution), F.NA(aid.type)))
+            out.append(u"""<td class="table_action"><a href="/rg_aid/%s/%s/%s">%s</a>""" % 
+                    (action,aid.id, aid.page_id, s_show))
+            if not self.ro_mode and h.hasRole(['cm_ka']):
+                out.append(u"""<a href="/rg_aid/delete/%s/%s/0">%s</a>""" % (aid.id, aid.page_id, s_delete))
+            out.append("""</td></tr>""")
+
+            if self.aidList.numDatasets() <= 0:
+                out.append(u"""<tr><td colspan="5">%s</td></tr>""" % (s_notfound))
+        out.append(u"""</table>""")
+        out.append(u"""<div class="legend">
+        %s <strong>%s</strong>: %s <strong>%s</strong>: %s <strong>%s</strong>: %s <strong>%s</strong>: %s 
+        </div></div>""" % (s_legend,s_bb, s_bb_long, s_bv, s_bv_long, s_bq, s_bq_long, s_lb, s_lb_long))
+
+        if not self.ro_mode and h.hasRole(['cm_ka']):
+            out.append(u"""<div class="waska_form">
+  <form name="new_unterstuetzung" action="/rg_aid/newAction" method="POST">
+  <label for="angebot">%s</label><br>""" % s_newoffer)
+            out.append(u"""<select name="aid_type" id="angebot">
+    <option value="0">%s</option>
+    <option value="1">%s</option>
+    <option value="2">%s</option>
+    <option value="3">%s</option>
+  </select>""" % (s_bb_long, s_bv_long, s_bq_long, s_lb_long))
+            out.append(u"""<input type="hidden" name="page_id" value="%s">
+  <input type="hidden" name="case_id" value="%s">
+  <input type="submit" value="Hinzufügen">""" % (page_id, ds_id))
+            out.append(u"""</form></div>""")
+        return "\n".join(out)
+
 class ViewRenderer:
 
     def __init__(self, formdata=FormData(), ro_mode=True):
@@ -228,7 +302,7 @@
                         % escape(name, True))
                 if case_id:
                     out.append('<input type="hidden" name="ds" value="%s">\n' \
-                        % escape(case_id, True))
+                        % escape(str(case_id), True))
                 out.append('<input type="submit" name="__formular_save" value="Speichern">\n')
                 if showNext:
                     out.append('<input type="submit" name="__formular_next" value="Speichern und weiter">\n')
@@ -327,10 +401,14 @@
         else:
             name = ""
 
-        if self.ro_mode: 
-            disabled = 'disabled="disabled"'
-            #css_class.append('readonly')
-        else: disabled = ""
+        # Do not render choicelists in disabled mode as IE can not cope with
+        # css on disabled list elements. Instead just render the selected
+        # option within the list (ChoiceBool)
+        disabled = ""
+        #if self.ro_mode: 
+        #    disabled = 'disabled="disabled"'
+        #    css_class.append('readonly')
+        #else: disabled = ""
 
         multiple = multiple and "multiple" or ""
 
@@ -360,6 +438,7 @@
         name        = bool.getName()
         value       = bool.getValue()
         selected    = ""
+        out         = ""
         
         toSelect = self.stateStack[-1]
         selected = toSelect ==  (value or value==0) and "selected" or ""
@@ -370,7 +449,12 @@
         if description: description = escape(description)
         else:           description = ""
 
-        out = "<option %s %s>%s</option>\n" % (value, selected, description)
+        if self.ro_mode:
+            if selected:
+                out = "<option %s %s>%s</option>\n" % (value, selected, description)
+        else:
+            out = "<option %s %s>%s</option>\n" % (value, selected, description)
+
         self.toTarget(Text(out), bool.getTarget());
 
     def _renderRadioBool(self, bool):
@@ -432,7 +516,7 @@
 
         if self.ro_mode: 
             disabled = "disabled"
-            css_class.append(disabled)
+            css_class.append('readonly')
         else: disabled = ""
 
         out = '<input type="checkbox" class="%s" %s %s %s %s %s>%s' % (
@@ -450,7 +534,7 @@
 
         if description:
             if name:
-                return '<label for="%s"><a name="%s">%s</a> %s</label>%s\n' % ( 
+                return '<label for="%s"><a name="f_%s">%s</a> %s</label>%s\n' % ( 
                 escape(name, True), escape(name, True), escape(description), helpmsg, newline)
             return "%s " % escape(description)
         return ""
@@ -484,17 +568,17 @@
         else:
             name = ""
 
-        if self.ro_mode: 
-            disabled = "disabled"
-            css_class.append('readonly')
-        else: disabled = ""
-
         if error:
             css_class.append('error')
             out.append('<a href="#error_list"><img class="smallicon" src="/images/error_small.png"></a>')
 
-        out.append('<textarea class="%s" %s %s %s %s %s>%s</textarea><br>\n' % (
-            " ".join(css_class), disabled, name, rows, cols, SET_MODIFICATION, value))
+        if not self.ro_mode: 
+            out.append('<textarea class="%s" %s %s %s %s>%s</textarea><br>\n' % (
+            " ".join(css_class), name, rows, cols, SET_MODIFICATION, value))
+        else:
+            #disabled = "disabled"
+            #css_class.append('readonly')
+            out.append('<p class="readonly">%s</p>' % F.NA(value.replace('\n', '<br>')))
 
         self.toTarget(Item("".join(out)), text.getTarget())
 
@@ -687,7 +771,7 @@
 
         out = []
         for c in self.containersStack.pop():
-            txt = c.render()
+            txt = c.render(doBreak)
             if txt:
                 out.append(txt)
                 #if doBreak: out.append('<br class="newline">\n')

Modified: trunk/waskaweb/lib/security.py
===================================================================
--- trunk/waskaweb/lib/security.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/security.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,4 +1,4 @@
-# -*- coding: latin1 -*-
+# -*- coding: utf-8 -*-
 #
 # Copyright (c) 2007 by Intevation GmbH
 # Authors:
@@ -7,23 +7,37 @@
 #
 
 from waskaweb.lib.db import DB, db, enter, leave
-from pylons import request, session
+from pylons          import request, session
 import re
 import traceback
 import sys
+import time
+import os
+import random
+import md5
 
-HOST    = '192.168.11.17'
-PORT    = 5433
-DBNAME  = 'ka_%s_db'
-USER    = 'ka_%s_%s'
+from waskaweb.lib.helpers import hasRole
+from decorator            import decorator
+from paste.httpexceptions import HTTPUnauthorized
 
-check_re = re.compile(r"^[a-z_0-9]+$")
-ROLE_SQL = """select groname from pg_group where getOID() = ANY (grolist)"""
-ROLE_SQL = """select where getOID() = ANY (grolist)"""
+from types import ListType, TupleType
+
+HOST   = '192.168.11.17'
+PORT   = 5433
+DBNAME = u'ka_%s_db'
+USER   = u'ka_%s_%s'
+
+check_re            = re.compile(r"^[a-z_0-9]+$")
+ROLE_SQL            = """select groname from pg_group where getOID() = ANY (grolist)"""
+ROLE_SQL            = """select where getOID() = ANY (grolist)"""
 FETCH_USER_DATA_SQL = """SELECT id, vorname, nachname, passwort_aendern, aktiviert, rolle from ka_benutzer_tbl_view WHERE login = %(login)s"""
 
+UNAUTHORIZED_DETAIL = \
+"""Sie sind nicht authorisiert, das angeforderte Dokument anzuschauen.
+"""
+
 def checkLogin(user, password):
-    
+
     dbname = getDbName()
     if not dbname: return None # Failed to fetch dbname from SSL certifacate 
     if not check_re.match(user) or not check_re.match(dbname):
@@ -49,12 +63,12 @@
                 try:
                     result = cursor.fetchone()
                     data = {}
-                    data['id'] = result[0] 
+                    data['id']        = result[0] 
                     data['firstname'] = unicode(str(result[1]), 'utf-8')
-                    data['lastname'] = unicode(str(result[2]), 'utf-8')
-                    data['newpass'] = result[3]
+                    data['lastname']  = unicode(str(result[2]), 'utf-8')
+                    data['newpass']   = result[3]
                     data['activated'] = result[4] 
-                    data['role'] = unicode(str(result[5]), 'utf-8')
+                    data['role']      = unicode(str(result[5]), 'utf-8')
                 except:
                     data = None 
             finally:
@@ -79,6 +93,17 @@
         traceback.print_exc(file=sys.stderr)
     return None
 
+def generateID(obj=None):
+    array = [time.time(), os.times(), random.random()]
+    if not obj is None: array.append(id(obj))
+    return md5.new(str(array)).hexdigest()
+
+def userIdentity():
+    env = request.environ
+    return "%s%s" % (
+        env.get('REMOTE_ADDR', ''), 
+        env.get('HTTP_USER_AGENT', ''))
+
 def getDbName():
     dbname = None
     try:
@@ -88,4 +113,14 @@
         print >> sys.stderr, "Could not fetch database name from client certificate"
     return dbname 
 
-# vim:set ts=4 sw=4 si et sta sts=4:
+def checkRole(role):
+    if type(role) in (ListType, TupleType): _role = role
+    else:                                   _role = ( role, )
+
+    def validate(func, self, *args, **kwargs):
+        if not hasRole(_role):
+            raise HTTPUnauthorized(detail = UNAUTHORIZED_DETAIL)
+        return func(self, *args, **kwargs)
+    return decorator(validate)
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/lib/validators.py
===================================================================
--- trunk/waskaweb/lib/validators.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/lib/validators.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -5,6 +5,7 @@
 class BaseFormValidator(formencode.Schema):
     def __init__(self):
         formencode.api.set_stdtranslation(domain="FormEncode", languages=["de"])
+
     allow_extra_fields = True
     filter_extra_fields = False 
 
@@ -19,6 +20,7 @@
                   u'Zeichen lang sein',
         'non_letter': u'Sie m&uuml;ssen mindestens %(non_letter)i '
                      u'nicht Buchstaben in ihrem Passwort verwenden',
+        'only_ascii': u'Das Passwort darf nur aus ASCII-Zeichen bestehen.'
         }
 
     def _to_python(self, value, state):
@@ -28,6 +30,10 @@
         return value.strip()
 
     def validate_python(self, value, state):
+        try:
+            unicode(str(value), "ascii")
+        except (UnicodeDecodeError, UnicodeEncodeError):
+            raise formencode.Invalid(self.message("only_ascii", state), value, state)
         if len(value) < self.min:
             raise formencode.Invalid(self.message("too_few", state, min=self.min), value, state)
         non_letters = self.letter_regex.sub('', value)
@@ -90,9 +96,27 @@
 class SearchCaseForm(BaseFormValidator):
     pass
 
+class BundleActionForm(BaseFormValidator):
+    filter_extra_fields = True 
+    action  = formencode.validators.String(not_empty=True)
+    case_id = formencode.ForEach(formencode.validators.Int())
+
+class DeleteUserHelperForm(BaseFormValidator):
+    filter_extra_fields = True 
+    editor  = formencode.validators.Int()
+    user_id = formencode.validators.Int()
+    case_id = formencode.ForEach(formencode.validators.Int())
+
+
 class SetEditorForm(BaseFormValidator):
     pass
 
+class SetBundleEditorForm(BaseFormValidator):
+    pass
+
+class SetBundleStandinForm(BaseFormValidator):
+    pass
+
 class SetStandinForm(BaseFormValidator):
     filter_extra_fields = True 
     case_id = formencode.validators.Int()

Modified: trunk/waskaweb/model/agency.py
===================================================================
--- trunk/waskaweb/model/agency.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/agency.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -39,6 +39,7 @@
             try:
                 conn = db.getConnection()
                 for key, value in formdata.iteritems():
+                    # TODO: Its not necessary to fetch a new cursor each time.
                     cur = None
                     try:
                         cur = conn.cursor()
@@ -54,7 +55,8 @@
             traceback.print_exc(file=sys.stderr)
 
     def isAnonTransfer(self):
-        return self.conf.get('anon_trasfer', '') == 'on'
+        anon = self.conf.get('anon_transfer', '').strip().lower()
+        return anon == 'on' or anon == '1'
 
     def getFKZ(self):
         return unicode(str(self.conf.get('fkz', '')), 'utf-8')

Added: trunk/waskaweb/model/case.py
===================================================================
--- trunk/waskaweb/model/case.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/case.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,765 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+#
+
+import sys
+import traceback
+import psycopg2.extras
+import cStringIO as StringIO
+import shutil
+from locale import strcoll
+from sets import Set
+from waskaweb.lib.db import db
+from waskaweb.lib.base import session, g, h 
+from waskaweb.lib.pdfimporter import asXFA, FieldExtractor
+from waskaweb.model.agency import Agency
+from waskaweb.model.repeatgroup import AidList, CREATE_RG_BILDEN_DS,CREATE_RG_LEBEN_DS, CREATE_RG_QUALI_DS, CREATE_RG_BERUF_DS
+from waskaweb.model.statement import PrivacyStatement, AidPlanStatement
+from waskaweb.model.document import listDocuments 
+
+# SQL STATEMENTS
+LOAD_CASE_OVERVIEW_SQL = """SELECT id, 
+    name_1, 
+    vorname_1, 
+    kundennummer FROM master_tbl_view 
+    WHERE TRUE %s
+    ORDER by name_1"""
+
+EDITOR_CASE_OVERVIEW_SQL = """SELECT 
+    id, 
+    name_1, 
+    vorname_1, 
+    kundennummer FROM master_tbl_view WHERE bearbeiter_id = %%(editor)s 
+    %s
+    ORDER by name_1"""
+
+SEARCH_CASE_OVERVIEW_SQL = """SELECT 
+    id, 
+    name_1, 
+    vorname_1 FROM master_tbl_view WHERE vorname_1 ~* %%(needle)s 
+    OR name_1 ~* %%(needle)s 
+    OR kundennummer ~* %%(needle)s
+    %s
+    ORDER by name_1"""
+
+LOAD_CASE_DIGEST_SQL = """SELECT name_1, vorname_1, kundennummer, date_part('year', age(geburtsdatum::timestamp)) as alter, plz, strasse, wohnort, vorwahl, telefon_1, einverstaendniserklaerung from master_tbl_view WHERE id = %(id)s"""
+LOAD_CASE_SQL = """SELECT name_1, vorname_1, bearbeiter_id from master_tbl_view WHERE id = %(id)s"""
+DELETE_CASE_SQL = """select delete_master_ds(%(id)s)""" 
+
+
+CREATE_CASE_SQL = """SELECT create_master_ds()"""
+INIT_CASE_SQL= """UPDATE page_0_view SET name_kompetenzagentur = %(ka_name)s, fkz = %(fkz)s, vorname = %(vorname)s, name = %(nachname)s WHERE id = %(id)s"""
+
+CREATE_RG_KOMPETENZ_DS = """SELECT create_rg_kompetenz_ds(%(id)s)"""
+
+LOAD_STANDIN_SQL = """SELECT n.benutzer_id FROM nm_benutzer_master_tbl_view n
+                        JOIN master_tbl_view m ON 
+                        m.id = n.master_id
+                        WHERE m.id = %(id)s"""
+ADD_STANDIN_SQL = """SELECT create_nm_benutzer_master_ds(%(userid)s, %(caseid)s)"""
+DELETE_STANDIN_SQL = """SELECT delete_nm_benutzer_master_ds(%(userid)s, %(caseid)s)"""
+SET_EDITOR_SQL = """SELECT set_case_editor(%(userid)s, %(caseid)s)"""
+FETCH_KOMPETENZ_ID = """SELECT id from rg_kompetenzfestellung_tbl_view WHERE master_id = %(id)s LIMIT 1"""
+
+CASE_EXISTS = "SELECT * FROM case_exists(%(knummer)s)"
+
+CREATE_SQL = {
+   'rg_angebote_bildenden_bereich_tbl':         CREATE_RG_BILDEN_DS,
+   'rg_angebote_lebensbewaeltigung_tbl':        CREATE_RG_LEBEN_DS,
+   'rg_angebote_berufliche_qualifizierung_tbl': CREATE_RG_QUALI_DS,
+   'rg_angebote_berufsvorbereitung_tbl':        CREATE_RG_BERUF_DS
+}
+
+
+class LoadCaseNotExistsError(Exception):
+    def __init__(self, value):
+        self.value = value
+    def __str__(self):
+        return repr(self.value)
+
+class ImportCaseExistsError(Exception):
+    def __init__(self, value):
+        self.value = value
+    def __str__(self):
+        return repr(self.value)
+
+class CaseList:
+    def __init__(self, case_ids=None):
+        self.case_list = case_ids or []
+
+    def listDatasetIds(self):
+        return self.case_list
+
+    def isEmpty(self):
+        return len(self.case_list) == 0
+
+    def numDatasets(self):
+        return len(self.case_list) 
+
+    def getCases(self):
+        list = []
+        factory = CaseFactory()
+        for id in self.case_list:
+            list.append(factory.loadById(id))
+        return list
+
+class CaseBundle(CaseList):
+    def __init__(self, case_ids=None):
+        CaseList.__init__(self, case_ids)
+
+    def setEditor(self, user_id):
+        factory = CaseFactory()
+        num = 0
+        for id in self.case_list:
+            case = factory.loadById(id)
+            try:
+                case.setEditor(user_id)
+                num += 1
+            except:
+                print "Could not set editor for case in bundle"
+        return num
+
+    def setStandin(self, user_ids):
+        factory = CaseFactory()
+        num = 0
+        for id in self.case_list:
+            case = factory.loadById(id)
+            try:
+                standin = case.getStandin()
+                standin.setUser(user_ids)
+                num += 1
+            except:
+                print "Could not set standin for case in bundle"
+        return num
+
+    def delete(self):
+        factory = CaseFactory()
+        num = 0
+        for id in self.case_list:
+            case = factory.loadById(id)
+            try:
+                case.delete()
+                num += 1
+            except:
+                print "Could not delete Case from bundle"
+        return num
+
+class CaseOverview:
+    def __init__(self, search_str=None):
+        self.ds_list = []
+
+    def _parse_options(self, str):
+        # TODO This is a very very simple approach. We should defentiley
+        # implement some searchengine here
+        self.VALID_OPTIONS = ['bearbeiter']
+        search = []
+        options = {}
+
+        if str:
+            option_list = [o.strip() for o in str.split(';')]
+            for option in option_list:
+                if option.find(":") > 0:
+                    try:
+                        key, value = [x.strip() for x in option.split(":")]
+                        if key in self.VALID_OPTIONS:
+                            options[key] = value
+                    except ValueError:
+                        print "Found invalid search syntax in options"
+                else:
+                    search.append(option)
+
+        if options.has_key('bearbeiter'):
+            fields = {'editor': options.get('bearbeiter')}
+            return (EDITOR_CASE_OVERVIEW_SQL, fields)
+        if not search:
+            return (LOAD_CASE_OVERVIEW_SQL, None)
+        else:
+            fields = {'needle': " ".join(search)}
+            return (SEARCH_CASE_OVERVIEW_SQL, fields) 
+
+    def sortByLastname(self):
+        def _cmp(a, b):
+            return strcoll(a.last_name, b.last_name)
+        self.ds_list.sort(_cmp)
+
+    def search(self, search_str=None):
+        self.ds_list = []
+        SQL, fields = self._parse_options(search_str)
+        if h.hasRole(['cm_ka']):
+            SQL = SQL % " AND einverstaendniserklaerung <> 0 " 
+        else:
+            SQL = SQL % "" 
+        con, cur = None, None
+        try:
+            con = db.getConnection()
+            cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
+            if fields:
+                cur.execute(SQL, fields)
+            else:
+                cur.execute(SQL)
+            rows = cur.fetchall()
+            factory = CaseFactory()
+            for row in rows:
+                self.ds_list.append(factory.loadByName(row['id'], row['vorname_1'], row['name_1'], row['kundennummer']))
+        finally:
+            db.recycleConnection(con, cur)
+        return self.ds_list
+
+    def numDatasets(self):
+        return len(self.ds_list) 
+
+    def getDatasets(self):
+        return self.ds_list
+
+class CaseFactory:
+    '''Factory for case object. This factory provides methods to either load
+    existing cases from db or create new cases'''
+
+    def loadById(self, id):
+        '''Load a case with the given id. Return a case object'''
+        case = Case()
+        result = None
+        conn, c = None, None
+        try:
+            conn = db.getConnection()
+            c    = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
+            fields = {'id': id}
+            c.execute(LOAD_CASE_SQL, fields)
+            result = c.fetchone()
+            if not result: raise LoadCaseNotExistsError("Es konnte keine Fallakte geladen werden.") 
+        finally:
+            db.recycleConnection(conn, c)
+
+        case.id = id
+        case.last_name  = unicode(str(result.get('name_1', '')), 'utf-8')
+        case.first_name = unicode(str(result.get('vorname_1', '')), 'utf-8')
+        case.editor     = result.get('bearbeiter_id', None)
+        return case
+
+    def loadByName(self, id, first_name, last_name, knr):
+        '''This method does not actually loads a case from the database. It
+        just returns a case object initiated with the provided parameters'''
+        case = Case()
+        case.id = id
+        case.first_name = unicode(str(first_name), 'utf-8')
+        case.last_name = unicode(str(last_name), 'utf-8')
+        case.knr = knr
+        return case
+
+    def importPdf(self, pdf):
+        
+        # XXX: We are loading it all into memory. This is bad -> DoS
+        buf = StringIO.StringIO()
+        shutil.copyfileobj(pdf.file, buf)
+        b = buf.getvalue()
+        buf.close()
+
+        fe = FieldExtractor(g.formedTree)
+
+        xfa = None
+        try:
+            xfa = asXFA(b)
+            print >> sys.stderr, "XFA fetched"
+            fe.extractFields(xfa)
+        finally:
+            if xfa:
+                xfa.unlink()
+                xfa = None
+
+        tbls = fe.requiredTables()
+
+        knummer = self._fetchKundennummerFromPDF(tbls)
+
+        if not knummer is None:
+            in_db = self._caseExists(knummer)
+            if in_db:
+                raise ImportCaseExistsError(knummer)
+
+        new_case_id = self._createTablesForImport(tbls)
+        return self.loadById(new_case_id)
+
+    def createNew(self, init=True):
+        '''This method creates a new case in the database and takes care about
+        creating the right dependencies for repeat groups. If 'init' is true
+        will get initiated. This method returns the case object'''  
+        conn, cur = None, None
+        try:
+            try:
+                conn = db.getConnection()
+                cur  = conn.cursor()
+                cur.execute(CREATE_CASE_SQL)
+                id = cur.fetchone()[0]
+                conn.commit()
+            finally:
+                db.recycleConnection(conn, cur)
+            # XXX: This a workaround the RGs
+            self._createDependencies(id)
+        except:
+            traceback.print_exc(file=sys.stderr)
+            return None
+        if init == True:
+            self._initNewCase(id)
+
+        case = Case()
+        case.id = id
+        return case
+
+    def _initNewCase(self, id):
+        conn, cur = None, None
+        try:
+            user = session['USER_AUTHORIZED']
+            agency = Agency()
+            fields = {
+                'ka_name':  agency.getName(), 
+                'vorname':  user.first_name,
+                'nachname': user.last_name,
+                'fkz':      agency.getFKZ(), 
+                'id':       id
+                }
+            conn = db.getConnection()
+            cur = conn.cursor()
+            cur.execute(INIT_CASE_SQL, fields)
+            conn.commit()
+        finally:
+            db.recycleConnection(conn, cur)
+
+    def _createDependencies(self, id):
+        con, cur = None, None
+        try:
+            con = db.getConnection()
+            # create one Kompetenzfestellung
+            cur = con.cursor()
+            cur.execute(CREATE_RG_KOMPETENZ_DS, { 'id': id })
+            komp_id = cur.fetchone()[0]
+            cur.close(); cur = None
+
+            # TODO: Uncomment the following as soon as the SP exist.
+            # create three Maßnahmen per master data set
+            #for i in range(3):
+            #    cur = con.cursor()
+            #    cur.execute(CREATE_RG_MASSNAHME_DS, { 'id': komp_id })
+            #    cur.close(); cur = None
+
+            # create three Beherrschungsprache per Kompetenzfestellung
+            #for i in range(3):
+            #    cur = con.cursor()
+            #    cur.execute(CREATE_RG_SPRACHE_DS, { 'id': komp_id })
+            #    cur.close(); cur = None
+
+            # TODO: Uncomment the following as soon as the SP exist.
+            # create three Maßnahmen per master data set
+            #for i in range(3):
+            #    cur = con.cursor()
+            #    cur.execute(CREATE_RG_MASSNAHME_DS, { 'id': komp_id })
+            #    cur.close(); cur = None
+
+            con.commit()
+        finally:
+            db.recycleConnection(con, cur)
+
+    def _createTablesForImport(self, relations):
+        masterId, kompetenzId = None, None
+
+        con, cur = None, None
+        createdTables = {}
+        try:
+            con = db.getConnection()
+            # a master dataset has to be created each time
+            cur = con.cursor()
+            cur.execute(CREATE_CASE_SQL)
+            masterId = cur.fetchone()[0]
+            cur.close(); cur = None
+            createdTables['master_tbl'] = masterId
+
+            # kompetenz rg has to be created each time
+            cur = con.cursor()
+            cur.execute(CREATE_RG_KOMPETENZ_DS, { 'id': masterId })
+            rid = cur.fetchone()[0]
+            cur.close(); cur = None
+            con.commit()
+
+            createdTables['rg_kompetenzfestellung_tbl'] = rid
+
+            for name, rels, separate in relations:
+                id = None
+                if not separate:
+                    id = createdTables.get(name)
+
+                if id is None:
+                    try:
+                        stmnt = CREATE_SQL[name]
+                    except KeyError:
+                        print >> sys.stderr, "Kann Statement zur Erzeugung von '%s' nicht finden." % name
+                        continue
+                    cur = con.cursor()
+                    cur.execute(stmnt, { 'id': masterId })
+                    id = cur.fetchone()[0]
+                    cur.close(); cur = None
+
+                # write the relations
+                for rel in rels:
+                    rel.sqlUpdate(con, id)
+
+                if not separate:
+                    createdTables[name] = id
+        finally:
+            db.recycleConnection(con, cur)
+
+        return masterId
+
+    def _fetchKundennummerFromPDF(self, tbls):
+        for n, rels, sep in tbls:
+            for rel in rels:
+                try:
+                    return rel.getColumn(u"kundennummer")
+                except KeyError:
+                    pass
+        
+        return None
+
+
+    def _caseExists(self, knummer):
+        con, cur = None, None
+        try:
+            con = db.getConnection()
+            cur = con.cursor()
+            cur.execute(CASE_EXISTS, { 'knummer': knummer })
+            row = cur.fetchone()
+            if row is None: return False
+            return row[0]
+        finally:
+            db.recycleConnection(con, cur)
+
+
+class CaseStandin:
+    '''This class represents the standin for a case''' 
+    def __init__(self, case_id=None):
+        self.case_id = case_id
+        self.user_ids = []
+        self._loadFromDB()
+
+    def _loadFromDB(self):
+        fields = {'id': self.case_id}
+        con, cur = None, None
+        try:
+            con = db.getConnection()
+            cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
+            cur.execute(LOAD_STANDIN_SQL, fields)
+            rows = cur.fetchall()
+            for row in rows:
+                self.user_ids.append(row['benutzer_id'])
+        finally:
+            db.recycleConnection(con, cur)
+
+    def getUser(self):
+        '''Returns a list of user ids'''
+        return self.user_ids
+
+    def setUser(self, userid_list):
+        '''Sets the Standin to the provided list of user ids'''
+        old = Set(self.getUser())
+        new = Set(userid_list)
+        self._delete(old - new)
+        self._add(new - old)
+
+    def _delete(self, userid_list):
+        con, cur = None, None
+        fields = {'caseid': self.case_id, 'userid': None}
+        try:
+            con = db.getConnection()
+            for uid in userid_list:
+                fields['userid'] = uid
+                cur = con.cursor()
+                try:
+                    cur.execute(DELETE_STANDIN_SQL, fields)
+                except:
+                    con.rollback()
+                cur.close(); cur = None
+            con.commit()
+        finally:
+            db.recycleConnection(con, cur)
+
+    def _add(self, userid_list):
+        con, cur = None, None
+        fields = {'caseid': self.case_id, 'userid': None}
+        try:
+            con = db.getConnection()
+            for uid in userid_list:
+                fields['userid'] = uid
+                cur = con.cursor()
+                try:
+                    cur.execute(ADD_STANDIN_SQL, fields)
+                except:
+                    con.rollback()
+                cur.close(); cur = None
+            con.commit()
+        finally:
+            db.recycleConnection(con, cur)
+
+class CaseDigest:
+    def __init__(self, id):
+        self.id = id
+        self.first_name = '' 
+        self.last_name = '' 
+        self.knr = '' 
+        self.age = ''
+        self.plz = ''
+        self.city = ''
+        self.street = ''
+        self.telephone = ''
+        self.statement = False
+
+        self._loadFromDB(id)
+
+    def hasSignedPrivacyStatement(self):
+        return self.statement
+
+    def _loadFromDB(self, id):
+        try:
+            result = None
+            conn, c = None, None
+            try:
+                conn = db.getConnection()
+                c    = conn.cursor()
+                fields = {'id': id}
+                c.execute(LOAD_CASE_DIGEST_SQL, fields)
+                result = c.fetchone()
+            finally:
+                db.recycleConnection(conn, c)
+            self.last_name  = unicode(str(result[0]), 'utf-8')
+            self.first_name = unicode(str(result[1]), 'utf-8')
+            self.knr        = unicode(str(result[2]), 'utf-8')
+            if result[3]: self.age = "%.0f" % result[3]
+            else:         self.age = ""
+            self.plz         = unicode(str(result[4]), 'utf-8')
+            self.street     = unicode(str(result[5]), 'utf-8')
+            self.city        = unicode(str(result[6]), 'utf-8')
+            self.telephone_1 = u"%s" % unicode(str(result[7]), 'utf-8')
+            self.telephone_2 = u"%s" % unicode(str(result[8]), 'utf-8')
+            self.statement = (result[9] >= 0)
+        except:
+            traceback.print_exc(file=sys.stderr)
+
+class SessionCase:
+    '''This class holds all needed information for the currently selected case'''
+    def __init__(self, id=None):
+        self.id = id
+        self.page_id = None 
+        self.mode = "show" 
+        self.form_errors = {}
+        self.last_name = None
+        self.first_name = None
+        self.knr = None
+        self.privacy_statement = False
+
+        self.street = None 
+        self.plz = None 
+        self.city = None 
+
+    def getMode(self):
+        return self.mode
+
+    def setMode(self, mode="show"):
+        self.mode = mode
+
+    def setPageId(self, id):
+        self.page_id = id
+
+    def getPageId(self):
+        return self.page_id
+
+    def getFormErrors(self):
+        return self.form_errors
+
+    def setFormErrors(self, errors):
+        self.form_errors = errors
+
+    def hasPrivacyStatement(self):
+        return self.privacy_statement
+
+    def setData(self, params):
+        self.last_name = params.getone("name_1")
+        self.first_name = params.getone("vorname_1")
+        self.street = params.getone("strasse")
+        self.plz = params.getone("plz")
+        self.city = params.getone("wohnort")
+
+    def save():
+        pass
+
+class Case:
+    def __init__(self):
+        self.id = None 
+        self.first_name = None 
+        self.last_name = None 
+        self.knr = None 
+        self.editor = None
+        self.standin = None 
+
+        self.digest = None
+        self.page = None
+        self.documents = []
+        self.appointments = []
+        self.privacy_statement = None
+        self.aidplan_statement = None
+
+    def delete(self):
+        '''Deletes the case from data base. Returns True if deletion succseeds'''
+        conn, cur = None, None
+        try:
+            try:
+                conn = db.getConnection()
+                cur = conn.cursor()
+                cur.execute(DELETE_CASE_SQL, {'id': self.id})
+                conn.commit()
+                return True
+            finally:
+                db.recycleConnection(conn, cur)
+        except:
+            traceback.print_exc(file=sys.stderr)
+        return False 
+
+    def getMode(self):
+        session = self.getSessionCase()
+        return session.getMode()
+
+    def setMode(self, mode="show"):
+        s = self.getSessionCase(self.id)
+        s.setMode(mode)
+        s.save()
+
+    def getSessionCase(self):
+        '''Returns a SessionCaseObject which is initiated with values from the current user'''
+        session = SessionCase(self.id)
+        session.last_name = self.last_name
+        session.first_name = self.first_name 
+        session.knr = self.knr
+        privacy_statement = self.getPrivacyStatement()
+        session.privacy_statement = privacy_statement.isSigned() 
+        return session
+
+    def getStandin(self):
+        '''Returns the standin of the case'''
+        if not self.standin is None: return self.standin
+        try:
+            self.standin = CaseStandin(self.id) 
+            return self.standin
+        except:
+            self.standin = None
+            raise
+        return None
+
+    def getEditor(self):
+        '''Returns the editor of the case'''
+        return self.editor
+
+    def setEditor(self, userid):
+        '''sets the editor of the case to the given userid'''
+        con, curr = None, None
+        fields = {'caseid': self.id, 'userid': userid}
+        try:
+            con = db.getConnection()
+            cur = con.cursor()
+            try:
+                cur.execute(SET_EDITOR_SQL, fields)
+            except:
+                con.rollback()
+            con.commit()
+        finally:
+            db.recycleConnection(con, cur)
+        return self.editor
+                
+    def getPage(self, datapage=None):
+        '''Returns a datapage with the given name of the case'''
+        if not self.page is None: 
+            return self.page
+        try:
+            self.page = datapage
+            self.page.setCaseId(self.id)
+            return self.page
+        except:
+            self.page = None
+            raise
+        return None
+
+    def getKompetenzId(self):
+        '''Returns the id of the kompetenz repeat group'''
+        con, cur = None, None
+        id = None
+        try:
+            con = db.getConnection()
+            # a master dataset has to be created each time
+            cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
+            cur.execute(FETCH_KOMPETENZ_ID, { 'id': self.id })
+            row = cur.fetchone()
+            if row: 
+                id = row['id']
+            cur.close(); cur = None
+        finally:
+            db.recycleConnection(con, cur)
+        return id 
+
+    def getDigest(self):
+        '''Returns the digest of the case'''
+        if not self.digest is None: return self.digest
+        try:
+            # Create digest
+            self.digest = CaseDigest(self.id)
+            return self.digest
+        except:
+            self.digest = None
+            raise
+        return None
+
+    def getPrivacyStatement(self):
+        '''Returns the privacy statement of the case'''
+        if not self.privacy_statement is None: return self.privacy_statement
+        try:
+            # Create privacy_statement 
+            self.privacy_statement = PrivacyStatement(self.id)
+            self.privacy_statement.fillout(self.getDigest(), Agency()) 
+            return self.privacy_statement
+        except:
+            self.privacy_statement = None
+            raise
+        return None
+
+    def getAidPlanStatement(self):
+        '''Returns the aid plan statement of the case'''
+        if not self.aidplan_statement is None: return self.aidplan_statement
+        try:
+            # Create aidplan statement 
+            rg_list = AidList(self.id)
+            self.aidplan_statement = AidPlanStatement(self.id) 
+            self.aidplan_statement.fillout(client=self.getDigest(), agency=Agency(), rg_list=rg_list.getDatasets()) 
+            return self.aidplan_statement
+        except:
+            self.aidplan_statement = None
+            raise
+        return None
+
+    def getDocuments(self):
+        '''Returns a list of documents which are attached to this case'''
+        try:
+            # Load list of documents 
+            self.documents = listDocuments(self.id) 
+            return self.documents
+        except:
+            self.documents = []
+            raise
+        return [] 
+
+    def getAppointments(self):
+        '''Returns a list of appointments which are attached to this case'''
+        try:
+            # Load list of appointments 
+            pass
+        except:
+            self.documents = []
+            raise
+        return [] 
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Added: trunk/waskaweb/model/casedocument.py
===================================================================
--- trunk/waskaweb/model/casedocument.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/casedocument.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Torsten Irländer <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
+from waskaweb.model.nodecomponents import Document
+from waskaweb.model.data           import PageNode
+from waskaweb.model.datapage       import PageStore
+
+class CaseDocument(Document):
+    def __init__(self, root=None):
+        Document.__init__(self, root)
+
+    def getPageStore(self, name, ds_id=None):
+        db_view = "%s_view" % name
+        nc = self.findByClassAndName(PageNode, name)
+        page = PageStore(db_view, nc, ds_id)
+        return page
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Added: trunk/waskaweb/model/datapage.py
===================================================================
--- trunk/waskaweb/model/datapage.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/datapage.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,251 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+# Sascha L. Teichmann <teichmann at intevation.de>
+#
+
+from waskaweb.model.semantic import SematicError, checkAndConvert
+from waskaweb.model.data     import RuleLeaf
+
+from waskaweb.lib.renderer   import ErrorItem
+from waskaweb.lib.db         import db
+
+import sys
+
+def convert(x):
+    if isinstance(x, str): return unicode(x, 'utf-8') 
+    return x
+
+class PageStore:
+    #def __init__(self, relation, widgets, id = None):
+    def __init__(self, relation, nc, id = None):
+        self.nc        = nc
+        self.items     = None
+        self.widgets   = None
+        self.data      = None
+        self.relation  = relation
+        self.id        = id
+
+    def getWidget(self):
+        return self.nc
+
+    def getId(self):
+        return self.id
+
+    def setId(self, id):
+        self.id = id
+
+    def getData(self, item):
+        if self.data is None:
+            self._fetchData()
+        data = self.data
+        if data is None: return None
+        try:
+            # TODO: Ugly! Better change the db scheme "ja, nein, keine angabe"
+            # fields to int instead of boolean
+            if isinstance(data[item][0], type(True)):
+                return data[item][0] and 1 or 0 
+            return data[item][0]
+        except KeyError:
+            return None
+
+    def setData(self, item, value):
+        if self.data is None:
+            self._fetchData()
+        data = self.data
+        if data is None: return
+        try:
+            v = data[item]
+            # store only if different
+            if v[0] != value:
+                v[0] = value
+                v[1] = True
+        except KeyError:
+            pass
+
+    def store(self):
+
+        self.__lazyCheck()
+
+        data = self.data
+        if data is None: return
+        fields = {} 
+        keys   = []
+        for k, v in data.iteritems():
+            if v[1]:
+                keys.append("%s=%%(%s)s" % (k, k))
+                fields[k]=v[0]
+
+        if not fields:
+            return
+
+        fields['id'] = int(self.id)
+
+        stmnt = "UPDATE %s SET %s WHERE id = %%(id)s;" % (
+            self.relation, ", ".join(keys))
+
+        try:
+            con, cur = None, None
+            try:
+                con = db.getConnection()
+                cur = con.cursor()
+                cur.execute(stmnt, fields)
+                con.commit()
+            finally:
+                db.recycleConnection(con, cur)
+
+            # mark as written
+            for v in data.itervalues():
+                v[1] = False
+
+        except StandardError, err:
+            print >> sys.stderr, "DB error: %s" % str(err)
+
+    def __lazyCheck(self):
+        if self.items is None:
+            self.widgets = self.nc.allWidgets()
+            self.items   = [w.getName() for w in self.widgets]
+
+
+    def _fetchData(self):
+        self.__lazyCheck()
+        try:
+            fields = ", ".join(self.items)
+        except:
+            pass
+        stmnt = "SELECT %s FROM %s WHERE id = %%(id)s;" % (fields, self.relation)
+        try:
+            con, cur = None, None
+            try:
+                con = db.getConnection()
+                cur = con.cursor()
+                cur.execute(stmnt, { 'id': int(self.id)})
+                res = cur.fetchone()
+            finally:
+                db.recycleConnection(con, cur)
+            if res:
+                self.data = dict(
+                    zip(self.items, [[convert(item), False] for item in res]))
+
+        except StandardError, err:
+            print >> sys.stderr, "DB error: %s" % str(err)
+
+    def save(self, params, old_errors, document):
+
+        self.__lazyCheck()
+
+        nwidgets      = self.widgets
+        widgets_names = self.items
+        pageName      = self.nc.getName()
+
+        dbPage = self
+
+        # widgets on current page
+        widgets = dict([
+            (widget.getName(), widget) for widget in nwidgets if widget.getName()])
+
+        # empty parameters will nullify values
+        delete_vars = []
+
+        # for updating the errors
+        #old_errors = session.setdefault("$ERRORS", {})
+        # Note: old_errors is now passed as argument
+
+        # vars that passed lexical and syntactic check
+        to_be_set = {}
+
+        for k, v in params.iteritems():
+            if k.startswith("__"):
+                continue
+            try:
+                value = v[0]
+                widget = widgets.pop(k)
+                #print "widget: %s"  % repr(widget)
+                if value == "": # no value -> delete it
+                    delete_vars.append(k)
+                else:
+                    # Hopefully this one causes no trouble any more
+                    old_errors.pop(k, None)
+                    # the empty array is for the rules
+                    to_be_set[k] = (checkAndConvert(widget, value), [])
+            except SematicError, inst:
+                ei = ErrorItem(pageName, value, widget.getDescription())
+                ei.addMessage(inst.value)
+                # overwrite old errors
+                old_errors[k] = ei
+            except KeyError, inst:
+                pass
+
+        # flag to indicate if we should flush the page
+        dirty = False
+
+        # remove variable from dataset which are set to ""
+        for wname in list(widgets.iterkeys()) + delete_vars:
+            dbPage.setData(wname, None)
+            dirty = True
+            # an unset value causes no problems.
+            old_errors.pop(wname, None)
+
+        # find all rules that depend on variables to be set.
+        # build up a lookup var-name -> list of rules
+        for r in document.findAllByClass(RuleLeaf):
+            expr = r.getExpr()
+            if not expr: continue
+            for var in expr.getDependencies():
+                try:
+                    to_be_set[var][1].append(r)
+                except KeyError:
+                    pass
+
+        # set vars into db page and check rules.
+        for k, tup in to_be_set.iteritems():
+            v, rules = tup[0], tup[1]
+            hasNoProblems = True
+            for rule in rules:
+                vars = {}
+                isNull = False # only process rule if all values are not null
+                for dependency in rule.getExpr().getDependencies():
+                    if dependency == k: # ignore because this comes from the web
+                        continue
+                    # XXX: Normally they are distributed over all kind of pages.
+                    value = ds.getValue(dependency)
+                    if value is None: isNull = True; break
+                    vars[dependency] = value
+                if isNull:
+                    continue
+                expr = rule.getExpr()
+                # Now evaluate the rule to see if its violated
+                try:
+                    vars[k] = v # test it with new value from web
+                    isOkay = expr.evaluate(vars)
+                except:
+                    print_exc()
+                    isOkay = False
+                if not isOkay:
+                    hasNoProblems = False
+                    ie = old_errors.get(k, None)
+                    if ie is None:
+                        ie = ErrorItem(pageName, v)
+                        old_errors[k] = ie
+                    msg = rule.getValue()
+                    if msg: ie.addMessage(msg)
+                    else:   ie.addMessage("There is a problem with '%s'." % k)
+            if hasNoProblems: # No new errors -> set it
+                dbPage.setData(k, v)
+                dirty = True
+                # TODO: Solve transitive problems!
+                # e.g. A was set. B contradicts A. That prevents B from
+                # being set. -> B is marked was wrong input.
+                # Now A is set to a value that does not contradicts B
+                # any more. Therefore B is not an error input any more.
+                # -> B can be applied. This scheme has to be applied 
+                # recursively along the dependencies.
+                old_errors.pop(k, None)
+
+        if dirty: # flush the db page
+            dbPage.store()
+
+        return old_errors
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: trunk/waskaweb/model/io/factories.py
===================================================================
--- trunk/waskaweb/model/io/factories.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/io/factories.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -7,7 +7,7 @@
 
 from parser import Factory, Creator
 
-from waskaweb.model.nodecomponents import Document
+from waskaweb.model.casedocument import CaseDocument
 
 class SimpleCreator(Creator):
 
@@ -38,6 +38,6 @@
 
     def reduce(self, ctx):
         root = NodeFactory.reduce(self, ctx)
-        return Document(root)
+        return CaseDocument(root)
 
 # vim:set ts=4 sw=4 si et sta sts=4:

Modified: trunk/waskaweb/model/navigation.py
===================================================================
--- trunk/waskaweb/model/navigation.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/navigation.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -7,59 +7,24 @@
 
 import sys
 
-STRUCTURE = """
-    0, "1. Zust&auml;ndigkeiten, Eingangsdaten"
-    1, "2. Angaben zur Person"
-    2, "3. Biographische Daten"
-    2, "3.1 Famili&auml;re Situation"
-    3, "3.2 Gesundheitliche Situation"
-    4, "3.3 Soziale Lage"
-    5, "3.4 Schule"
-    6, "3.5 Ausbildung und Arbeit"
-    7, "3.6 Weiterer Verlauf"
-    8, "4. Case-Management"
-    8, "4.1 Kompetenzfestellung"
-    8, "4.1.1 Verfahren"
-    9, "4.1.2 Ergebnisse der Kompetenzfestellung"
-    10, "4.2 F&ouml;rderplanung"
-    21, "4.2.1 Unterst&uuml;tzungsangebote im allgemein bildenden Bereich"
-    21, "page_21"
-    22, "4.2.2 Unterst&uuml;tzungsangebote im Bereich der Berufsvorbereitung"
-    22, "page_22"
-    23, "4.2.3 Unterst&uuml;tzungsangebote im Bereich der beruflichen Qualifizierung"
-    23, "page_23"
-    24, "4.2.4 Unterst&uuml;tzungsangebote im Bereich der Lebensbew&auml;ltigung"
-    24, "page_24"
-    15, "Freie Dokumentation"
-    16, "5. Abschlussbewertung"
-    16, "5.1 Angaben zum Verlauf und Beendigung des CM</a""
-    17, "5.2 Erreichte Ziele"
-    17, "5.2.1 Berufliche Integration"
-    18, "5.2.2 Soziale Integration"
-    19, "5.2.3 Einsch&auml;tzung des Case-Managers"
-    20, "Freie Dokumentation"
-"""
+from paste.httpexceptions  import HTTPNotFound
 
 NEXT_KEYS = {
     "0"   : "26",
     "26"  : "1",
     "1"   : "3",
-    "2"   : "4",
+    "2"   : "6",
     "3"   : "4",
     "4"   : "5",
-    "5"   : "6",
+    "5"   : "2",
     "6"   : "7",
     "7"   : "8",
     "8"   : "10",
     "9"   : "12",
     "10"  : "12",
     "11"  : "12",
-    "12"  : "13",
+    "12"  : "31",
     "13"  : "14",
-    "14rg": "14",
-    "15rg": "14",
-    "16rg": "14",
-    "17rg": "14",
     "14"  : "18",
     "18"  : "20",
     "19"  : "21",
@@ -67,7 +32,17 @@
     "21"  : "23",
     "22"  : "23",
     "23"  : "24",
-    "24"  : "25"
+    "24"  : "25",
+    "27"  : "14",
+    "28"  : "14",
+    "29"  : "14",
+    "30"  : "14",
+    "31"  : "32",
+    "32"  : "33",
+    "33"  : "34",
+    "34"  : "35",
+    "35"  : "13",
+    "36"  : "1"
 }
 
 class TreeItem:
@@ -87,24 +62,44 @@
     def setParent(self, treeItem):
         self.parent = treeItem
 
-    def render(self, action, out, error=False, selected_key=None):
-        if error: err_str = '<span class="error">(!) </span>'
-        else: err_str = ""
+    def render(self, select_action, toggle_action, out, error=False, selected_key=None):
+        err_str = ""
         if self.enabled:
-            out.append('<li class="formpage">')
 
             hl = self.key == selected_key and 'class="formpage_highlight"' or ""
+            out.append('<li class="formpage"><span %s>' % hl)
 
-            out.append('<a href="%s" %s onclick="return checkModification();">%s%s</a>' % (
-                action(self),
-                hl,
+            if self.children and len(self.children) > 0: 
+                if error:
+                    symbol = '<img src="/images/icons/folder_error.png" border="0">'
+                else: 
+                    symbol = '<img src="/images/icons/folder.png" border="0">'
+            else:
+                if error:
+                    symbol = '<img src="/images/icons/formular_page_error.png" border="0">'
+                else:
+                    symbol = '<img src="/images/icons/formular_page.png" border="0">'
+
+            out.append('<a href="%s" onclick="return checkModification();">%s</a>' % (
+                toggle_action(self),
+                symbol))
+
+            out.append('<a href="%s" onclick="return checkModification();">%s%s</a>' % (
+                select_action(self),
                 err_str, 
                 self.description))
 
-            if self.children and self.displayChildren:
+            out.append('</span>')
+
+            if self.children and len(self.children) > 0 and self.displayChildren:
                 out.append('<ul>')
                 for child in self.children:
-                    child.render(action, out, selected_key=selected_key)
+                    child.render(
+                        select_action, 
+                        toggle_action, 
+                        out, 
+                        selected_key=selected_key
+                    )
                 out.append('</ul>')
             out.append("</li>")
 
@@ -120,12 +115,36 @@
             current.displayChildren = True
             current = current.parent
 
+class KompetenzTreeItem(TreeItem):
+
+    def __init__(self, key, page, description, children, kid):
+        TreeItem.__init__(self, key, page, description, children)
+        self.kid = kid
+
+    def realId(self, id):
+        return self.kid
+
 class NavigationTree:
 
-    def __init__(self, factories=None):
+    #def __init__(self, factories=None):
+    def __init__(self, case=None):
         self.errors = [] #List page name with faulty pages
-        if factories is None: factories = {}
+        factories = {}
+        k_id = case.getKompetenzId()
+        
+        def xmake(key, page, description, children=None):
+            return KompetenzTreeItem(key, page, description, children, k_id)
 
+        if not k_id is None:
+            factories = {
+            "page_8": xmake,
+            "page_9": xmake,
+            "page_26": xmake,
+            "page_27": xmake,
+            "page_28": xmake,
+            "page_29": xmake
+            }
+
         def make(p):
             def _make(*args):
                 return factories.get(p, TreeItem)(*args)
@@ -134,11 +153,13 @@
         self.children = [
             make("page_0")("0", "page_0", "Zust&auml;ndigkeiten, Eingangsdaten"),
             make("page_25")("26", "page_25", "Kontaktdaten"),
-            make("page_1")("1", "page_1", "Angaben zur Person"),
-            make("page_2")("2", "page_2", "Biographische Daten", [
+            make("page_1")("36", "page_1", "Angaben zur Person", [
+                make("page_1")("1", "page_1", "Pers&ouml;nliche Angaben"),
                 make("page_2")("3", "page_2", "Famili&auml;re Situation"),
                 make("page_3")("4", "page_3", "Gesundheitliche Situation"),
-                make("page_4")("5", "page_4", "Soziale Lage"),
+                make("page_4")("5", "page_4", "Soziale Lage")
+            ]),
+            make("page_2")("2", "page_5", "Biographische Daten", [
                 make("page_5")("6", "page_5", "Schule"),
                 make("page_6")("7", "page_6", "Ausbildung und Arbeit"),
                 make("page_7")("8", "page_7", "Weiterer Verlauf")
@@ -146,14 +167,20 @@
             make("page_8")("9", "page_8", "Case-Management", [
                 make("page_8")("10", "page_8", "Kompetenzfestellung", [
                     make("page_8")("11", "page_8", "Verfahren"),
-                    make("page_9")("12", "page_9", "Ergebnisse der Kompetenzfestellung")
+                    make("page_9")("12", "page_9", "Ergebnisse der Kompetenzfestellung", [
+                        make("page_9")("31", "page_9", "Fachkompetenzen"),
+                        make("page_26")("32", "page_26", "Methodenkompetenzen"),
+                        make("page_27")("33", "page_27", "Sprachen und Kommunikation"),
+                        make("page_28")("34", "page_28", "Sozial und Selbstkompetenzen"),
+                    ]),
+                    make("page_29")("35", "page_29", "Dokumentation")
                 ]),
                 make("page_10")("13", "page_10", "F&ouml;rderplanung"),
                 make("rg_unterstuetzungsangebote")("14", "rg_unterstuetzungsangebote", "Unterst&uuml;tzungsangebote", [
-                    make("page_21")("14rg", "page_21", "Angebot im Bereich BB", None, False),
-                    make("page_22")("15rg", "page_22", "Angebot im Bereich BV", None, False),
-                    make("page_23")("16rg", "page_23", "Angebot im Bereich BQ", None, False),
-                    make("page_24")("17rg", "page_24", "Angebot im Bereich LB", None, False)
+                    make("page_21")("27", "page_21", "Angebot im Bereich BB", None, False),
+                    make("page_22")("28", "page_22", "Angebot im Bereich BV", None, False),
+                    make("page_23")("29", "page_23", "Angebot im Bereich BQ", None, False),
+                    make("page_24")("30", "page_24", "Angebot im Bereich LB", None, False)
                 ]),
                 make("page_15")("18", "page_15", "Freie Dokumentation")
             ]),
@@ -176,18 +203,30 @@
             if child.children: 
                 self.buildParents(child.children, child)
 
+    def getAllItems(self):
+        '''Returns a serialized list of treeitems'''
+        stack = [self.children]
+        items = []
+        while stack:
+            children = stack.pop()
+            for c in children:
+                items.append(c)
+                if c.children:
+                    stack.append(c.children)
+        return items
+
     def getTreeItem(self, key):
         stack = [self.children]
 
         while stack:
             children = stack.pop()
             for c in children:
-                if c.key == key:
+                if c.key == str(key):
                     return c
                 if c.children:
                     stack.append(c.children)
 
-        return None
+        raise HTTPNotFound()
 
     def getHeaders(self, key):
         headers = []
@@ -210,12 +249,13 @@
                     return c
                 if c.children:
                     stack.append(c.children)
-        return None
 
-    def render(self, action, selected_key=None):
+        raise HTTPNotFound()
+
+    def render(self, select_action, toggle_action, selected_key=None):
         out = ['<ul>']
         for child in self.children:
-            child.render(action, out, (child.page in self.errors), selected_key)
+            child.render(select_action, toggle_action, out, (child.page in self.errors), selected_key)
         out.append('</ul>')
         return "\n".join(out)
 

Added: trunk/waskaweb/model/repeatgroup.py
===================================================================
--- trunk/waskaweb/model/repeatgroup.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/repeatgroup.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,173 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2007 by Intevation GmbH
+# Authors:
+#
+# Torsten Irlaender <torsten.irlaender at intevation.de>
+# Sascha L. Teichmann <teichmann at intevation.de>
+
+import sys
+import time
+import datetime
+import traceback
+import psycopg2.extras
+from waskaweb.lib.db import db
+
+FETCH_AID_LIST_SQL = """SELECT id FROM %s WHERE master_id = %s"""
+CREATE_RG_BILDEN_DS    = """SELECT create_rg_bilden_ds(%(id)s)"""
+CREATE_RG_LEBEN_DS     = """SELECT create_rg_leben_ds(%(id)s)"""
+CREATE_RG_QUALI_DS     = """SELECT create_rg_quali_ds(%(id)s)"""
+CREATE_RG_BERUF_DS     = """SELECT create_rg_beruf_ds(%(id)s)"""
+DELETE_RG_BILDEN_DS = """select delete_rg_bilden_ds(%(id)s)"""
+DELETE_RG_LEBEN_DS  = """select delete_rg_leben_ds(%(id)s)"""
+DELETE_RG_QUALI_DS = """select delete_rg_quali_ds(%(id)s)"""
+DELETE_RG_BERUF_DS = """select delete_rg_beruf_ds(%(id)s)"""
+AID_0_DB_TBL = "rg_angebote_bildenden_bereich_tbl_view"
+AID_1_DB_TBL = "rg_angebote_berufsvorbereitung_tbl_view"
+AID_2_DB_TBL = "rg_angebote_berufliche_qualifizierung_tbl_view"
+AID_3_DB_TBL = "rg_angebote_lebensbewaeltigung_tbl_view"
+FETCH_AID_0_SQL = """SELECT id, angebotsform as form, art_der_unterstuetzung as type, durchfuehrende_institution as institute, unterstuetzung_start as start, unterstuetzung_ende as end FROM rg_angebote_bildenden_bereich_tbl_view WHERE id = %s"""
+FETCH_AID_1_SQL = """SELECT id, angebotsform_1 as form, art_der_unterstuetzung_1 as type, durchfuehrende_institution_1 as institute, unterstuetzung_start_1 as start, unterstuetzung_ende_1 as end FROM rg_angebote_berufsvorbereitung_tbl_view WHERE id = %s"""
+FETCH_AID_2_SQL = """SELECT id, angebotsform_2 as form, angebote_im_bereich as type, durchfuehrende_institution_2 as institute, unterstuetzung_start_2 as start, unterstuetzung_ende_2 as end FROM rg_angebote_berufliche_qualifizierung_tbl_view WHERE id = %s"""
+FETCH_AID_3_SQL = """SELECT id, angebotsform_3 as form, art_der_unterstuetzung_2 as type, durchfuehrende_institution_3 as institute, unterstuetzung_start_3 as start, unterstuetzung_ende_3 as end FROM rg_angebote_lebensbewaeltigung_tbl_view WHERE id = %s"""
+
+AID = {"0": ["BB", "27", CREATE_RG_BILDEN_DS, AID_0_DB_TBL, DELETE_RG_BILDEN_DS],
+        "1": ["BV", "28", CREATE_RG_BERUF_DS, AID_1_DB_TBL, DELETE_RG_BERUF_DS],
+    "2": ["BQ", "29", CREATE_RG_QUALI_DS, AID_2_DB_TBL, DELETE_RG_QUALI_DS],
+        "3": ["LB", "30", CREATE_RG_LEBEN_DS, AID_3_DB_TBL, DELETE_RG_LEBEN_DS]}
+
+class AidList:
+    def __init__(self, case_id):
+        self.aid_list = []
+        conn, c = None, None
+        try:
+            try:
+                conn = db.getConnection()
+                # Bildenden Bereich 
+                c = conn.cursor()
+                sql = FETCH_AID_LIST_SQL % (AID_0_DB_TBL, case_id)
+                #print >> sys.stderr, str(sql)
+                c.execute(sql)
+                for r in c.fetchall():
+                    self.aid_list.append(
+                        AidObject(0, r[0], FETCH_AID_0_SQL))
+                c.close(); c = None
+                # Berufsvorbereitung
+                c = conn.cursor()
+                sql = FETCH_AID_LIST_SQL % (AID_1_DB_TBL, case_id)
+                #print >> sys.stderr, str(sql)
+                c.execute(sql)
+                for r in c.fetchall():
+                    self.aid_list.append(AidObject(
+                        1, r[0], FETCH_AID_1_SQL))
+                c.close(); c = None
+                # Berufliche Qualifizierung
+                c = conn.cursor()
+                sql = FETCH_AID_LIST_SQL % (AID_2_DB_TBL, case_id)
+                #print >> sys.stderr, str(sql)
+                c.execute(sql)
+                for r in c.fetchall():
+                    self.aid_list.append(
+                        AidObject(2, r[0], FETCH_AID_2_SQL))
+                c.close(); c = None
+                # Bildenden Bereich 
+                c = conn.cursor()
+                sql = FETCH_AID_LIST_SQL % (AID_3_DB_TBL, case_id)
+                #print >> sys.stderr, str(sql)
+                c.execute(sql)
+                for r in c.fetchall():
+                    self.aid_list.append(AidObject(
+                        3, r[0], FETCH_AID_3_SQL))
+            finally:
+                db.recycleConnection(conn, c)
+        except StandardError, err:
+            print >> sys.stderr, "%s" % str(err)
+
+    def numDatasets(self):
+        return len(self.aid_list) 
+
+    def getDatasets(self):
+        return self.aid_list
+
+    def listDatasetIds(self, limit, ofs):
+        return [ds.id for ds in self.ds_list]
+
+class AidObject:
+    def __init__(self, aid_type=None, id=None, sql=None):
+        self.id = id 
+        self.start_date = "-/-" 
+        self.end_date = "-/-" 
+        self.type = "-/-" 
+        self.institution = "-/-" 
+        self.aid_form = "-/-" 
+        self.type_name = "-/-" 
+
+        self.type_id = aid_type 
+        self.page_id = None
+        try:
+            self.type = AID[str(aid_type)][0] 
+            self.page_id = AID[str(aid_type)][1] 
+        except:
+            pass
+
+        #Do we load an object?
+        if id and sql:
+            self._fetchData(id, sql)
+
+    def _fetchData(self, id, sql):
+        conn, cur = None, None
+        try:
+            try:
+                conn = db.getConnection()
+                cur = conn.cursor()
+                sql = sql % id
+                cur.execute(sql)
+                #print >> sys.stderr, "%s" % sql
+                r = cur.fetchone()
+                # Set data
+                self.id = r[0] 
+                self.form = unicode(str(r[1]), 'utf-8')
+                #self.type = r[2]
+                self.institution = unicode(str(r[3]), 'utf-8')
+                self.start_date = r[4].strftime('%d.%m.%Y')
+                self.end_date = r[5].strftime('%d.%m.%Y')
+            finally:
+                db.recycleConnection(conn, cur)
+        except:
+            pass
+
+    def create(self, case_id):
+        try:
+            conn, cur = None, None
+            try:
+                conn = db.getConnection()
+                cur = conn.cursor()
+                sql = AID[str(self.type_id)][2]
+                cur.execute(sql, { 'id': case_id })
+                r = cur.fetchone()
+                conn.commit()
+                # Set data
+                self.id = r[0]
+            finally:
+                db.recycleConnection(conn, cur)
+        except:
+            traceback.print_exc(file=sys.stderr)
+
+        return self.id
+
+    def delete(self):
+        conn, cur, sql = None, None, None
+        try:
+            try:
+                conn = db.getConnection()
+                cur = conn.cursor()
+                sql = (AID[str(self.type_id)][4]) # get delete function
+                cur.execute(sql, { 'id': self.id })
+                conn.commit()
+            finally:
+                db.recycleConnection(conn, cur)
+        except StandardError, err:
+            print >> sys.stderr, "Error on deleting aid object", str(err), " ", sql 
+        return True
+
+# vim:set ts=4 sw=4 si et sta sts=4:

Modified: trunk/waskaweb/model/statement.py
===================================================================
--- trunk/waskaweb/model/statement.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/statement.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -9,11 +9,12 @@
 
 from string import Template
 
-GET_STATEMENT_FLAG_SQL = """"""
+GET_STATEMENT_FLAG_SQL = """SELECT einverstaendniserklaerung from page_einverstaendnis_view WHERE id = %(id)s"""
 SET_STATEMENT_FLAG_SQL = """UPDATE page_einverstaendnis_view SET einverstaendniserklaerung = %(value)s WHERE id = %(id)s"""
 class Statement:
     def __init__(self, id=None):
         self.case_id = id
+        self.content = ""
     
     def _substitute(self, client, agency):
         return ''
@@ -21,6 +22,9 @@
     def _fetchData(self):
         pass
 
+    def getContent(self):
+        return self.content
+
     def fillout (self, client, agency, **kwargs):
         return self._substitute(client, agency)
 
@@ -30,6 +34,10 @@
     def sign(self):
         pass
 
+    def isSigned(self):
+        return False
+        
+
 class PrivacyStatement(Statement):
     def __init__(self, id=None):
         Statement.__init__(self, id)
@@ -37,7 +45,8 @@
     def fillout(self, client, agency, **kwargs):
         tmpl = agency.getPrivacyStatement()
         self.template = Template(tmpl)
-        return self._substitute(client, agency)
+        self.content = self._substitute(client, agency) 
+        return self.content 
 
     def _substitute(self, client, agency):
         # Substitution dictionary
@@ -45,7 +54,7 @@
                 'VORNAME': client.first_name,
                 'NACHNAME': client.last_name,
                 'PLZ': client.plz,
-                'STRASSE': client.address,
+                'STRASSE': client.street,
                 'ORT': client.city,
                 'KA_NAME': agency.getName() 
             }
@@ -63,15 +72,32 @@
             db.recycleConnection(conn, cur)
 
     def decline(self):
-            conn, cur = None, None
-            try:
-                conn = db.getConnection()
-                cur = conn.cursor()
-                cur.execute(SET_STATEMENT_FLAG_SQL, {'id': self.case_id, 'value': 0})
-                conn.commit()
-            finally:
-                db.recycleConnection(conn, cur)
+        conn, cur = None, None
+        try:
+            conn = db.getConnection()
+            cur = conn.cursor()
+            cur.execute(SET_STATEMENT_FLAG_SQL, {'id': self.case_id, 'value': 0})
+            conn.commit()
+        finally:
+            db.recycleConnection(conn, cur)
 
+    def isSigned(self):
+        '''Returns True is teh statement is signed. False if the statement is
+        _not_ signed and will not be signed in the future. None is returned if
+        the statement is not signed yet, but might be signed in the future'''
+        conn, cur = None, None
+        try:
+            conn = db.getConnection()
+            cur = conn.cursor()
+            cur.execute(GET_STATEMENT_FLAG_SQL, {'id': self.case_id})
+            signed = cur.fetchone()[0]
+            if signed == 1: return True
+            elif signed == 0: return False
+            elif signed == -1: return None
+        finally:
+            db.recycleConnection(conn, cur)
+        
+
 class AidPlanStatement(Statement):
     def __init__(self, id=None):
         Statement.__init__(self, id)
@@ -80,7 +106,8 @@
         list = self._buildAidList(kwargs.get('rg_list', []))
         tmpl = agency.getAidPlanStatement()
         self.template = Template(tmpl)
-        return self._substitute(client, agency, list)
+        self.content = self._substitute(client, agency, list) 
+        return self.content 
 
     def _buildAidList(self, rg_list):
         out = []

Modified: trunk/waskaweb/model/user.py
===================================================================
--- trunk/waskaweb/model/user.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/model/user.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -8,6 +8,7 @@
 FETCH_USER_DATA_SQL = """SELECT id, vorname, nachname, telefon, aktiviert, passwort_aendern, login, raumnummer, filiale, usesysid, vertreter, rolle from ka_benutzer_tbl_view WHERE id = %s"""
 FETCH_USER_SYS_ID_SQL = """SELECT usesysid FROM pg_user WHERE usename = '%s'"""
 CREATE_USER_SQL_M = """SELECT ka_create_role(%(agency)s, %(grouprole)s, %(loginname)s, %(firstname)s, %(surname)s, %(phone)s, %(room)s, %(branchoffice)s, %(activated)s , %(setpassword)s)"""
+DELETE_USER_SQL = """SELECT ka_delete_role(%(login)s, %(agency)s)"""
 RESET_USER_PASSWORD_SQL = """SELECT waska_reset_password(%(login)s, %(agency)s)"""
 ALTER_USER_PASSWORD_SQL = """SELECT ka_set_password(%(login)s, %(password)s)"""
 ALTER_USER_STANDIN_SQL = """SELECT ka_set_standin(%(standin)s, %(userid)s)"""
@@ -142,7 +143,7 @@
         self.room = ''
         self.branchoffice = ''
         self.telephone = '' 
-        self.standin = -1 
+        self.standin = None 
 
         # Load existing user?
         if not id is None:
@@ -153,13 +154,13 @@
                 self._fetchData(id)
 
     def setAdmUser(self):
-        self.last_name = 'Zentrale Administration'
+        self.last_name         = 'Zentrale Administration'
         self.needs_passrefresh = False
-        self.role = 'ka_%s_admin_ka' % getDbName()
-        self.full_login = 'ka_%s_adm' % getDbName() 
-        tok = self.full_login.split('_')
-        self.login = "_".join(tok[2:])
-        self.agency = tok[1]
+        self.role              = 'ka_%s_admin_ka' % getDbName()
+        self.full_login        = 'ka_%s_adm' % getDbName() 
+        tok                    = self.full_login.split('_')
+        self.login             = "_".join(tok[2:])
+        self.agency            = tok[1]
 
     def setPassword(self, password):
         conn, cur = None, None
@@ -202,22 +203,23 @@
             cur = conn.cursor()
             cur.execute(FETCH_USER_DATA_SQL % id)
             ud = cur.fetchone()
-            # Set userdata
-            self.id = ud[0]
-            self.first_name = unicode(str(ud[1]), 'utf-8')
-            self.last_name = unicode(str(ud[2]), 'utf-8')
-            self.telephone = unicode(str(ud[3]), 'utf-8')
-            self.activated = ud[4]
-            self.needs_passrefresh = ud[5] 
-            self.full_login = unicode(str(ud[6]), 'utf-8')
-            self.room = unicode(str(ud[7]), 'utf-8')
-            self.branchoffice = unicode(str(ud[8]), 'utf-8')
-            self.oid = ud[9]
-            self.standin = ud[10]
-            self.role = ud[11]
-            tok = self.full_login.split('_')
-            self.login = "_".join(tok[2:])
-            self.agency = tok[1]
+            if not ud is None:
+                # Set userdata
+                self.id = ud[0]
+                self.first_name = unicode(str(ud[1]), 'utf-8')
+                self.last_name = unicode(str(ud[2]), 'utf-8')
+                self.telephone = unicode(str(ud[3]), 'utf-8')
+                self.activated = ud[4]
+                self.needs_passrefresh = ud[5] 
+                self.full_login = unicode(str(ud[6]), 'utf-8')
+                self.room = unicode(str(ud[7]), 'utf-8')
+                self.branchoffice = unicode(str(ud[8]), 'utf-8')
+                self.oid = ud[9]
+                self.standin = ud[10]
+                self.role = ud[11]
+                tok = self.full_login.split('_')
+                self.login = "_".join(tok[2:])
+                self.agency = tok[1]
         finally:
             db.recycleConnection(conn, cur)
     
@@ -297,4 +299,14 @@
             db.recycleConnection(conn, cur)
 
     def delete(self):
-        pass
+        conn, cur = None, None
+        try:
+            conn = db.getConnection()
+            cur = conn.cursor()
+            fields = {'login': self.login, 'agency': self.agency}
+            cur.execute(DELETE_USER_SQL, fields)
+            conn.commit()
+            return True
+        finally:
+            db.recycleConnection(conn, cur)
+        return False

Modified: trunk/waskaweb/public/images/alert.png
===================================================================
(Binary files differ)

Added: trunk/waskaweb/public/images/arrow.gif
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/arrow.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/confirmation.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/confirmation.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/icons/folder.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/icons/folder.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/icons/folder_closed.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/icons/folder_closed.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/icons/folder_error.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/icons/folder_error.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/icons/folder_open.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/icons/folder_open.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/icons/formular_page.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/icons/formular_page.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/icons/formular_page_error.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/icons/formular_page_error.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/info.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/info.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/info_small.png
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/info_small.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/kompetenz3.ico
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/kompetenz3.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/waskaweb/public/images/np_arrow.gif
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/np_arrow.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/waskaweb/public/images/question.png
===================================================================
(Binary files differ)

Added: trunk/waskaweb/public/images/square.gif
===================================================================
(Binary files differ)


Property changes on: trunk/waskaweb/public/images/square.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/waskaweb/public/styles/all.css
===================================================================
--- trunk/waskaweb/public/styles/all.css	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/public/styles/all.css	2008-08-13 13:04:40 UTC (rev 16)
@@ -3,6 +3,8 @@
 /* 1. Table Formats 		*/
 /* 2. Evaluation Formats	*/
 /* 3. Formular Elements		*/
+/*    3.1 User			*/
+/*    3.2 Administration	*/
 /* 4. Grouping form elements 	*/
 /*------------------------------*/
 
@@ -16,19 +18,16 @@
 }
 
 table {
-	border-color: #000;
 	border-spacing: 0;
 	empty-cells: show;
 	table-layout: fixed;	
 	text-align: left;
-	font-size:1em;
+	font-size:10pt;
 	margin:0.6em 0 1em 0;
-	width:90%;
 }
 
 table th {
-	padding: 0.25em;
-	border-bottom: 0.5pt double;
+	padding: 0.1em 1em 0.1 0.25em;
 }
 
 table th.number_field {
@@ -36,8 +35,7 @@
 }
 
 table td {
-	padding: 0.1em 0.25em;
-	border-bottom: 0.5pt solid; 
+	padding: 0.1em 1em 0.1em 0.25em;
 }
 
 table td.number_field {
@@ -45,13 +43,38 @@
 }
 
 table td.label {
-	font-weight: bold;
-	border-right: 0.5pt solid; 
-	width: 15em;
+	font-weight: bold; 
 }
 
+.table_checkbox {
+	width:1.6em;
+}
 
+.table_width_small {
+	width:3em;
+}
 
+.table_width_mid_s, .table_id {
+	width:6em;
+}
+
+.table_width_mid_l, .table_date {
+	width:9em;
+}
+
+.table_width_long, .table_action {
+	width:12em;
+}
+
+.table_name {
+	width: 14em;
+}
+
+.table_description {
+	width:26em;
+}
+
+
 /*----------------------*/
 /* 2. Evaluation Formats*/
 /*----------------------*/
@@ -60,28 +83,11 @@
 	margin: 0.3em 0.5em 0.3em 0.5em;
 }
 
-table.evaluation th, table.evaluation td {
-	text-align: right;
-}
-
 table.evaluation td.label, th.label {
 	font-weight: normal;
-	width: 15em;
 	text-align: left;
 }
 
-.table_width_50 {
-	width:3em;
-}
-
-.table_width_100 {
-	width:6em;
-}
-
-.table_width_150 {
-	width:9em;
-}
-
 div.evaluation {
 	padding: 0.5em 0.5em 1.5em 0.5em;
 }
@@ -133,19 +139,18 @@
 }
 
 .waska_form fieldset {
-        margin: 0.2em 0em 0.2em 0em;
-    /*    border: 0.5pt solid; */
 	padding: 0.5em;
+	margin-bottom:0.5em;
 }
 
 .waska_form legend {
-	margin: 0.5em 0em 0.5em 0em;
 	padding: 0 0.1em 0.2em 0.1em;
 }
 
 .waska_form_element {
 	float:left;
 	width: 100%;
+	padding-bottom:0.5em;
 }
 
 .waska_form input.field {
@@ -162,7 +167,6 @@
         width: auto;
         float: left;
         clear: left;
-	margin-left:0.1em;
 	margin-top:0.5em;
 }
 
@@ -205,6 +209,13 @@
 	padding-left:0;
 }
 
+/* Textarea in readonlymode */
+p.readonly  {
+	padding: 1pt;
+	border-color: #e6e4de;
+	border-style: groove none none groove;
+}
+
 /*---------------------*/
 /*   3.1 User	       */
 /*---------------------*/
@@ -222,7 +233,7 @@
 }
 
 #description {	
-	width:29em;
+	width:30em;
 }
 
 #document input{
@@ -254,20 +265,16 @@
 	float:left
 }
 
-#admin_edit_settings_submit {
-margin-top:1em;
+#admin_edit_settings_submit, #admin_edit_user_submit {
+	margin-top:1em;
 }
 
 #admin_edit_settings p {
-margin-bottom:1em;
+	margin-bottom:1em;
 }
 
-#admin_edit_user_submit {
-margin-top:1em;
-}
-
 form input.btn_space {
-margin-top:0.4em;
+	margin-top:0.4em;
 }
 
 /*---------------------------*/

Modified: trunk/waskaweb/public/styles/color3.css
===================================================================
--- trunk/waskaweb/public/styles/color3.css	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/public/styles/color3.css	2008-08-13 13:04:40 UTC (rev 16)
@@ -9,11 +9,12 @@
 /* 6. Evaluation   		*/
 /*------------------------------*/
 
-/*---------------------*/
+/*---------------------*/:w
+
 /* 1. Common selectors */
 /*---------------------*/
 
-body {background-color: white;}
+body { background-color: white;}
 
 a { color: #000; }
 
@@ -22,28 +23,31 @@
 	background-color: #cccccc;
 }
 
-li tt {  text-decoration: none;}
+li tt { text-decoration: none; }
 
 
 /*------------------*/
 /* 2.	Header      */
 /*------------------*/
 
-div#logo {background-color: #fff;}
+div#logo { background-color: #fff; }
 
+div#logo a {
+	color:white;
+}
+
 div#statusbar {
 	background-color: #0f3250;
 	color: #fff;
 }
 
-#navipath {background-color: #bec3c3;}
+#navipath { background-color: #bec3c3; }
 	
-
 /*------------------*/
 /* 3.	Navigation  */
 /*------------------*/
 
-div.left div.navigation {
+div.left div.navigation, div#navigation, .menu {
 	background:#e6e6e6;
 }
 
@@ -52,57 +56,83 @@
 	color:#A5103B;
 }
 
-div#navigation, .menu  {background-color: #e6e6e6;}
+div.navigation .error { color: #a5103b; }
 
-div.navigation .error {color: #a5103b;}
-
-/*div.infofield {background-color: #beba79;}*/
-
-div.actions li:before {color: #ad224c;}
-
 div.menu h1 {
 	background-color: #0f3250;
 	color: #fff;
 }
 
-.menu .actions li a:hover {
-	background:#BEC3C3;
+.formpage span:hover {
+	background:#cfd1d1;
+	#background-image:url(../images/square.gif);
+	background-repeat:no-repeat;
+	background-position:1em 0.4em;
 }
 
-a.formpage_highlight, .formpage a:hover {
-	background:#BEC3C3;
+.menu .actions a:hover {
+	background:#cfd1d1;
+	background-image:url(../images/arrow.gif);
+	background-repeat:no-repeat;
+	background-position:1.1em 0.4em;
 }
 
+.formpage_highlight, .formpage span:hover.formpage_highlight, .formpage span:active {
+	background:#bec3c3;
+	#background-image:url(../images/square.gif);
+	background-repeat:no-repeat;
+	background-position:1em 0.4em;
+}
+
 /*--------------*/
 /* 4. Content 	*/
 /*--------------*/
 
-div#content {
+div#content, div#content_header,div#content_header_small {
 	background-color: #efefef;
 }
 
 div#modusfield .actions a:hover {
-	background:#BEC3C3;
+	background:#cfd1d1;
+	background-image:url(../images/arrow.gif);
+	background-repeat:no-repeat;
+	background-position:1.1em 0.4em;
 }
 
+.table_row_h, .table_row_v, .table_row_v_12 {
+	background:#CFD1D1;
+}
+
+.table_row_v, .table_row_v_2 {
+	border-left:0.5pt solid;
+}
+
+.table_header_h th, .table_header_h{
+	background:#CFD1D1;
+	border-bottom:0.5pt solid;
+}
+
+.table_header_v th, .table_header_v{
+	background:#CFD1D1;
+}
+
+.dialog h1 {
+	/*color:#a5103b;*/
+}
+
 /*------------------*/
 /* 5.	Formular    */
 /*------------------*/
 
-table {border-color: #000;}
+table { border-color: #000; }
 
-.waska_form input:focus {background: #fffeb0;}
-
-.waska_form input.readonly {background-color: #ececec;}
-
-select[disabled=disabled] {
-	background-color: #bec3c3;
+.readonly {
+	background-color: #fff;
 	color: #000;
 }
+.waska_form input:focus { background: #fffeb0; }
 
-#navi_head {
-	background:#BEC3C3;
-}
+#navi_head { background:#BEC3C3;}
 
 
 /*------------------*/
@@ -114,20 +144,10 @@
 	border-color: #000;
 }
 
-div.form_errors a {
-	color: #a5103b;
-}
+div.form_errors a, div.form_errors h1 { color: #a5103b; }
 
-div.form_errors h1 {
-	color: #a5103b;
-}
-
 div.odd-row {
 	border-color: #000;
-	background-color: #BEC3C3;
-}
-
-div.even-row {
 	background-color: #E6E6E6;
 }
 
@@ -135,19 +155,15 @@
 /* 7. Login	    */
 /*------------------*/
 
-input:focus {
-	background: #fffeb0;
-}
+input:focus { background: #fffeb0; }
 
 #content_login h1 {
 	color:#ffffff;
 	background:#0F3250;
 }
 
-#waska_form_login {
-	background-color: #E6E6E6;
-}
+#waska_form_login { background-color: #E6E6E6; }
 
+#footer_login a { color:#ffffff; }
 
 
-

Modified: trunk/waskaweb/public/styles/ie6.css
===================================================================
--- trunk/waskaweb/public/styles/ie6.css	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/public/styles/ie6.css	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,4 +1,4 @@
-p {padding-left:0.1em;}
+p { padding-left:0.1em; }
 
 legend {
 	margin-bottom:0.4em;
@@ -18,26 +18,40 @@
 	margin-top: 0.8em;
 }
 
-#navipath{
-	padding: 0.4em 1em;
-}
-
 div#startmenu {
 	padding-top:0.6em;
 	padding-bottom:0em;
 }
 
-.waska_form fieldset {
-        border: 0.5pt solid;
+div#startmenu a {
+	text-decoration:underline;
 }
 
+div.right { margin-left:16em; }
+
+div#footer { width:99.6em; }
+
+
+
+/*----------*/
+/* left menu*/
+/*----------*/
+
+.menu .formpage a { width:15.85em; }
+
+.menu .formpage li a{ width:14.85em; }
+
+.menu .formpage li li a { width:13.89em; }
+
+/*-------*/
+/* Login */
+/*-------*/
+
 #waska_form_login form .input input, #waska_form_login form .label label {
 	width:11em;
 }
 
-#waska_form_login #login_btn input {
-	margin-left:11em;
-}
+#waska_form_login #login_btn input { margin-left:11em; }
 
 #waska_form_login {
 	height:11em; /*sonst wird p element nicht angezeigt */
@@ -51,24 +65,3 @@
 	margin:0;
 	padding:0;
 }
-
-div#footer {
-	width:99.9em;
-}
-
-#navipath li{
-	display: inline;
-	padding-right:0.2em;
-}
-
-.menu .formpage a {
-	width:13.65em;
-}
-
-.menu .formpage li a{
-	width:12.65em;
-}
-
-.menu .formpage li li a {
-	width:11.69em;
-}
\ No newline at end of file

Modified: trunk/waskaweb/public/styles/print.css
===================================================================
--- trunk/waskaweb/public/styles/print.css	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/public/styles/print.css	2008-08-13 13:04:40 UTC (rev 16)
@@ -107,13 +107,19 @@
 	padding:0;
 }*/
 
-.menu h1, .menu li a, .menu ul, #navipath, #startmenu, #statusbar, #modusfield, #logo, .help, #footer{
+.menu h1, .menu li a, .menu ul, #navipath, #startmenu, #statusbar,
+#modusfield, #logo, .help, #footer, .skiplink, .table_action{
 	display: none;
 }
 
 #content_header_small {
 	height: 22pt;
 }
+/*
+textarea, input[type=text] {
+ border:none;
+ border-bottom: 1px #000 solid;
+}*/
 
 /*#page_field {
 	float:right;
@@ -131,4 +137,8 @@
 #page_number {
 	font-weight:normal;
 	font-size:10pt;
-}*/
\ No newline at end of file
+}*/
+
+table td, table th {
+	border-bottom:0.5pt solid;
+}

Modified: trunk/waskaweb/public/styles/screen.css
===================================================================
--- trunk/waskaweb/public/styles/screen.css	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/public/styles/screen.css	2008-08-13 13:04:40 UTC (rev 16)
@@ -22,7 +22,7 @@
 
 html {	
 	height:101%;
-	font-size:1.1em;
+font-size:1.1em;
 }
 
 body {
@@ -31,7 +31,7 @@
 	padding: 0.2em 0em 0em 0.4em;
 }
 
-h1 { font-size: 1.2em; padding-bottom:0.2em;}
+h1 { font-size: 1.2em; padding-bottom:0em;}
 h2 { font-size: 1.1em; padding-top:1em;}
 h3 { font-size: 1.1em; }
 h4 { font-size: 1.0em; }
@@ -40,6 +40,18 @@
 	font-size:1em;
 }
 
+.skiplink a {
+	position: absolute;
+	top: -100px;
+	left: 0;
+	padding: 0 4px;
+	background: white;
+	font-size: 1.2em;
+	z-index: 100;
+}
+
+.skiplink a:focus {top: 0px;}
+
 fieldset {
 	padding:0.5em;
 }
@@ -48,6 +60,16 @@
 	margin-top:0.5em;
 }
 
+.dialog {
+	margin-top:0.4em;
+	padding:0.4em;
+	border:0.5pt solid;
+	background:white;
+	float:left;
+	width:51.6em;
+
+}
+
 .dialog p {
 	margin-bottom:1em;
 }
@@ -56,7 +78,7 @@
 	border: 1px;
 	margin-right: 3em;
 	border-style: solid ;
-	padding: 0 3em;
+	padding: 0 2em;
 }
 
 div.dialog img { 
@@ -111,15 +133,19 @@
 }
 
 div#footer {
-	width:99.3em;
+	width:69.5em;
 	margin-top:0.4em;
 	clear:both;
 	text-align: right;
 	border-top: 1px solid #000;
-	font-size: 0.7em;
+	font-size: 10pt;
 }
 
+div#footer p {
+	font-size:0.7em;
+}
 
+
 /*-----------*/
 /* 3. Header */
 /*-----------*/
@@ -151,6 +177,10 @@
 	padding: 0em 0.5em;
 }
 
+#startmenu a {
+	text-decoration:none;
+}
+
 div#statusbar {
 	padding:0 0 0.7em 0.2em;
 	height:0.9em;
@@ -159,8 +189,7 @@
 div#navipath{
 	height:1.5em;
 	font-size: 0.8em;
-	padding: 0.1em 0.8em 0.4em 0.3em;
-	border: 0.5pt;
+	padding: 0em 0.8em 0.3em 0.3em;
 	margin-bottom:0.4em;
 	overflow:hidden;
 }
@@ -168,29 +197,28 @@
 #navipath ul{
 	margin-left:0;
 	margin-bottom:0;
+
 }
 
 #navipath li{
 	display: inline;
+        background-image:url(../images/np_arrow.gif);
+	background-repeat:no-repeat;
+	background-position:0.1em 0.7em;
+	padding:0.2em 0.1em 0.25em 0.9em;
+	
 }
 
-#navipath li:first-child:before{
-	content: "";
-	padding: 0em 0em;
-}
+#navipath a {
+	text-decoration:none;
+	padding:0.2em 0.1em;	
+	}
 
-#navipath li:before{
-	content: ">";
-	padding: 0em 0.5em;
+#navipath a:hover, #startmenu a:hover {
+	text-decoration:underline;
 }
 
-div#navipath_text {
-	font-size:1.1em;
-	width: 6em;
-	display:inline;
-}
 
-
 /*--------------------*/
 /* 4. Left Navigation */
 /*--------------------*/
@@ -222,7 +250,7 @@
 
 .menu h1 {
 	font-size: 1.1em;
-	padding: 0.1em 1em;
+	padding: 0em 1em;
 }
 
 .menu .actions ul {
@@ -232,49 +260,29 @@
 	padding:0;
 }
 
-.menu .actions ul ul {
-	margin-top:0em;
-	margin-bottom:0.4em;
-}
-
-.menu .actions ul ul ul {
-	margin-top:0em;
-	margin-bottom:0em;
-}
-
-.menu .actions li {
-	margin-top:0em;
-	margin-bottom:0;
-	margin-left:0em;
-	padding:0;
-}
-
-.menu .actions li li {
-	margin-top: 0em;
-	margin-bottom: 0em;
-}
-
-.menu .actions a {
-	text-decoration:none;
-}
-
 div.menu .actions li{
         list-style-type:none;
 }
 
 div.menu .actions a {
 	display: block;
-	padding: 0.1em 1.1em 0.3em 1.1em;
-	height: 1.5em;
+	padding: 0.1em 1.1em 0.3em 2.5em;
+	text-decoration:none;
+	background-image:url(../images/arrow.gif);
+	background-repeat:no-repeat;
+	height:1.5em;
+	background-position:1.1em 0.7em!important;
+	background-position:1.1em 0.4em;
+	
 }
 
 .menu ul {
 	margin-top:0.4em;
+	margin-left:0em;
 }
 
 .menu .formpage {
-	list-style-type:square	;
-	margin:0 0 0 1.2em;
+	list-style-type:none	;
 }
 
 .menu .formpage ul {
@@ -290,16 +298,17 @@
 	padding-left:0.1em;
 }
 
-.menu .formpage a, .menu .formpage li a, .menu .formpage li li a {
+.menu .formpage span, .menu .formpage li span, .menu .formpage li li span {
 	display:block;
+	text-decoration:none;
+	padding-left:0.7em;
+	#background-image:url(../images/square.gif);
+	background-repeat:no-repeat;
+	background-position:1em 0.7em!important;
+	background-position:1em 0.5em;
 }
 
-#modusfield .actions span, span.menuico {
-	font-size:0.7em;
-	border:0.5pt solid;
-}
 
-
 /*------------*/
 /* 5. Content */
 /*------------*/
@@ -312,14 +321,9 @@
   	height:375px;
 }
 
-div#content p {
-	width:90%;
-}
-
 div#content ul {
-	padding: 0.5em;
-	margin-left:0.3em;
-	margin-bottom: 0.5em;
+	margin: 0 0 0.5em 0.3em;
+	padding:0.5em;
 }
 
 div#content li {
@@ -333,13 +337,11 @@
 div#content_header {
 	width:52.5em;
 	height:6.6em;
-	background:#EFEFEF;
 }
 
 div#content_header_small {
 	width:52.5em;
 	height:3em;
-	background:#EFEFEF;
 }
 
 
@@ -363,43 +365,82 @@
 
 div#modusfield {
 	float: right;
-	/*margin-right:3em;*/
 	width:auto !important;
 	margin-top:0.4em;
-	padding:0.1em;
+	padding:0.3pt;
 	height:auto;
 	border: 0.5pt solid;
 
 }
 
+div#modusinfo {
+	padding: 0.3pt;
+}
+
+#modusfield ul {
+	border-top: 0.5pt solid;
+}
+
 div#modusfield .actions li, div#modusfield .actions a{
 	height:1.6em;
 	margin-top:0.1em;
 	margin-bottom:0.1em;
 }
 
-div#modusfield .actions a {
-	padding-left:0.1em;
-	margin-right:0.2em;
-}
-
 #content_header #modusfield ul, #content_header #modusfield li, #content_header_small #modusfield ul, #content_header_small #modusfield li{
 	display:inline;
-	padding:0 0 0 0.1em;
-	margin:0 0 0 0;
 	list-style-type:none;
+	margin:0;
+	padding:0;
 }
 
 #content_header #modusfield a, #content_header_small #modusfield a {
 	text-decoration:none;
-	padding:0 0.1em;
+	padding:0 0.4em 0em 1.4em;
+	background-image:url(../images/arrow.gif);
+	background-repeat:no-repeat;
+	background-position:0.4em 0.6em!important;
+	background-position:0.4em 0.3em;
 }
 
+label, select, input[type=checkbox], input[type=radio], 
+input[type=button], input[type=submit] {
+	cursor: pointer;
+	cursor: hand;
+}
+
+.table_header_h th, .wable_header_h{
+	border-bottom:0.5pt solid;
+}
+
+.additional_information {
+	margin-top:0.4em;
+	margin-bottom:1em;
+	padding:0.4em;
+	border:0.5pt solid;
+	background:white;
+	float:left;
+	width:51.6em;
+}
+
+.additional_information_img {
+	float:left;
+}
+
+.additional_information_p {
+	margin-right:0.4em;
+	float:right;
+}
+
+.additional_information_p br {
+	clear:both;
+}
+
 div#clearer {clear:both;}
 .clearer {clear:left;}
 
 /*--------------*/
-/* 6. Login	*/
+/* 6. Login	*/i
 /*--------------*/
 
 #header_login {
@@ -492,10 +533,6 @@
 	margin-right:0.5em;
 }
 
-#footer_login a {
-	color:#ffffff;
-}
-
 #page_field {
 	display:none;
 }
@@ -504,6 +541,9 @@
 	vertical-align:text-bottom;
 }
 
+.help a:hover {
+	cursor:help;
+}
 div#content #adm_beta li{
 	list-style-type:square;
 	margin-left:1em;
@@ -546,4 +586,4 @@
 
 .traeger_name_img img{
 	margin-bottom:0.4em;
-}
\ No newline at end of file
+}

Added: trunk/waskaweb/templates/administration/delete_user_helper.mako
===================================================================
--- trunk/waskaweb/templates/administration/delete_user_helper.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/delete_user_helper.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,26 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
+<%def name="buildNavipath()">
+  ${parent.buildNavipath()}
+  <li><a href="/administration">${_('adm_np_root')}</a></li>
+  <li><a href="/administration/overviewUser">${_('adm_np_overview')}</a></li>
+  <li><a href="/administration/deleteUser/${c.delete_user_id}">${_('adm_np_deleteuser')}</a></li>
+  <li><a href="/administration/deleteUser/${c.delete_user_id}/1">${_('adm_np_deleteuser_helper')}</a></li>
+</%def>
+<div id="content_header_small">
+  <div id="content_ueberschrift">
+${_('cm_header_delete_user_helper')}
+  </div>
+</div>
+<p>${_('cm_delete_user_helper_explain_explain')}:</p>
+<form action="${h.url_for(controller="administration", action="deleteUserHelper")}" method="POST">
+<%include file="../casemanagement/caselist.mako" />
+<select name="editor">
+% for user in c.user_list:
+  <option value="${user.id | F.NA, h}">${user.first_name | F.NA, h} ${user.last_name | F.NA, h}</option>
+% endfor
+</select>
+<input type="hidden" name="user_id" value="${c.delete_user_id}">
+<input type="submit" value="${_('cm_form_editor_submit')}">
+</form>

Added: trunk/waskaweb/templates/administration/dialogs/notificate_delete_user_helper.mako
===================================================================
--- trunk/waskaweb/templates/administration/dialogs/notificate_delete_user_helper.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/dialogs/notificate_delete_user_helper.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,9 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../../main.mako" />
+<%def name="buildNavipath()">
+	${parent.buildNavipath()}
+	<li><a href="/case">Fallakten</a></li>
+	<li><a href="/case_overview">Fallaktenübersicht</a></li>
+	<li><a href="#">Fallakten Bearbeiter setzen</a></li>
+</%def>
+<%include file="../../dialogs/notification.mako" />

Modified: trunk/waskaweb/templates/administration/edit_settings.mako
===================================================================
--- trunk/waskaweb/templates/administration/edit_settings.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/edit_settings.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -3,6 +3,7 @@
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/administration">${_('adm_np_root')}</a></li>
+        <li><a href="/administration/showSettings">${_('adm_np_showsettings')}</a></li>
 	<li><a href="/administration/editSettings">${_('adm_np_editsettings')}</a></li>
 </%def>
 
@@ -13,7 +14,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='administration', action='showSettings')}">${self.buildIco()} ${_('adm_actions_link_showsettings')}</a></li>
+		<li><a href="${h.url_for(controller='administration', action='showSettings')}"> ${_('adm_actions_link_showsettings')}</a></li>
 	</ul>
     </div>
   </div>
@@ -28,24 +29,23 @@
                 % if c.form_errors.get('ka_name'):
                   <a href="#error_list"><img class="smallicon" src="/images/error_small.png"></a>
                 % endif
-		<input type="text" class="field" id="ka_name" name="ka_name" value="${c.form_result.get('ka_name', c.agency.getName())}">
+		<input type="text" class="field" id="ka_name" name="ka_name" value="${c.form_result.get('ka_name', c.agency.getName())| h}">
 	</div>
-	<div class="waska_form_element w100"></div>
-	<div class="waska_form_element w25">
+	<div class="waska_form_element w100">
+        <div class="waska_form_element w50">
 		<label
 		for="fkz">${_('adm_form_settings_fkz')}</label><br>
                 % if c.form_errors.get('fkz'):
                   <a href="#error_list"><img class="smallicon" src="/images/error_small.png"></a>
                 % endif
-		<input type="text" class="field" id="fkz" name="fkz" value="${c.form_result.get('fkz', c.agency.getFKZ())}">
+		<input type="text" class="field" id="fkz" name="fkz" value="${c.form_result.get('fkz', c.agency.getFKZ())| h}">
 	</div>
-	<div class="waska_form_element w100"><br></div>
+        </div>
         <div class="waska_form_element w100">
                 % if c.form_errors.get('anon_transfer'):
                   <a href="#error_list"><img class="smallicon" src="/images/error_small.png"></a>
                 % endif
                 % if c.agency.isAnonTransfer():
-
                   <input id="anon_transfer" name="anon_transfer" type="checkbox" checked />
                 % else:
                   <input id="anon_transfer" name="anon_transfer" type="checkbox"/>
@@ -71,7 +71,7 @@
         </div>
 </form>
 </div>
+
+<div class="clearer"></div>
 </div>
-</div>
-<div class="clearer" ><div>
-</div>
\ No newline at end of file
+

Modified: trunk/waskaweb/templates/administration/edit_user.mako
===================================================================
--- trunk/waskaweb/templates/administration/edit_user.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/edit_user.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,10 @@
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/administration">${_('adm_np_root')}</a></li>
 	<li><a href="/administration/overviewUser">${_('adm_np_overview')}</a></li>
+        <li><a href="/administration/showUser/${c.uo.id}">${_('adm_np_showuser')}</a></li>
 	<li><a href="/administration/editUser">${_('adm_np_edituser')}</a></li>
 </%def>
 <div id="content_header_small">
@@ -12,8 +14,8 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li> <a href="/administration/resetUserPassword/${c.uo.id}">${self.buildIco()} ${_('adm_actions_link_userpassreset')}</a> </li>
-		<li> <a href="/administration/showUser/${c.uo.id}"> ${self.buildIco()} ${_('menu_adm_link_useredit_back')} </a></li>
+		<li> <a href="/administration/resetUserPassword/${c.uo.id}"> ${_('adm_actions_link_userpassreset')}</a> </li>
+		<li> <a href="/administration/showUser/${c.uo.id}">  ${_('menu_adm_link_useredit_back')} </a></li>
 	</ul>
     </div>
   </div>
@@ -29,7 +31,7 @@
                 % if c.form_errors.get('firstname'):
                   <a href="#error_list"><img class="smallicon" src="/images/error_small.png"></a>
                 % endif
-		<input type="text" class="field" id="firstname" name="firstname" value="${c.form_result.get('firstname', c.uo.first_name)}">
+		<input type="text" class="field" id="firstname" name="firstname" value="${c.form_result.get('firstname', c.uo.first_name)| h}">
 	</div>
 	<div class="w75">
 		<label
@@ -37,33 +39,33 @@
                 % if c.form_errors.get('lastname'):
                   <a href="#error_list"><img class="smallicon" src="/images/error_small.png"></a>
                 % endif
-		<input type="text" class="field" id="lasttname" name="lastname" value="${c.form_result.get('lastname', c.uo.last_name)}">
+		<input type="text" class="field" id="lasttname" name="lastname" value="${c.form_result.get('lastname', c.uo.last_name)| h}">
 	</div>
 	<div class="w25">
 		<label
 		for="telephone">${_('adm_form_user_telephone')}</label><br>
-		<input type="text" class="field" id="telephone" name="telephone" value="${c.form_result.get('telephone', c.uo.telephone)}">
+		<input type="text" class="field" id="telephone" name="telephone" value="${c.form_result.get('telephone', c.uo.telephone)| h}">
 	</div>
 	<div class="w75">
 		<label
 		for="room">${_('adm_form_user_roomnumer')}</label><br>
-		<input type="text" class="field" id="room" name="room" value="${c.form_result.get('room', c.uo.room)}">
+		<input type="text" class="field" id="room" name="room" value="${c.form_result.get('room', c.uo.room)| h}">
 	</div>
 	<div class="waska_form_element w100">
 		<label
 		for="branchoffice">${_('adm_form_user_branchoffice')}</label><br>
-		<input type="text" class="field" id="branchoffice" name="branchoffice" value="${c.form_result.get('branchoffice', c.uo.branchoffice)}">
+		<input type="text" class="field" id="branchoffice" name="branchoffice" value="${c.form_result.get('branchoffice', c.uo.branchoffice)| h}">
 	</div>
 	</fieldset>
 	<fieldset><legend>${_('adm_form_legend_login')}</legend>
           <table>
             <tr>
               <td class="label">Login</td>
-              <td>${c.uo.getLogin()}</td>
+              <td>${c.uo.getLogin()| h}</td>
             </tr>
             <tr>
               <td class="label">Rolle</td>
-              <td>${c.uo.getRole()}</td>
+              <td>${c.uo.getRole()| h}</td>
             </tr>
             <tr>
           </table>
@@ -86,7 +88,7 @@
         <div id="admin_edit_user_submit" class="waska_form_element w100">
 	  <input type="submit" value="${_('adm_form_user_submit')}">
         </div>
-        <input type="hidden" value="${c.form_errors.get('uid', c.uo.id)}" name="uid">
+        <input type="hidden" value="${c.form_errors.get('uid', c.uo.id)| F.NA, h}" name="uid">
 </form>
 </div>
 </div>

Modified: trunk/waskaweb/templates/administration/new_user.mako
===================================================================
--- trunk/waskaweb/templates/administration/new_user.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/new_user.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,13 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
+<%
+  formular_labels = {'firstname'  : 'adm_form_user_firstname',
+                      'lastname'  : 'adm_form_user_lastname',
+                      'login'     : 'adm_form_user_login',
+                      'passwd'    : 'adm_form_newuser_passwd',
+                      'passwd2'   : 'adm_form_newuser_passwd_confirm'
+                      }
+%>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/administration">${_('adm_np_root')}</a></li>
@@ -13,7 +21,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='administration', action='overviewUser')}">${self.buildIco()} ${_('menu_adm_link_useroverview_back')}
+		<li><a href="${h.url_for(controller='administration', action='overviewUser')}"> ${_('menu_adm_link_useroverview_back')}
             </a>
           </li>
 	</ul>
@@ -21,7 +29,7 @@
   </div>
 </div>
 
-${self.buildFormErrors()}
+${self.buildFormErrors(formular_labels)}
 <div id="admin_new_user">
 <div id="waska_form">
 <form action="/administration/createUserAction" method="POST">

Modified: trunk/waskaweb/templates/administration/new_user_result.mako
===================================================================
--- trunk/waskaweb/templates/administration/new_user_result.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/new_user_result.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/administration">${_('adm_np_root')}</a></li>
@@ -13,7 +14,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='administration', action='overviewUser')}">${self.buildIco()} ${_('menu_adm_link_useroverview_back')}</a></li>
+		<li><a href="${h.url_for(controller='administration', action='overviewUser')}"> ${_('menu_adm_link_useroverview_back')}</a></li>
 	</ul>
     </div>
   </div>
@@ -21,43 +22,43 @@
 <h2>${_('adm_form_legend_personal')}</h2>
 <table>
   <tr>
-    <td class="label">${_('adm_form_label_forename')}</td>
-    <td>${c.uo.first_name}</td>
+    <td class="label table_header_v table_width_long">${_('adm_form_label_forename')}</td>
+    <td class="table_row_v table_description">${c.uo.first_name| F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_label_name')}</td>
-    <td>${c.uo.last_name}</td>
+    <td class="table_row_v_2">${c.uo.last_name| F.NA, h}</td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_label_phone')}</td>
-    <td>${c.uo.telephone}</td>
+    <td class="label table_header_v">${_('adm_form_label_phone')}</td>
+    <td class="table_row_v table_description">${c.uo.telephone| F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_label_room')}</td>
-    <td>${c.uo.room}</td>
+    <td class="table_row_v_2">${c.uo.room| F.NA, h}</td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_label_agency')}</td>
-    <td>${c.uo.branchoffice}</td>
+    <td class="label table_header_v table_width_long">${_('adm_form_label_agency')}</td>
+    <td class="table_row_v table_description">${c.uo.branchoffice| F.NA, h}</td>
   </tr>
 </table>
 <h2>${_('adm_form_legend_login')}</h2>
 <table>
   <tr>
-    <td class="label">${_('adm_form_label_login')}</td>
-    <td>${c.uo.getLogin()}</td>
+    <td class="label table_header_v table_width_long">${_('adm_form_label_login')}</td>
+    <td class="table_row_v table_description">${c.uo.getLogin()| F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_label_password')}</td>
-    <td>${c.user_password}</td>
+    <td class="table_row_v_2">${c.user_password| F.NA, h}</td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_label_role')}</td>
-    <td>${c.uo.role}</td>
+    <td class="label table_header_v">${_('adm_form_label_role')}</td>
+    <td class="table_row_v table_description">${c.uo.role| F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_label_activated')}</td>
-    <td>
+    <td class="table_row_v_2">
       % if c.uo.isActivated():
         ${_('adm_form_is_activated_yes')}
       % else:
@@ -66,8 +67,8 @@
     </td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_label_login_pw')}</td>
-    <td>
+    <td class="label table_header_v table_width_long">${_('adm_form_label_login_pw')}</td>
+    <td class="table_row_v table_description">
       % if c.uo.needsNewPass():
         ${_('adm_form_needs_pw_yes')}
       % else:
@@ -75,4 +76,4 @@
       % endif
     </td>
   </tr>
-</table>
\ No newline at end of file
+</table>

Modified: trunk/waskaweb/templates/administration/overview_user.mako
===================================================================
--- trunk/waskaweb/templates/administration/overview_user.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/overview_user.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li><a href="/administration">${_('adm_np_root')}</a></li>
@@ -14,25 +15,39 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/administration/newUser">${self.buildIco()} ${_('adm_actions_link_newuser')}</a></li>
+		<li><a href="/administration/newUser"> ${_('adm_actions_link_newuser')}</a></li>
 	</ul>
     </div>
   </div>
 </div>
 <table>
   <tr>
-    <th>${_('adm_overview_tbl_header_lastname')}</th>
-    <th>${_('adm_overview_tbl_header_firstname')}</th>
-    <th>${_('adm_overview_tbl_header_actions')}</th>
+    <th class="table_header_h table_width_name">${_('adm_overview_tbl_header_lastname')}</th>
+    <th class="table_header_h table_width_name">${_('adm_overview_tbl_header_firstname')}</th>
+    <th class="table_header_h table_width_action">${_('adm_overview_tbl_header_actions')}</th>
   </tr>
+  <% idset = 0 %>
   % for user in c.user_overview:
-  <tr>
-    <td>${user.last_name}</td>
-    <td>${user.first_name}</td>
-    <td>
-      <a href="/administration/showUser/${user.id}">${_('app_overview_body_table_show')}</a>
-      <a href="/administration/deleteUser/${user.id}">${_('app_overview_body_table_delete')}</a>
-    </td>
-  </tr>
+  % if idset==0:
+   <tr>
+     <td>${user.last_name| F.NA, h}</td>
+     <td>${user.first_name| F.NA, h}</td>
+     <td>
+       <a href="/administration/showUser/${user.id}">${_('app_overview_body_table_show')}</a>
+       <a href="/administration/deleteUser/${user.id}">${_('app_overview_body_table_delete')}</a>
+     </td>
+   </tr>
+   <% idset = 1 %>
+   % else:
+   <tr>
+     <td class="table_row_h">${user.last_name| F.NA, h}</td>
+     <td class="table_row_h">${user.first_name| F.NA, h}</td>
+     <td class="table_row_h">
+       <a href="/administration/showUser/${user.id}">${_('app_overview_body_table_show')}</a>
+       <a href="/administration/deleteUser/${user.id}">${_('app_overview_body_table_delete')}</a>
+     </td>
+   </tr>
+   <% idset = 0 %>
+   % endif
   % endfor
 </table>

Modified: trunk/waskaweb/templates/administration/reset_password.mako
===================================================================
--- trunk/waskaweb/templates/administration/reset_password.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/reset_password.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
 	<li><a href="/administration">${_('adm_np_root')}</a></li>
@@ -7,6 +8,9 @@
 	<li><a href="/administration/showUser">${_('adm_np_showuser')}</a></li>
 	<li><a href="#">${_('adm_np_resetpassword')}</a></li>
 </%def>
-<h1>${_('adm_header_resetpassword')}</h1>
-<p>${_('adm_con_rp_the_password')} <strong>${c.uo.first_name} ${c.uo.last_name}</strong>${_('adm_con_rp_has_been_changed')}<br>${_('adm_con_rp_new_pw')} <strong>${c.new_password}</strong></p>
-<p><a href="/administration/overviewUser">${_('adm_con_rp_to_useroverview')}</a></p>
+<div class="dialog">
+<h1><img src="/images/confirmation.png" alt="Bestäntigung"</> ${_('adm_header_resetpassword')}</h1>
+<p>${_('adm_con_rp_the_password')} <strong>${c.uo.first_name| F.NA, h} ${c.uo.last_name| F.NA, h}</strong> ${_('adm_con_rp_has_been_changed')}<br>
+${_('adm_con_rp_new_pw')} <strong>${c.new_password| h}</strong></p>
+<a class="button" href="/administration/overviewUser">${_('adm_con_rp_to_useroverview')}</a>
+</div>

Modified: trunk/waskaweb/templates/administration/show_settings.mako
===================================================================
--- trunk/waskaweb/templates/administration/show_settings.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/show_settings.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/administration">${_('adm_np_root')}</a></li>
@@ -13,7 +14,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/administration/editSettings">${self.buildIco()} ${_('adm_actions_link_editsettings')}</a></li>
+		<li><a href="/administration/editSettings"> ${_('adm_actions_link_editsettings')}</a></li>
 	</ul>
     </div>
   </div>
@@ -22,16 +23,16 @@
 <p>${_('adm_con_ss_view_agency')}</p>
 <table>
 <tr>
-<td class="label">${_('adm_form_settings_kaname')}</td>
-  <td>${c.agency.getName()}</td>
+<td class="label table_header_v table_name">${_('adm_form_settings_kaname')}</td>
+  <td class="table_row_v table_description">${c.agency.getName()| F.NA, h}</td>
 </tr>
 <tr>
   <td class="label">${_('adm_form_settings_fkz')}</td>
-  <td>${c.agency.getFKZ()}</td>
+  <td class="table_row_v_2">${c.agency.getFKZ()| F.NA, h}</td>
 </tr>
 <tr>
-  <td class="label">${_('adm_form_settings_anontransfer')}</td>
-  <td>
+  <td class="label table_header_v">${_('adm_form_settings_anontransfer')}</td>
+  <td class="table_row_v">
     % if c.agency.isAnonTransfer():
       ${_('adm_form_settings_anontransfer_yes')}
     % else:

Modified: trunk/waskaweb/templates/administration/show_user.mako
===================================================================
--- trunk/waskaweb/templates/administration/show_user.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/show_user.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -13,8 +13,8 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>	
-		<li> <a href="/administration/editUser/${c.uo.id}">${self.buildIco()} ${_('adm_actions_link_edituser')}</a> </li>
-		<li><a href="${h.url_for(controller='administration', action='overviewUser')}">${self.buildIco()} ${_('menu_adm_link_useroverview_back')}</a></li>
+		<li> <a href="/administration/editUser/${c.uo.id}"> ${_('adm_actions_link_edituser')}</a> </li>
+		<li><a href="${h.url_for(controller='administration', action='overviewUser')}"> ${_('menu_adm_link_useroverview_back')}</a></li>
 		
 		
 	</ul>

Modified: trunk/waskaweb/templates/administration/show_user_body.mako
===================================================================
--- trunk/waskaweb/templates/administration/show_user_body.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/show_user_body.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -2,44 +2,44 @@
 <h2>${_('adm_form_legend_personal')}</h2>
 <table>
   <tr>
-    <td class="label">${_('adm_form_table_forename')}</td>
-    <td>${c.uo.first_name | F.NA, h}</td>
+    <td class="label table_header_v table_width_long">${_('adm_form_table_forename')}</td>
+    <td class="table_row_v table_description">${c.uo.first_name | F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_table_name')}</td>
-    <td>${c.uo.last_name | F.NA, h}</td>
+    <td class="table_row_v_2">${c.uo.last_name | F.NA, h}</td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_table_phone')}</td>
-    <td>${c.uo.telephone | F.NA, h}</td>
+    <td class="label table_header_v">${_('adm_form_table_phone')}</td>
+    <td class="table_row_v">${c.uo.telephone | F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_table_room')}</td>
-    <td>${c.uo.room | F.NA, h}</td>
+    <td class="table_row_v_2">${c.uo.room | F.NA, h}</td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_table_agency')}</td>
-    <td>${c.uo.branchoffice | F.NA, h}</td>
+    <td class="label table_header_v">${_('adm_form_table_agency')}</td>
+    <td class="table_row_v">${c.uo.branchoffice | F.NA, h}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_table_replace')}</td>
-    <td>${c.vuo.first_name | F.NA, h} ${c.vuo.last_name | F.NA, h}</td>
+    <td class="table_row_v_2">${c.vuo.first_name | F.NA, h} ${c.vuo.last_name | F.NA, h}</td>
   </tr>
 </table>
 <h2>${_('adm_form_header_login')}</h2>
 <table>
   <tr>
-    <td class="label">${_('adm_form_table_login')}</td>
-    <td>${c.uo.getLogin()}</td>
+    <td class="label table_header_v table_width_long">${_('adm_form_table_login')}</td>
+    <td class="table_row_v table_description">${c.uo.getLogin()}</td>
   </tr>
   <tr>
     <td class="label">${_('adm_form_table_role')}</td>
-    <td>${c.uo.getRole()}</td>
+    <td class="table_row_v_2">${c.uo.getRole()}</td>
   </tr>
   % if h.hasRole(['admin_ka']):
   <tr>
-    <td class="label">${_('adm_form_table_activated')}</td>
-    <td>
+    <td class="label table_header_v table_width_mid_l">${_('adm_form_table_activated')}</td>
+    <td class="table_row_v">
       % if c.uo.isActivated():
         ${_('adm_form_table_yes')}
       % else:
@@ -48,8 +48,8 @@
     </td>
   </tr>
   <tr>
-    <td class="label">${_('adm_form_label_new_login_new_pw')}</td>
-    <td>
+    <td class="label table_width_long">${_('adm_form_label_new_login_new_pw')}</td>
+    <td class="table_row_v_2">
       % if c.uo.needsNewPass():
         ${_('adm_form_table_yes')}
       % else:

Modified: trunk/waskaweb/templates/administration/userform_body.mako
===================================================================
--- trunk/waskaweb/templates/administration/userform_body.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/administration/userform_body.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -5,17 +5,17 @@
 	<div class="waska_form_element w100">
 		<label
 		for="firstname">${_('adm_form_user_firstname')}</label><br>
-		<input type="text" class="field" id="firstname" name="firstname", value="${c.user.first_name}">
+		<input type="text" class="field" id="firstname" name="firstname", value="${c.user.first_name | h}">
 	</div>
 	<div class="waska_form_element w100">
 		<label
 		for="lastname">${_('adm_form_user_lastname')}</label><br>
-		<input type="text" class="field" id="lasttname" name="lastname" value="${c.user.last_name}">
+		<input type="text" class="field" id="lasttname" name="lastname" value="${c.user.last_name| h}">
 	</div>
 	<div class="waska_form_element w100">
 		<label
 		for="telephone">${_('adm_form_user_telephone')}</label><br>
-		<input type="text" class="field" id="telephone" name="telephone" value="${c.user.telephone}">
+		<input type="text" class="field" id="telephone" name="telephone" value="${c.user.telephone| h}">
 	</div>
 	</fieldset>
 	<fieldset><legend>${_('adm_form_legend_login')}</legend>
@@ -38,7 +38,7 @@
 	<div class="waska_form_element w100">
 		<label
 		for="login">${_('adm_form_user_login')}</label><br>
-		<input type="text" class="field" id="login" name="login" value="${c.user.login}">
+		<input type="text" class="field" id="login" name="login" value="${c.user.login| h}">
 	</div>
 	<div class="waska_form_element w50">
 		<label

Modified: trunk/waskaweb/templates/appointments/appointment_form.mako
===================================================================
--- trunk/waskaweb/templates/appointments/appointment_form.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/appointment_form.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -26,9 +26,9 @@
 	</select>
 </div>
 % if c.case_id:
-	<input type="hidden" name="case_id" value="${c.case_id}">
+	<input type="hidden" name="case_id" value="${c.case_id| h}">
 % endif
 ${h.submit(_('app_form_new_submit'))}
 ${h.end_form()}
 </div>
-</div>
\ No newline at end of file
+</div>

Modified: trunk/waskaweb/templates/appointments/beta/show_1.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_1.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_1.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>
 	<li><a href="/appointment/show/1">${_('app_np_show')}</a></li>
 </%def>
 % if h.hasRole(['cm_ka']):
@@ -11,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska')}">${self.buildIco()} ${_('sm_menu_link_home_back')}
+		<li><a href="${h.url_for(controller='waska')}"> ${_('sm_menu_link_home_back')}
             </a>
           </li>
 	</ul>
@@ -34,4 +35,4 @@
 		<td>Akte von Herrn Bauer pr&#252;fen und F&#246;rderma&#223;nahmen beraten.</td>
 	</tr>
 </tbody></table>
-% endif
\ No newline at end of file
+% endif

Modified: trunk/waskaweb/templates/appointments/beta/show_10.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_10.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_10.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -12,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a>
 	  </li>
 	</ul>

Modified: trunk/waskaweb/templates/appointments/beta/show_2.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_2.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_2.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>
 	<li><a href="/appointment/show/2">${_('app_np_show')}</a></li>
 </%def>
 % if h.hasRole(['cm_ka']):
@@ -11,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska')}">${self.buildIco()} ${_('sm_menu_link_home_back')}
+		<li><a href="${h.url_for(controller='waska')}"> ${_('sm_menu_link_home_back')}
             </a>
           </li>
 	</ul>
@@ -34,4 +35,4 @@
 		<td>Aktens&#228;tze auf Vollst&#228;ndigkeit pr&#252;fen. Fehlende Informationen einholen</td>
 	</tr>
 </tbody></table>
-% endif
\ No newline at end of file
+% endif

Modified: trunk/waskaweb/templates/appointments/beta/show_3.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_3.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_3.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>i
 	<li><a href="/appointment/show/3">${_('app_np_show')}</a></li>
 </%def>
 <div id="content_header_small">
@@ -10,7 +11,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska')}">${self.buildIco()} ${_('sm_menu_link_home_back')}
+		<li><a href="${h.url_for(controller='waska')}"> ${_('sm_menu_link_home_back')}
             </a>
           </li>
 	</ul>

Modified: trunk/waskaweb/templates/appointments/beta/show_4.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_4.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_4.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>
 	<li><a href="/appointment/show/4">${_('app_np_show')}</a></li>
 </%def>
 % if h.hasRole(['admin_ka']):
@@ -11,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska')}">${self.buildIco()} ${_('sm_menu_link_home_back')}
+		<li><a href="${h.url_for(controller='waska')}"> ${_('sm_menu_link_home_back')}
             </a>
           </li>
 	</ul>
@@ -34,4 +35,4 @@
 		<td>Frau Maier wird am 11.12.07 die Arbeit bei uns aufnehmen. Zugang einrichten. Name: Maier Vorname:Anna Anmeldekennung: anna.maier</td>
 	</tr>
 </tbody></table>
-% endif
\ No newline at end of file
+% endif

Modified: trunk/waskaweb/templates/appointments/beta/show_5.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_5.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_5.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/appointment">${_('app_np_root')}</a></li>
+	<li><a href="/appointment/overview">${_('app_np_list')}</a></li>
 	<li><a href="/appointment/show/5">${_('app_np_show')}</a></li>
 </%def>
 % if h.hasRole(['cm_ka']):
@@ -12,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a>
 	  </li>
 	</ul>
@@ -35,4 +35,4 @@
 		<td>Akte von Herrn Bauer pr&#252;fen und F&#246;rderma&#223;nahmen beraten.</td>
 	</tr>
 </tbody></table>
-% endif
\ No newline at end of file
+% endif

Modified: trunk/waskaweb/templates/appointments/beta/show_6.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_6.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_6.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/appointment">${_('app_np_root')}</a></li>
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>	
 	<li><a href="/appointment/show/6">${_('app_np_show')}</a></li>
 </%def>
 % if h.hasRole(['cm_ka']):
@@ -12,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a>
           </li>
 	</ul>
@@ -35,4 +35,4 @@
 		<td>Aktens&#228;tze auf Vollst&#228;ndigkeit pr&#252;fen. Fehlende Informationen einholen</td>
 	</tr>
 </tbody></table>
-% endif
\ No newline at end of file
+% endif

Modified: trunk/waskaweb/templates/appointments/beta/show_7.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_7.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_7.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,8 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-	<li><a href="/appointment">${_('app_np_root')}</a></li>
-	<li><a href="/appointment/show/7">${_('app_np_show')}</a></li>
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>
+        <li><a href="/appointment/show/7">${_('app_np_show')}</a></li>
 </%def>
 <div id="content_header_small">
   <div id="content_ueberschrift">
@@ -11,7 +11,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a>
 	  </li>
 	</ul>

Modified: trunk/waskaweb/templates/appointments/beta/show_8.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_8.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_8.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -12,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a>
 	  </li>
 	</ul>

Modified: trunk/waskaweb/templates/appointments/beta/show_9.mako
===================================================================
--- trunk/waskaweb/templates/appointments/beta/show_9.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/beta/show_9.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -12,7 +12,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a>
 	  </li>
 	</ul>

Modified: trunk/waskaweb/templates/appointments/dialogs/confirm.mako
===================================================================
--- trunk/waskaweb/templates/appointments/dialogs/confirm.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/dialogs/confirm.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,8 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-	<li><a href="/appointment">Termine</a></li>
-	<li><a href="/appointment/overview">Termine &Uuml;bersicht</a></li>
-	<li><a href="#">Termin L&ouml;schen</a></li>
+        <li><a href="/appointment">${_('menu_app_link_overview')}</a></li>
+	<li><a href="/appointment/overview">${_('app_np_list')}</a></li>
+	<li><a href="#">${_('app_np_delete')}</a></li>
 </%def>
 <%include file="../../dialogs/confirm.mako" />

Modified: trunk/waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako
===================================================================
--- trunk/waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/dialogs/notificate_delete_appointment.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -2,8 +2,8 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-	<li><a href="/appointment">Termine</a></li>
-	<li><a href="/appointment/overview">Termine &Uuml;bersicht</a></li>
-	<li><a href="#">Termin L&ouml;schen</a></li>
+	<li><a href="/appointment">${_('menu_app_link_overview')}</a></li>
+	<li><a href="/appointment/overview">${_('app_np_list')}</a></li>
+	<li><a href="#">${_('app_np_delete')}</a></li>
 </%def>
 <%include file="../../dialogs/notification.mako" />

Modified: trunk/waskaweb/templates/appointments/new.mako
===================================================================
--- trunk/waskaweb/templates/appointments/new.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/new.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,7 @@
 <%inherit file="../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/appointment">${_('app_np_root')}</a></li>
+	<li><a href="/appointment/overview">${_('app_np_list')}</a></li>
 	<li><a href="/appointment/new/">${_('app_np_new')}</a></li>
 </%def>
 <div id="content_header_small">
@@ -11,7 +11,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview_back')}
+		<li><a href="${h.url_for(controller='appointment', action='overview')}"> ${_('menu_app_link_overview_back')}
 	    </a></li>
 	</ul>
     </div>

Modified: trunk/waskaweb/templates/appointments/overview.mako
===================================================================
--- trunk/waskaweb/templates/appointments/overview.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/overview.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,6 @@
 <%inherit file="../main.mako" />
 <%def name="buildNavipath()">
-		${parent.buildNavipath()}
-	<li><a href="/appointment">${_('app_np_root')}</a></li>
+		${parent.buildNavipath()}	
 	<li><a href="/appointment/overview">${_('app_np_list')}</a></li>
 </%def>
 % if h.hasRole(['admin_ka']):
@@ -12,7 +11,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/appointment/create">${self.buildIco()} ${_('app_actions_link_newappointment')}</a></li>
+		<li><a href="/appointment/create"> ${_('app_actions_link_newappointment')}</a></li>
 	</ul>
     </div>
   </div>

Modified: trunk/waskaweb/templates/appointments/overview_body.mako
===================================================================
--- trunk/waskaweb/templates/appointments/overview_body.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/overview_body.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,24 +1,24 @@
 ## -*- coding: utf-8 -*-
 <table>
 	<tr>
-		<th width="100">${_('app_overview_tbl_header_date')}</th>
-		<th>${_('app_overview_tbl_header_desc')}</th>
-		<th>${_('app_overview_tbl_header_actions')}</th>
+		<th class="table_date table_header_h">${_('app_overview_tbl_header_date')}</th>
+		<th class="table_description table_header_h">${_('app_overview_tbl_header_desc')}</th>
+		<th class="table_action table_header_h">${_('app_overview_tbl_header_actions')}</th>
 	</tr>
 % if h.hasRole(['cm_ka']):
 <!-- appointments for cm -->
 	<tr>
 		<td>07.12.2007</td>
 		<td>Akte pr&#252;fen </td>
-		<td>
+		<td class="table_action">
 			<a href="/appointment/show/5">${_('app_overview_body_table_show')}</a>
 			<a href="/appointment/delete/5">${_('app_overview_body_table_delete')}</a>
 		</td>
 	</tr>
 	<tr>
-		<td>17.12.2007</td>
-		<td>Auswertung Fallakten vorbereiten</td>
-		<td>
+		<td class="table_row_h">17.12.2007</td>
+		<td class="table_row_h">Auswertung Fallakten vorbereiten</td>
+		<td class="table_row_h table_action">
 			<a href="/appointment/show/6">${_('app_overview_body_table_show')}</a>
 			<a href="/appointment/delete/6">${_('app_overview_body_table_delete')}</a>
 		</td>
@@ -26,14 +26,14 @@
 	<tr>
 		<td>21.12.2007</td>
 		<td>Weihnachtsfeier</td>
-		<td>
+		<td class="table_action">
 			<a href="/appointment/show/7">${_('app_overview_body_table_show')}</a>
 		</td>
 	</tr>
 	<tr>
-		<td>14.01.2008</td>
-		<td>Gespr&#228;ch mit Peter Koch</td>
-		<td>
+		<td class="table_row_h">14.01.2008</td>
+		<td class="table_row_h">Gespr&#228;ch mit Peter Koch</td>
+		<td class="table_row_h table_action">
 			<a href="/appointment/show/9">${_('app_overview_body_table_show')}</a>
 			<a href="/appointment/delete/9">${_('app_overview_body_table_delete')}</a>
 		</td>
@@ -44,7 +44,7 @@
 	<tr>
 		<td>21.12.2007</td>
 		<td>Weihnachtsfeier</td>
-		<td>
+		<td class="table_action" >
 			<a href="/appointment/show/7">${_('app_overview_body_table_show')}</a>
 			<a href="/appointment/delete/7">${_('app_overview_body_table_delete')}</a>
 		</td>
@@ -62,9 +62,9 @@
   </tr>
   % for a in c.appointments:
   <tr>
-    <td>${a.date}</td>
-    <td>${a.title}</td>
-    <td>
+    <td>${a.date| F.NA, h}</td>
+    <td>${a.title| F.NA, h}</td>
+    <td class="table_action">
       <a href="${h.url_for(controller='appointment', action='show', id=a.id)}">Anzeigen</a>
       % if a.global_app:
           % if h.hasRole(['admin_ka']):

Modified: trunk/waskaweb/templates/appointments/show.mako
===================================================================
--- trunk/waskaweb/templates/appointments/show.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/appointments/show.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,8 @@
 <%inherit file="../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/appointment"></a>${_('app_np_root')}</li>
-	<li><a href="/appointment/show/"></a>${_('app_np_show')}</li>
+        <li><a href="/appointment/overview">${_('app_np_list')}</a></li>
+      	<li><a href="/appointment/show/"></a>${_('app_np_show')}</li>
 </%def>
 <div id="content_header_small">
   <div id="content_ueberschrift">
@@ -11,7 +11,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska')}">${self.buildIco()} ${_('sm_menu_link_home_back')}
+		<li><a href="${h.url_for(controller='waska')}"> ${_('sm_menu_link_home_back')}
             </a>
           </li>
 	</ul>

Modified: trunk/waskaweb/templates/casemanagement/appointments.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/appointments.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/appointments.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,8 @@
 <%inherit file="main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	        <li><a href="/case/select/${session.get('case_id')}/1">${_('cm_np_select')}</a></li>
-		<li><a href="/case/appointments/${session.get('case_id')}">${_('app_np_list')}</a></li>
+	        <li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
+		<li><a href="/case/appointments/${session.get('case').id}">${_('app_np_list')}</a></li>
 </%def>
 
 <div id="content_header_small">
@@ -14,7 +14,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/case/newAppointment">${self.buildIco()} ${_('app_actions_link_newappointment')}</a></li>
+		<li><a href="/case/newAppointment"> ${_('app_actions_link_newappointment')}</a></li>
 	</ul>
     </div>
   </div>

Added: trunk/waskaweb/templates/casemanagement/bundle_editor.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/bundle_editor.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/bundle_editor.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,28 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
+<%def name="buildNavipath()">
+		${parent.buildNavipath()}
+</%def>
+
+<div id="content_header_small">
+  <div id="content_ueberschrift">
+${_('cm_header_organisation')}
+  </div>
+</div>
+<p>${_('cm_bundle_editor_explain')}:</p>
+<ul>
+% for case in c.case_list:
+  <li>${case.first_name}, ${case.last_name}</li>
+% endfor
+</ul>
+% if h.hasRole(['admin_ka']):
+<form action="${h.url_for(controller="case_overview", action="setEditorAction")}" method="POST">
+<select name="editor">
+% for user in c.user_list:
+  <option value="${user.id | F.NA, h}">${user.first_name | F.NA, h} ${user.last_name | F.NA, h}</option>
+% endfor
+</select>
+<input type="submit" value="${_('cm_form_editor_submit')}">
+</form>
+% endif

Added: trunk/waskaweb/templates/casemanagement/bundle_standin.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/bundle_standin.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/bundle_standin.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,52 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
+<%def name="buildNavipath()">
+		${parent.buildNavipath()}
+</%def>
+
+<div id="content_header_small">
+  <div id="content_ueberschrift">
+${_('cm_header_organisation')}
+  </div>
+</div>
+<h2>${_('cm_header_standin')}</h2>
+<p>${_('cm_bundle_standin_explain')}.
+% if not c.current_user.isAdmin():
+  ${_('cm_bundle_standin_explain_cm_ka')}.
+% endif
+</p>
+<ul>
+% for case in c.case_list:
+  % if case.getEditor() == c.current_user.id or c.current_user.isAdmin():
+    <li>${case.first_name}, ${case.last_name}</li>
+  % else:
+    <li>${case.first_name}, ${case.last_name} (wird nicht bearbeitet)</li>
+  % endif 
+% endfor
+</ul>
+<p><strong>${_('attention')}!</strong> ${_('cm_bundle_standin_explain_attention')}.</p>
+% if (h.hasRole(['admin_ka'])) or True: 
+<form action="${h.url_for(controller="case_overview", action="setStandinAction")}" method="POST">
+<table>
+  <tr>
+    <th class="table_header_h table_checkbox"></th>
+    <th class="table_header_h table_description">Bearbeiter</th>
+  </tr>
+  <% idset = True %>
+  % for user in c.user_list:
+    <tr>
+    % if idset:
+       <td><input type="checkbox" name="standin-${user.id | h}" value="${user.id | h}"></td>
+       <td>${user.first_name | F.NA, h}, ${user.last_name | F.NA, h}</td>
+    % else:
+       <td class="table_row_v_12"><input type="checkbox" name="standin-${user.id | h}" value="${user.id | h}"></td>
+       <td class="table_row_v_12">${user.first_name | F.NA, h}, ${user.last_name | F.NA, h}</td>
+    % endif
+    </tr>
+    <% idset = not idset %>
+  % endfor
+</table>
+<input type="submit" value="${_('cm_form_standin_submit')}">
+</form>
+% endif

Added: trunk/waskaweb/templates/casemanagement/caselist.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/caselist.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/caselist.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,49 @@
+## -*- coding: utf-8 -*-
+<%! import waskaweb.lib.filters as F %>
+<table>
+  <tr>
+    <th class="table_header_h"></th>
+    <th class="table_id table_header_h">${_('cm_overview_tbl_header_id')}</th>
+    <th class="table_name table_header_h">${_('cm_overview_tbl_header_firstname')}</th>
+    <th class="table_name table_header_h">${_('cm_overview_tbl_header_lastname')}</th>
+    <th class="table_action table_header_h">${_('cm_overview_tbl_header_actions')}</th>
+  </tr>
+  <% idset = True %>
+  % for case in c.cases.getDatasets():
+    % if idset:
+      <tr>
+        <td><input type="checkbox" name="case_id" value="${case.id}"></td>
+        <td>${case.knr       | F.NA, h}</td>
+        <td>${case.first_name| F.NA, h}</td>
+        <td>${case.last_name | F.NA, h}</td>
+        <td>
+          <a href="/case/select/${case.id}/0/">${_('cm_overview_a_show')}</a> 
+          % if h.hasRole('admin_ka'):
+            <a href="/case/delete/${case.id}/0/">${_('cm_overview_a_delete')}</a> 
+          % endif
+        </td>
+      </tr>
+    % else:
+      <tr>
+        <td class="table_row_h"><input type="checkbox" name="case_id" value="${case.id}"></td>
+        <td class="table_row_h">${case.knr       | F.NA, h}</td>
+        <td class="table_row_h">${case.first_name| F.NA, h}</td>
+        <td class="table_row_h">${case.last_name | F.NA, h}</td>
+        <td class="table_row_h">
+          <a href="/case/select/${case.id}/0/">${_('cm_overview_a_show')}</a> 
+          % if h.hasRole('admin_ka'):
+          <a href="/case/delete/${case.id}/0/">${_('cm_overview_a_delete')}</a> 
+          % endif
+        </td>
+      </tr>
+    % endif
+    <% idset = not idset %>
+  % endfor
+  % if len(c.cases.getDatasets()) == 0:
+  <tr>
+    <td colspan="6">
+      ${_('cm_overview_tbl_no_data_found')}
+    </td>
+  </tr>
+  % endif
+</table>

Added: trunk/waskaweb/templates/casemanagement/dialogs/bundle_noselection.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/dialogs/bundle_noselection.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/dialogs/bundle_noselection.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,9 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../../main.mako" />
+<%def name="buildNavipath()">
+	${parent.buildNavipath()}
+	<li><a href="/case">Fallakten</a></li>
+	<li><a href="/case_overview">Fallaktenübersicht</a></li>
+	<li><a href="#">Aktion für mehrere Fallakten durchführen</a></li>
+</%def>
+<%include file="../../dialogs/notification.mako" />

Added: trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_delete.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_delete.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_delete.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,9 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../../main.mako" />
+<%def name="buildNavipath()">
+	${parent.buildNavipath()}
+	<li><a href="/case">Fallakten</a></li>
+	<li><a href="/case_overview">Fallaktenübersicht</a></li>
+	<li><a href="#">Fallakten löschen</a></li>
+</%def>
+<%include file="../../dialogs/notification.mako" />

Added: trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_seteditor.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_seteditor.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_seteditor.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,9 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../../main.mako" />
+<%def name="buildNavipath()">
+	${parent.buildNavipath()}
+	<li><a href="/case">Fallakten</a></li>
+	<li><a href="/case_overview">Fallaktenübersicht</a></li>
+	<li><a href="#">Fallakten Bearbeiter setzen</a></li>
+</%def>
+<%include file="../../dialogs/notification.mako" />

Added: trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_setstandin.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_setstandin.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/dialogs/notificate_bundle_setstandin.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,9 @@
+## -*- coding: utf-8 -*- 
+<%inherit file="../../main.mako" />
+<%def name="buildNavipath()">
+	${parent.buildNavipath()}
+	<li><a href="/case">Fallakten</a></li>
+	<li><a href="/case_overview">Fallaktenübersicht</a></li>
+	<li><a href="#">Fallakten Vertretung setzen</a></li>
+</%def>
+<%include file="../../dialogs/notification.mako" />

Modified: trunk/waskaweb/templates/casemanagement/digest.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/digest.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/digest.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -2,8 +2,8 @@
 <%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
       	${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/case/digest/${session.get('case_id')}">${_('cm_np_digest')}</a></li>
+	<li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
+	<li><a href="/case/digest/${session.get('case').id}">${_('cm_np_digest')}</a></li>
 </%def>
 
 <div id="content_header_small">
@@ -11,42 +11,45 @@
 ${_('cm_header_digest')}
   </div>
 </div>
-<p>${_('cm_digest_con_digest_dossier')}</p> 
+<!--<div class="additional_information">
+<div class="additional_information_img"><img src="/images/info_small.png"  alt="Information"/> </div>
+<div class="additional_information_p">-->${_('cm_digest_con_digest_dossier')}<!--<br></div>
+</div> -->
 <h2>${_('cm_header_digest_personal')}</h2>
 <table>
 	<tr>
-		<td class="label">${_('cm_digest_tbl_label_lastname')}</td>
-		<td>${c.digest.last_name | F.NA, h}</td>
+		<td class="label table_header_v table_width_mid_l">${_('cm_digest_tbl_label_lastname')}</td>
+		<td class="table_row_v table_description">${c.digest.last_name | F.NA, h}</td>
 	</tr>
 	<tr>
 		<td class="label">${_('cm_digest_tbl_label_firstname')}</td>
-		<td>${c.digest.first_name | F.NA, h}</td>
+		<td class="table_row_v_2">${c.digest.first_name | F.NA, h}</td>
 	</tr>
 	<tr>
-		<td class="label">${_('cm_digest_tbl_label_caseid')}</td>
-		<td>${c.digest.knr | F.NA, h}</td>
+		<td class="label table_header_v">${_('cm_digest_tbl_label_caseid')}</td>
+		<td class="table_row_v">${c.digest.knr | F.NA, h}</td>
 	</tr>
 	<tr>
 		<td class="label">${_('cm_digest_tbl_label_age')}</td>
-		<td>${c.digest.age | F.NA, h}</td>
+		<td class="table_row_v_2">${c.digest.age | F.NA, h}</td>
 	</tr>
 </table>
 <h2>${_('cm_digest_header_address')}</h2>
 <table>
 	<tr>
-		<td class="label">${_('cm_digest_tbl_label_street')}</td>
-		<td>${c.digest.address | F.NA, h}</td>
+		<td class="label table_header_v table_width_mid_l">${_('cm_digest_tbl_label_street')}</td>
+		<td class="table_row_v table_description">${c.digest.street | F.NA, h}</td>
 	</tr>
 	<tr>
 		<td class="label">${_('cm_digest_tbl_label_plz')}</td>
-		<td>${c.digest.plz | F.NA, h}</td>
+		<td class="table_row_v_2">${c.digest.plz | F.NA, h}</td>
 	</tr>
 	<tr>
-		<td class="label">${_('cm_digest_tbl_label_city')}</td>
-		<td>${c.digest.city | F.NA, h}</td>
+		<td class="label table_header_v">${_('cm_digest_tbl_label_city')}</td>
+		<td class="table_row_v">${c.digest.city | F.NA, h}</td>
 	</tr>
 	<tr>
 		<td class="label">${_('cm_digest_tbl_label_telephone')}</td>
-		<td>(${c.digest.telephone_1 | F.NA, h}) ${c.digest.telephone_2 | F.NA, h}</td>
+		<td class="table_row_v_2">(${c.digest.telephone_1 | F.NA, h}) ${c.digest.telephone_2 | F.NA, h}</td>
 	</tr>
 </table>

Modified: trunk/waskaweb/templates/casemanagement/evaluation_result.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/evaluation_result.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/evaluation_result.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/case">${_('cm_np_root')}</a></li>
@@ -35,154 +36,292 @@
 <h3><a name="eval_1">${_('cm_eval_header_1')}</a></h3>
 <table class="evaluation">
   <tr>
-    <td class="label">${_('cm_eval_table_consult_customer')}</td>
-    <td class="table_width_50">${c.eval_1_total}</td>
-    <td class="table_width_100">(100%)</td>
-    <td></td>
+    <th class="table_header_h table_width_long">${_('cm_eval_table_adolescent')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_s"></th>
   </tr>
   <tr>
-    <td class="label">${_('cm_eval_table_taken_over_to_cm')}</td>
-    <td>${c.eval_1_cm}</td>
-    <td>(${c.eval_1_percent}%)</td>
+    <td>${_('cm_eval_table_consult_customer')}</td>
+    <td>${c.eval_1_total| F.NA, h}</td>
+    <td>(100%)</td>
     <td></td>
   </tr>
+  <tr>
+    <td class="label table_row_v_12">${_('cm_eval_table_taken_over_to_cm')}</td>
+    <td class="table_row_v_12" >${c.eval_1_cm| F.NA, h}</td>
+    <td class="table_row_v_12">(${c.eval_1_percent| F.NA, h}%)</td>
+    <td class="table_row_v_12 table_width_mid_s"></td>
+  </tr>
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_1/auswertung_1.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_1/auswertung_1_beratung.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>
 <div class="evaluation even-row"> 
 <h3><a name="eval_2">${_('cm_eval_header_2')}</a></h3>
 <table class="evaluation">
   <tr>
-    <th>${_('cm_eval_table_month')}</th>
-    <th class="table_width_150">${_('cm_eval_table_completed')}</th>
-    <th class="table_width_150">${_('cm_eval_table_aborted')}</th>
-    <th></th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_month')}</th>
+    <th class="table_header_h table_width_mid_l">${_('cm_eval_table_completed')}</th>
+    <th class="table_header_h table_width_mid_l">${_('cm_eval_table_aborted')}</th>
+    <th class="table_header_h table_width_mid_s" ></th>
   </tr>
+  <% idset = 0 %>
   % for r in c.eval_10:
-  <tr>
-    <td class="label">${r[0]}</td>
-    <td>${r[1]} (${r[2]}%)</td>
-    <td>${r[3]} (${r[4]}%)</td>
+   % if idset==0:
+   <tr>
+    <td>${r[0]}</td>
+    <td>${r[1]| F.NA, h} (${r[2]| F.NA, h}%)</td>
+    <td>${r[3]| F.NA, h} (${r[4]| F.NA, h}%)</td>
     <td></td>
   </tr>
+  <% idset = 1 %>
+  % else:
+   <tr>
+     <td class="table_row_v_12">${r[0]}</td>
+     <td class="table_row_v_12">${r[1]| F.NA, h} (${r[2]| F.NA, h}%)</td>
+     <td class="table_row_v_12">${r[3]| F.NA, h} (${r[4]| F.NA, h}%)</td>
+     <td class="table_row_v_12 table_width_mid_s"></td>
+   </tr>
+  <% idset = 0 %>
+  % endif
   % endfor
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_10/auswertung_10.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_10/auswertung_2_abgeschlossen.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>
 <div class="evaluation odd-row">
 <h3><a name="eval_3">${_('cm_eval_header_3')}</a></h3>
 <h4>${_('cm_eval_header_on_gender')} </h4>
 <table class="evaluation">
   <tr>
-    <td class="label">${_('cm_eval_label_male')}</td>
-    <td class="table_width_50">${c.eval_2_m[0]}</td>
-    <td class="table_width_100">(${c.eval_2_m[1]}%)</td>
-    <td></td>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_gender')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_long"></th>
   </tr>
   <tr>
-    <td class="label">${_('cm_eval_label_female')}</td>
-    <td>${c.eval_2_w[0]}</td>
-    <td class="table_width_100">(${c.eval_2_w[1]}%)</td>
+    <td>${_('cm_eval_label_male')}</td>
+    <td>${c.eval_2_m[0]| F.NA, h}</td>
+    <td>(${c.eval_2_m[1]| F.NA, h}%)</td>
     <td></td>
   </tr>
   <tr>
-    <td class="label">${_('cm_eval_label_intersexual')}</td>
-    <td>${c.eval_2_i[0]}</td>
-    <td class="table_width_100">(${c.eval_2_i[1]}%)</td>
+    <td class="table_row_v_12">${_('cm_eval_label_female')}</td>
+    <td class="table_row_v_12">${c.eval_2_w[0]| F.NA, h}</td>
+    <td class="table_row_v_12">(${c.eval_2_w[1]| F.NA, h}%)</td>
+    <td class="table_row_v_12 table_width_long"></td>
+  </tr>
+  <tr>
+    <td>${_('cm_eval_label_intersexual')}</td>
+    <td>${c.eval_2_i[0]| F.NA, h}</td>
+    <td>(${c.eval_2_i[1]| F.NA, h}%)</td>
     <td></td>
   </tr>
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_2/auswertung_2.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_2/auswertung_3_geschlecht.csv">${_('cm_eval_table_export_analysis')}</a>
 <h4>${_('cm_eval_header_on_age')}</h4>
 <table class="evaluation">
+  <tr>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_age')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_long"></th>
+  </tr>
+<% idset = 0 %>
 % for v in c.eval_8:
+  % if idset==0:
   <tr>
-    <td class="label">${v[0]}</td>
-    <td class="table_width_50">${v[1]}</td>
-    <td class="table_width_100">${v[2]}%</td>
+    <td>${v[0]| F.NA, h}</td>
+    <td>${v[1]| F.NA, h}</td>
+    <td>${v[2]| F.NA, h}%</td>
   <td></td>
   </tr>
+  <% idset = 1 %>
+  % else:
+  <tr>
+    <td class="table_row_v_12">${v[0]| F.NA, h}</td>
+    <td class="table_row_v_12">${v[1]| F.NA, h}</td>
+    <td class="table_row_v_12">${v[2]| F.NA, h}%</td>
+    <td class="table_row_v_12 table_width_long"></td>
+  </tr>
+  <% idset = 0 %>
+  % endif
 % endfor
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_8/auswertung_8.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_8/auswertung_3_alter.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>
 <div class="evaluation even-row">
-<h3><a name="eval_4">${_('cm_eval_header_4')}</a></h3>
+<h3><a name="eval_4">${_('cm_eval_header_4')| F.NA, h}</a></h3>
 <table class="evaluation">
   <tr>
-    <td class="label">${_('cm_eval_label_migration_background')}</td>
-    <td class="table_width_50">${c.eval_3[0]}</td>
-    <td class="table_width_100">(${c.eval_3[1]}%)</td>
-    <td></td>
+    <th class="table_header_h table_width_long">${_('cm_eval_table_category')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_s"></th>
   </tr>
+  <tr>
+    <td>${_('cm_eval_label_migration_background')}</td>
+    <td>${c.eval_3[0]| F.NA, h}</td>
+    <td>(${c.eval_3[1]| F.NA, h}%)</td>
+    <td class="table_width_mid_s"></td>
+  </tr>
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_3/auswertung_3.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_3/auswertung_4_migration.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>
 <div class="evaluation odd-row">
 <h3><a name="eval_5">${_('cm_eval_header_5')}</a></h3>
 <h4>${_('cm_eval_header_access_youngster_to_agency')}</h4>
 <table class="evaluation">
+   <tr>
+    <th class="table_header_h table_width_long">${_('cm_eval_table_access')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_s"></th>
+  </tr> 
+<% idset = 0 %>
 % for r in c.eval_4.itervalues():
-  <tr>
-    <td class="label">${r[0]}</td>
-    <td class="table_width_50">${r[1]}</td>
-    <td class="table_width_100">(${r[2]}%)</td>
-    <td></td>
-  </tr>
+  % if idset==0:
+   <tr>
+     <td>${r[0]}</td>
+     <td>${r[1]| F.NA, h}</td>
+     <td>(${r[2]| F.NA, h}%)</td>
+     <td></td>
+   </tr>
+   <% idset = 1 %>
+    % else:
+    <tr>
+      <td class="table_row_v_12 table_width_long">${r[0]}</td>
+      <td class="table_row_v_12">${r[1]| F.NA, h}</td>
+      <td class="table_row_v_12">(${r[2]| F.NA, h}%)</td>
+      <td class="table_row_v_12 table_width_mid_s "></td>
+    </tr>
+    <% idset = 0 %>
+  % endif
 % endfor 
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_4/auswertung_4.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_4/auswertung_5_zugang.csv">${_('cm_eval_table_export_analysis')}</a>
 <h4>${_('cm_eval_head_law_access_agency')}</h4>
 <table class="evaluation">
+   <tr>
+    <th class="table_header_h table_width_mid_l">${_('cm_eval_table_law')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_l"></th>
+  </tr> 
+<% idset = 0 %>
 % for r in c.eval_5.itervalues():
-  <tr>
-    <td class="label">${r[0]}</td>
-    <td class="table_width_50">${r[1]}</td>
-    <td class="table_width_100">(${r[2]}%)</td>
-    <td></td>
-  </tr>
+  % if idset==0:
+   <tr>
+     <td>${r[0]| F.NA, h}</td>
+     <td>${r[1]| F.NA, h}</td>
+     <td>(${r[2]| F.NA, h}%)</td>
+     <td></td>
+   </tr>
+   <% idset = 1 %>
+  % else:
+   <tr>
+     <td class="table_row_v_12">${r[0]| F.NA, h}</td>
+     <td class="table_row_v_12">${r[1]| F.NA, h}</td>
+     <td class="table_row_v_12">(${r[2]| F.NA, h}%)</td>
+     <td class="table_row_v_12 table_width_mid_l"></td>
+   </tr>
+   <% idset = 0 %>
+  % endif
 % endfor 
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_5/auswertung_5.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_5/auswertung_5_rechtskreis.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>
 <div class="evaluation even-row">
 <h3><a name="eval_6">${_('cm_eval_header_6')}</a></h3>
 <table class="evaluation">
+  <tr>
+    <th class="table_header_h table_width_long">${_('cm_eval_table_offer')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_s"></th>
+  </tr>
+<% idset = 0 %>
 % for r in c.eval_9:
+  % if idset==0:
   <tr>
-    <td class="label">${r[0]}</td>
-    <td class="table_width_50">${r[1]}</td>
-    <td class="table_width_100">(${r[2]}%)</td>
+    <td>${r[0]| F.NA, h}</td>
+    <td>${r[1]| F.NA, h}</td>
+    <td>(${r[2]| F.NA, h}%)</td>
     <td></td>
   </tr>
+  <% idset = 1 %>
+  % else:
+   <tr>
+     <td class="table_row_v_12">${r[0]| F.NA, h}</td>
+     <td class="table_row_v_12">${r[1]| F.NA, h}</td>
+     <td class="table_row_v_12">(${r[2]| F.NA, h}%)</td>
+     <td class="table_row_v_12 table_width_mid_s"></td>
+   </tr>
+   <% idset = 0 %>
+  % endif
 % endfor 
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_9/auswertung_9.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_9/auswertung_6_bedarf.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>
 <div class="evaluation odd-row">
 <h3><a name="eval_7">${_('cm_eval_header_7')}</a></h3>
 <h4>${_('cm_eval_head_where_to_place_youngster')}</h4>
 <table class="evaluation">
+   <tr>
+    <th class="table_header_h table_width_mid_l">${_('cm_eval_table_place')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_l"></th>
+  </tr>
+<% idset = 0 %>
 % for r in c.eval_6.itervalues():
-  <tr>
-    <td class="label">${r[0]}</td>
-    <td class="table_width_50">${r[1]}</td>
-    <td class="table_width_100">(${r[2]}%)</td>
-    <td></td>
-  </tr>
+  % if idset==0:
+   <tr>
+     <td>${r[0]| F.NA, h}</td>
+     <td>${r[1]| F.NA, h}</td>
+     <td>(${r[2]| F.NA, h}%)</td>
+     <td></td>
+   </tr>
+   <% idset = 1 %>
+  % else:
+   <tr>
+     <td class="table_row_v_12">${r[0]| F.NA, h}</td>
+     <td class="table_row_v_12">${r[1]| F.NA, h}</td>
+     <td class="table_row_v_12">(${r[2]| F.NA, h}%)</td>
+     <td class="table_row_v_12 table_width_mid_l"></td>
+   </tr>
+   <% idset = 0 %>
+ % endif
 % endfor 
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_6/auswertung_6.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_6/auswertung_7_vermittelt.csv">${_('cm_eval_table_export_analysis')}</a>
 <h4>${_('cm_eval_header_law_changed_after_place')}</h4>
 <table class="evaluation">
+   <tr>
+    <th class="table_header_h table_width_mid_l">${_('cm_eval_table_law_change')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_number')}</th>
+    <th class="table_header_h table_width_mid_s">${_('cm_eval_table_percent')}</th>
+    <th class="table_header_h table_width_mid_l"></th>
+  </tr>
+<% idset = 0 %>
 % for r in c.eval_7.itervalues():
-  <tr>
-    <td class="label">${r[0]}</td>
-    <td class="table_width_50">${r[1]}</td>
-    <td class="table_width_100">(${r[2]}%)</td>
-    <td></td>
-  </tr>
+  % if idset==0:
+   <tr>
+     <td>${r[0]| F.NA, h}</td>
+     <td>${r[1]| F.NA, h}</td>
+     <td>(${r[2]| F.NA, h}%)</td>
+     <td></td>
+   </tr>
+   <% idset = 1 %>
+   % else:
+   <tr>
+     <td class="table_row_v_12">${r[0]| F.NA, h}</td>
+     <td class="table_row_v_12">${r[1]| F.NA, h}</td>
+     <td class="table_row_v_12">(${r[2]| F.NA, h}%)</td>
+     <td class="table_row_v_12 table_width_mid_l"></td>
+   </tr>
+   <% idset = 0 %>
+ % endif
 % endfor 
 </table>
-<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_7/auswertung_7.csv">${_('cm_eval_table_export_analysis')}</a>
+<a href="#top">${_('cm_eval_table_to_overview')}</a> | <a href="/evaluate/exportEvaluation_7/auswertung_7_rechtskreis.csv">${_('cm_eval_table_export_analysis')}</a>
 </div>

Modified: trunk/waskaweb/templates/casemanagement/formular.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/formular.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/formular.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,7 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="main.mako" />
 <!--
-% if session.get("case_modus", "")  == "edit":
+% if session.get('case').getMode()  == "edit":
 <h1>${_('cm_header_form_edit')}</h1>
 % else:
 <h1>${_('cm_header_form_show')}</h1>
@@ -11,16 +11,16 @@
 
 <!--
 <div class="actions">
-	<ul>
-                % if h.hasRole(['cm_ka']):
-                  % if session["case_modus"] == "edit":
-                    <li><a href="/case/show/${c.ds_id}/${c.page_id}">${_('cm_actions_link_show')}</a></li>
-                  % else:
-                    <li><a href="/case/edit/${c.ds_id}/${c.page_id}">${_('cm_actions_link_edit')}</a></li>
-                  % endif
-                % endif
-		<li><a href="/case/printout/${c.ds_id}/${c.page_id}/show" target="_blank">${_('cm_actions_link_printout')}</a></li>
-	</ul>
+  <ul>
+  % if h.hasRole(['cm_ka']):
+    % if session.get('case').getMode() == "edit":
+      <li><a href="/case/show/${c.ds_id}/${c.page_id}">${_('cm_actions_link_show')}</a></li>
+    % else:
+      <li><a href="/case/edit/${c.ds_id}/${c.page_id}">${_('cm_actions_link_edit')}</a></li>
+    % endif
+  % endif
+  <li><a href="/case/printout/${c.ds_id}/${c.page_id}/show" target="_blank">${_('cm_actions_link_printout')}</a></li>
+  </ul>
 </div>
 -->
 <div class="waska_form">
@@ -31,56 +31,63 @@
 <div class="clearer" ></div>
 <%def name="buildNavipath()">
       	${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}/1" onclick="return checkModification();">${_('cm_np_select')}</a></li>
-	<li><a href="/case/${session['case_modus']}/${c.ds_id}/${c.page_id}" onclick="return checkModification();">${h.getFormularName(c.page_id)}</a></li>
+	<li><a href="/case/select/${session.get('case').id}/1" onclick="return checkModification();">${_('cm_np_select')}</a></li>
+	<li><a href="/case/${session.get('case').getMode()}/${c.ds_id}/${c.page_id}" onclick="return checkModification();">${h.getFormularName(c.page_id)}</a></li>
 </%def>
 
 <%def name="buildFormErrors()">
-  % if len(h.getFormularErrors(c.page_id)) > 0:
+% if len(h.getFormularErrors(c.page_id)) > 0:
   <div class="form_errors">
-    <a name="error_list"><h1>${_('cm_error_header_false_forminput')}</h1></a>
+    <h1><a name="error_list">${_('cm_error_header_false_forminput')}</a></h1>
     <ul>
     % for key, error in h.getFormularErrors(c.page_id).iteritems():
-      <li><a href="#${key}">${error.getName()}</a>:  ${"<br>".join(error.getMessages())}</a></li>
+      <li><a href="#f_${key}">${error.getName()}</a>:  ${"<br>".join(error.getMessages())}</li>
     % endfor
     </ul>
   </div>
-  % endif
+% endif
 </%def>
 
+<%def name="buildContentHeader()">
+  <div id="content_header">
+    ${self.buildUeberschrift()}
+    ${self.buildModusfield()}
+  </div>
+</%def>
 
 <%def name="buildUeberschrift()">
 % if len(h.getFormularHeaders(c.page_id)) > 0:
- <div id="content_header">
-<div id="content_ueberschrift">
-<ul>
-   % for header in h.getFormularHeaders(c.page_id):
-   <li id="first_level_header"><h1>${header} </h1></li>
-   % endfor
-</ul>
-</div>
+  <div id="content_ueberschrift">
+    <ul>
+    % for header in h.getFormularHeaders(c.page_id):
+      <li><h1>${header} </h1></li>
+    % endfor
+    </ul>
+  </div>
 % endif
 </%def>
 
 <%def name="buildModusfield()">
   <div id="modusfield">
-  <div class="actions">
-    <ul>
-      % if c.show_form_actions:
+    <div id="modusinfo">
+    % if session.get('case').getMode() == "show":
+      <h1>Ansichtsmodus</h1>
+    % else:
+      <h1>Bearbeitungsmodus</h1>
+    % endif
+    </div>
+    <div class="actions">
+      <ul>
         % if h.hasRole(['cm_ka']):
-          % if session["case_modus"] == "edit":
-            <li><a href="/case/show/${c.ds_id}/${c.page_id}" onclick="return checkModification();">${self.buildIco()} ${_('cm_actions_link_show')}</a></li>
+          % if session.get('case').getMode() == "edit":
+            <li><a href="/case/show/${c.ds_id}/${c.page_id}" onclick="return checkModification();"> ${_('cm_actions_link_show')}</a></li>
           % else:
-            <li><a href="/case/edit/${c.ds_id}/${c.page_id}" onclick="return checkModification();">${self.buildIco()} ${_('cm_actions_link_edit')}</a></li>
+            <li><a href="/case/edit/${c.ds_id}/${c.page_id}" onclick="return checkModification();"> ${_('cm_actions_link_edit')}</a></li>
           % endif
         % endif
-      % endif
-      % if c.print_form:
-        <li><a href="${h.getPrintUrl(c.print_form, c.ds_id, c.page_id)}" target="_blank" onclick="return checkModification();">${self.buildIco()} ${_('cm_actions_link_printout')}</a></li>
-      % endif
-    </ul>
+        <li><a href="${h.getPrintUrl(c.print_form, c.ds_id, c.page_id)}" target="_blank" onclick="return checkModification();"> ${_('cm_actions_link_printout')}</a></li>
+      </ul>
+    </div>
   </div>
-</div>
-</div>
 </%def>
 

Modified: trunk/waskaweb/templates/casemanagement/main.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/main.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/main.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -6,7 +6,7 @@
 <%def name="buildNavipath()">
   ${parent.buildNavipath()}
   <li><a href="/case/" onclick="return checkModification();">${_('cm_np_root')}</a></li>
-  <li><a href="/case/overview/" onclick="return checkModification();">${_('cm_np_overview')}</a></li>
+  <li><a href="/case_overview/overview/" onclick="return checkModification();">${_('cm_np_overview')}</a></li>
 </%def>
   
 <%def name="buildModusfield()">
@@ -15,23 +15,23 @@
 <%def name="buildInfofield()">
   <div id="infofield">
     <strong>${_('cm_info_name')}:</strong>
-       ${session.get('case_first_name', "") | F.NA, h} 
-       ${session.get('case_last_name', "")  | F.NA, h}<br>
-    <strong>${_('cm_info_nr')}:</strong> ${session.get('case_nr', "") | F.NA, h}
+       ${session.get('case').first_name | F.NA, h} 
+       ${session.get('case').last_name  | F.NA, h}<br>
+    <strong>${_('cm_info_nr')}:</strong> ${session.get('case').knr | F.NA, h}
   </div>
 </%def>
 
 
 
 <%def name="buildPrivacyfield()">
-  % if h.hasRole(['cm_ka']) and not session.get('case_hasStatement'):
+  % if h.hasRole(['cm_ka']) and session.get('case').hasPrivacyStatement() is None:
    <div class="menu">
-     <h1>Datenschutz</h1>
+     <h1>${_('cm_main_header_data_protection')}</h1>
        <div class="actions">
           <div id="marked">
 	  <ul>
-	  <li><a href="/statement/printPrivacyStatement/${session.get('case_id', None)}" target="_blank" onclick="return checkModification();">${self.buildIco()} ${_('cm_main_print_statement')}</a></li>
-          <li><a href="/statement/setPrivacyStatement/${session.get('case_id', None)}" onclick="return checkModification();">${self.buildIco()} ${_('cm_main_set_statement')}</a></li>
+	  <li><a href="/statement/printPrivacyStatement/${session.get('case').id}" target="_blank" onclick="return checkModification();"> ${_('cm_main_print_statement')}</a></li>
+          <li><a href="/statement/setPrivacyStatement/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_main_set_statement')}</a></li>
 	  </ul>
 	  </div>
        </div>
@@ -40,51 +40,38 @@
 </%def>
 
 <%def name="buildNavigation()">
-    <div class="menu">
-      <h1>${_('cm_menu_header_cases')}</h1>
-      <div class="actions">
-	
-          % if h.hasRole(['cm_ka', 'admin_ka']):
-		${self.buildInfofield()}
-	<ul>
-          <li><a href="${h.url_for(controller='/case', action='overview')}" onclick="return checkModification();">${self.buildIco()} ${_('cm_menu_link_close')}</a></li>
-	  <li><a href="/case/printAll/${session.get('case_id', None)}" onclick="return checkModification();">${self.buildIco()} ${_('cm_menu_link_print')}</a></li>
-          % endif
-        </ul>
-      </div>
+  <div class="menu">
+    <h1>${_('cm_menu_header_cases')}</h1>
+    <div class="actions">
+      
+        % if h.hasRole(['cm_ka', 'admin_ka']):
+              ${self.buildInfofield()}
+      <ul>
+        <li><a href="${h.url_for(controller='/case_overview')}" onclick="return checkModification();"> ${_('cm_menu_link_close')}</a></li>
+        <li><a href="/case/printAll/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_menu_link_print')}</a></li>
+        % endif
+      </ul>
     </div>
-     <div class="menu">
-      <h1>${_('cm_menu_header_seperator')}</h1>
-      <div class="actions">
-        <ul>
-          <li><a href="/case/digest/${session.get('case_id', None)}" onclick="return checkModification();">${self.buildIco()} ${_('cm_menu_link_digest')}</a></li>
-          % if h.hasRole(['cm_ka', 'admin_ka']):
-          <li><a href="/case/organisation/${session.get('case_id', None)}" onclick="return checkModification();">${self.buildIco()} ${_('cm_menu_link_organisation')}</a></li>
-          <li><a href="/case/appointments/${session.get('case_id', None)}" onclick="return checkModification();">${self.buildIco()} ${_('cm_menu_link_appointment')}</a></li>
-          <li><a href="/case/documents/${session.get('case_id', None)}" onclick="return checkModification();">${self.buildIco()} ${_('cm_menu_link_documents')}</a></li>
-          % endif
-        </ul>
-      </div>
+  </div>
+  <div class="menu">
+    <h1>${_('cm_menu_header_seperator')}</h1>
+    <div class="actions">
+      <ul>
+        <li><a href="/case/digest/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_menu_link_digest')}</a></li>
+        % if h.hasRole(['cm_ka', 'admin_ka']):
+        <li><a href="/case/organisation/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_menu_link_organisation')}</a></li>
+        <!--<li><a href="/case/appointments/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_menu_link_appointment')}</a></li>-->
+        <li><a href="/case/documents/${session.get('case').id}" onclick="return checkModification();"> ${_('cm_menu_link_documents')}</a></li>
+        % endif
+      </ul>
     </div>
-    <div class="menu">
-      <h1>${_('cm_menu_header_structure')}</h1>
-      ${c.form_navigation}
-    </div>
-   </div>
   </div>
+  <div class="menu">
+    <h1>${_('cm_menu_header_structure')}</h1>
+    ${c.form_navigation}
+  </div>
 </%def>
 
 
 <%def name="buildUeberschrift()">
 </%def>
-
-
-
-
-
-
-
-
-
-
-

Modified: trunk/waskaweb/templates/casemanagement/new.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/new.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/new.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -10,23 +10,23 @@
 <h1>Neue Fallakte anlegen</h1>
 <div class="waska_form_element w50">
 <label for="vorname_1">Vorname:</label>
-<input class="field" type="text" size="50" maxlength="60" name="vorname_1" id="vorname_1" value="${session.get('case_first_name', "")}"> 
+<input class="field" type="text" size="50" maxlength="60" name="vorname_1" id="vorname_1" value="${c.case.first_name or ""}"> 
 </div>
 <div class="waska_form_element w50">
 <label for="name_1">Name:</label>
-<input class="field" type="text" size="50" maxlength="60" name="name_1" id="name_1" value="${session.get('case_last_name', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="name_1" id="name_1" value="${c.case.last_name or ""}">
 </div>
 <div class="waska_form_element w100">
 <label for="strasse">Strasse:</label>
-<input class="field" type="text" size="50" maxlength="60" name="strasse" id="strasse" value="${session.get('case_address', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="strasse" id="strasse" value="${c.case.street or ""}">
 </div>
 <div class="waska_form_element w25">
 <label for="plz">PLZ:</label>
-<input class="field" type="text" size="50" maxlength="60" name="plz" id="plz" value="${session.get('case_plz', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="plz" id="plz" value="${c.case.plz or ""}">
 </div>
 <div class="waska_form_element w75">
 <label for="wohnort">Ort:</label>
-<input class="field" type="text" size="50" maxlength="60" name="wohnort" id="wohnort" value="${session.get('case_city', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="wohnort" id="wohnort" value="${c.case.city or ""}">
 </div>
 <div style="padding: 1em 0;">
 <p>${_('cm_new_p_please_consider_statement')}</p>

Modified: trunk/waskaweb/templates/casemanagement/new_appointment.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/new_appointment.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/new_appointment.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,8 @@
 <%inherit file="main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}/1">${_('cm_np_select')}</a></li>
+	<li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
 	<li><a href="/case/appointments">${_('app_np_root')}</a></li>
 	<li><a href="/case/newAppointment/">${_('app_np_new')}</a></li>
 </%def>
@@ -13,7 +14,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/case/appointments/${session.get('case_id', None)}">${self.buildIco()} ${_('cm_menu_link_appointment_back')}</a></li>
+		<li><a href="/case/appointments/${session.get('case').id}"> ${_('cm_menu_link_appointment_back')}</a></li>
 	</ul>
     </div>
   </div>

Modified: trunk/waskaweb/templates/casemanagement/organisation.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/organisation.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/organisation.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,9 @@
 <%inherit file="main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/case/organisation/${session.get('case_id')}">${_('cm_np_organisation')}</a></li>
+	<li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
+	<li><a href="/case/organisation/${session.get('case').id}">${_('cm_np_organisation')}</a></li>
 </%def>
 
 <div id="content_header_small">
@@ -14,21 +15,21 @@
 <h2>${_('cm_header_organisation_editor')}</h2>
 <table>
 	<tr>
-		<td class="label">${_('cm_organisation_tbl_label_lastname')}</td><td>${c.editor.last_name}</td>
+		<td class="label table_header_v table_width_mid_l">${_('cm_organisation_tbl_label_lastname')}</td><td class=" table_row_v table_description">${c.editor.last_name | F.NA, h}</td>
 	</tr>
 	<tr>
-		<td class="label">${_('cm_organisation_tbl_label_firstname')}</td><td>${c.editor.first_name}</td>
+		<td class="label">${_('cm_organisation_tbl_label_firstname')}</td><td class=" table_row_v_2">${c.editor.first_name | F.NA, h}</td>
 	</tr>
 	<tr>
-		<td class="label">${_('cm_organisation_tbl_label_telephone')}</td><td>${c.editor.telephone}</td>
+		<td class="label table_header_v">${_('cm_organisation_tbl_label_telephone')}</td><td class=" table_row_v">${c.editor.telephone | F.NA, h}</td>
 	</tr>
 </table>
 % if h.hasRole(['admin_ka']):
 <form action="${h.url_for(controller="case", action="setEditorAction")}" method="POST">
-<input type="hidden" name="case_id" value="${session.get('case_id')}">
+<input type="hidden" name="case_id" value="${session.get('case').id}">
 <select name="editor">
 % for user in c.user_list:
-  <option value="${user.id}">${user.first_name} ${user.last_name}</option>
+  <option value="${user.id | F.NA, h}">${user.first_name | F.NA, h} ${user.last_name | F.NA, h}</option>
 % endfor
 </select>
 <input type="submit" value="${_('cm_form_editor_submit')}">
@@ -37,21 +38,32 @@
 <h2>${_('cm_header_standin')}</h2>
 % if (h.hasRole(['admin_ka']) or (c.current_user.id == c.editor.id)):
 <form action="${h.url_for(controller="case", action="setStandinAction")}" method="POST">
-<input type="hidden" name="case_id" value="${session.get('case_id')}">
+<input type="hidden" name="case_id" value="${session.get('case').id}">
 <table>
   <tr>
-    <th width="15"></th>
-    <th>Bearbeiter</th>
+    <th class="table_header_h table_checkbox"></th>
+    <th class="table_header_h table_description">Bearbeiter</th>
   </tr>
+  <% idset = True %>
   % for user in c.user_list:
   <tr>
-    % if user.id in c.standin_list:
-    <td><input type="checkbox" name="standin-${user.id}" value="${user.id}" checked></td>
+  % if idset:
+    % if user.id in c.standin.getUser():
+     <td><input type="checkbox" name="standin-${user.id | h}" value="${user.id | h}" checked></td>
     % else:
-    <td><input type="checkbox" name="standin-${user.id}" value="${user.id}"></td>
+     <td><input type="checkbox" name="standin-${user.id | h}" value="${user.id | h}"></td>
     % endif
-    <td>${user.first_name}, ${user.last_name}</td>
+     <td>${user.first_name | F.NA, h}, ${user.last_name | F.NA, h}</td>
+  % else:
+    % if user.id in c.standin.getUser():
+     <td class="table_row_v_12"><input type="checkbox" name="standin-${user.id | h}" value="${user.id | h}" checked></td>
+    % else:
+     <td class="table_row_v_12"><input type="checkbox" name="standin-${user.id | h}" value="${user.id | h}"></td>
+    % endif
+     <td class="table_row_v_12">${user.first_name | F.NA, h}, ${user.last_name | F.NA, h}</td>
+  % endif
   </tr>
+  <% idset = not idset %>
   % endfor
 </table>
 <input type="submit" value="${_('cm_form_standin_submit')}">
@@ -59,13 +71,22 @@
 % else:
 <table>
   <tr>
-    <th>${_('cm_organisation_table_cm')}</th>
+    <th class="table_width_long table_header_h">${_('cm_organisation_table_cm')}</th>
   </tr>
+  <% idset = 0 %>
   % for user in c.user_list:
-    % if user.id in c.standin_list:
-    <tr>
-      <td>${user.first_name}, ${user.last_name}</td>
-    </tr>
+    % if user.id in c.standin.getUser():
+      % if idset==0:
+      <tr>
+        <td>${user.first_name | F.NA, h}, ${user.last_name | F.NA, h}</td>
+        </tr>
+        <% idset = 1 %>
+       % else:
+        <tr>
+        <td class="table_row_h">${user.first_name | F.NA, h}, ${user.last_name | F.NA, h}</td>
+        </tr>
+        <% idset = 0 %>
+      % endif
     % endif
   % endfor
 </table>

Modified: trunk/waskaweb/templates/casemanagement/overview.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/overview.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/overview.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -2,90 +2,53 @@
 <%inherit file="../main.mako" />
 <%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
-		${parent.buildNavipath()}
-	<li><a href="/case">${_('cm_np_root')}</a></li>
-        <li><a href="/case/overview/">${_('cm_np_overview')}</a></li>
+  ${parent.buildNavipath()}
+  <li><a href="/case">${_('cm_np_root')}</a></li>
+  <li><a href="/case/overview/">${_('cm_np_overview')}</a></li>
 </%def>
 <h1>${_('cm_header_overview')}</h1>
 % if h.hasRole(['admin_ka']):
-<p>${_('cm_overview_con_list_dossiers_admin')}</p>
+  <p>${_('cm_overview_con_list_dossiers_admin')}</p>
 % endif
 
 % if h.hasRole(['cm_ka']):
-<p>${_('cm_overview_con_list_dossiers_cm')}</p>
+  <p>${_('cm_overview_con_list_dossiers_cm')}</p>
 %endif
-
 <h2>${_('cm_header_search')}</h2>
-<div class="waska_form">
-<form name="case_search" action="/case/search/">
-<input type="text" size="40" name="search_str">
-<input type="submit" value="${_('cm_form_overview_search_submit')}">
-</form>
+<div>
+  <form name="case_search" action="/case_overview/search/">
+  <div>
+    <input type="text" size="40" name="search_str">
+    <input type="submit" value="${_('cm_form_overview_search_submit')}">
+  </div>
+  <div>
+  
+% if h.hasRole(['cm_ka']):
+    <input type="checkbox" name="show_own" id="show_own" value="1"><label for="show_own">Nur eigene Fallakten anzeigen</label>
+% endif
+  </div>
+  </form>
 </div>
 <div class="waska_form">
-${h.form(h.url(action='bundle'), method='post')}
-<table>
-	<tr>
-		<!--B1114 <th width="25"></th> -->
-		<th>${_('cm_overview_tbl_header_id')}</th>
-		<th>${_('cm_overview_tbl_header_firstname')}</th>
-		<th>${_('cm_overview_tbl_header_lastname')}</th>
-		<th>${_('cm_overview_tbl_header_actions')}</th>
-	</tr>
-	<!--<tr>
-		<td>${h.check_box('case', value='1')}</td>
-		<td>KA_OS-0815</td>
-		<td>Meier</td>
-		<td>Franz</td>
-		<td>
-			<a href="/case/digest">
-                          <img src="/images/icons/view.png" class="action">
-                        </a>
-			<a href="/case/delete/1">
-                          <img src="/images/icons/trash.png" class="action">
-                        </a> 
-		</td>
-	</tr>-->
-        % for case in c.cases.getDatasets():
-	<tr>
-		<!--B1114 <td><input type="checkbox" name="case_id" value="${case.id}"></td>-->
-		<td>${case.knr       | F.NA, h}</td>
-		<td>${case.first_name| F.NA, h}</td>
-		<td>${case.last_name | F.NA, h}</td>
-		<td>
-			<a href="/case/select/${case.id}/0/">${_('cm_overview_a_show')}</a> 
-                        % if h.hasRole('admin_ka'):
-			<a href="/case/delete/${case.id}/0/">${_('cm_overview_a_delete')}</a> 
-                        % endif
-		</td>
-	</tr>
-        % endfor
-        % if len(c.cases.getDatasets()) == 0:
-	<tr>
-          <td colspan="6">
-            ${_('cm_overview_tbl_no_data_found')}
-          </td>
-        </tr>
-        % endif
-</table>
-<!--B1114
-<div class="waska_form_element w25">
-<select name="action">
-  % if h.hasRole(['admin_ka']):
-  <option value="delete">Auswahl löschen</option>
-  <option value="stand-in">Auswahl Vertretung zuweisen</option>
-  <option value="transfer">Auswahl Bearbeitung übertragen</option>
-  % endif
-  % if h.hasRole(['admin_ka', 'cm_ka']):
-  <option value="export">Auswahl exportieren</option>
-  % endif
-  <option value="evaluate">Auswahl auswerten</option>
-</select>
+  ${h.form(h.url(action='bundleAction'), method='post')}
+  <%include file="./caselist.mako" />
+  <div class="waska_form_element w25">
+    <select name="action">
+      <option value="no_action">Keine Aktion</option>
+      % if h.hasRole(['admin_ka']):
+      <option value="delete">Auswahl löschen</option>
+      <option value="transfer">Auswahl Bearbeitung übertragen</option>
+      % endif
+      % if h.hasRole(['admin_ka', 'cm_ka']):
+      <option value="stand-in">Auswahl Vertretung zuweisen</option>
+      <!--<option value="export">Auswahl exportieren</option>-->
+      <!--<option value="evaluate">Auswahl auswerten</option>-->
+      % endif
+    </select>
+  </div>
+  <div class="waska_form_element w75">
+    ${h.submit('Aktion f&uuml;r Auswahl ausf&uuml;hren')}
+  </div>
+  ${h.end_form()}
+  <br class="newline">
 </div>
-<div class="waska_form_element w75">
-${h.submit('Aktion f&uuml;r Auswahl ausf&uuml;hren')}
-</div>
--->
-<br class="newline">
-${h.end_form()}
-</div>

Deleted: trunk/waskaweb/templates/casemanagement/rg_aid_overview.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/rg_aid_overview.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/rg_aid_overview.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,78 +0,0 @@
-## -*- coding: utf-8 -*-
-<%inherit file="main.mako" />
-<%!  import waskaweb.lib.filters as F %>
-<%def name="buildNavipath()">
-      	${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}">${_('cm_np_select')}</a></li>
-	<li><a href="/case/${session['case_modus']}/${c.ds_id}/${c.page_id}">${h.getFormularName(c.page_id)}</a></li>
-</%def>
-<div id="content_header_small">
-  <div id="content_ueberschrift">
-${_('cm_rg_aid_overview_header_overview_support_offer')}
-  </div>
-% if h.hasRole(['cm_ka']):
-  <div id="modusfield">
-    <div class="actions">
-	<ul>
-	% if c.print_form:
-        <li><a href="${h.getPrintUrl(c.print_form, c.ds_id, c.page_id)}" target="_blank" onclick="return checkModification();">${self.buildIco()} ${_('cm_actions_link_printout')}</a></li>
-	% endif
-        <li><a href="/statement/printAidPlanStatement/${c.ds_id}" target="_blank" onclick="return checkModification();">${self.buildIco()} ${_('cm_actions_link_printoutAidPlanStatement')}</a></li>
-	</ul>
-    </div>
-  </div>
-% endif
-</div>
-
-
-<table>
-	<tr>
-		<th width="100">Von</th>
-		<th width="100">Bis</th>
-		<th>${_('cm_rg_aid_overview_table_institution')}</th>
-		<th>${_('cm_rg_aid_overview_table_offer_type')}</th>
-        	<th>${_('cm_rg_aid_overview_table_actions')}</th>
-	</tr>
-        % for aid in c.rg_list.getDatasets():
-	<tr>
-		<td>${aid.start_date  | F.NA, h}</td>
-		<td>${aid.end_date    | F.NA, h}</td>
-		<td>${aid.institution | F.NA, h}</td>
-		<td>${aid.type}</td>
-                <td>
-                  % if session['case_modus'] == "show": 
-                    <a href="/case/show/${aid.id}/${aid.page_id}">${_('cm_rg_aid_overview_table_show')}</a> 
-                  % else:
-                    <a href="/case/edit/${aid.id}/${aid.page_id}">${_('cm_rg_aid_overview_table_show')}</a> 
-                  % endif
-                  % if h.hasRole(['cm_ka']):
-                    <a href="/case/deleteAid/${aid.id}/${aid.type_id}/0">${_('cm_rg_aid_overview_table_')}</a>
-                  % endif
-                </td>
-	</tr>
-        % endfor
-        % if c.rg_list.numDatasets() <= 0:
-        <tr>
-          <td colspan="5">${_('cm_rg_aid_overview_table_no_offer_found')}</td>
-        </tr>
-        % endif
-</table>
-<div class="legend">
-${_('cm_rg_aid_overview_legend_legend')}<strong>${_('cm_rg_aid_overview_legend_bb')}</strong>: ${_('cm_rg_aid_overview_legend_common_educational_area')}<strong>${_('cm_rg_aid_overview_legend_bv')}</strong>: ${_('cm_rg_aid_overview_legend_vocational_preparation')}<strong>${_('cm_rg_aid_overview_legend_bq')}</strong>: ${_('cm_rg_aid_overview_legend_qualifications')}<strong>${_('cm_rg_aid_overview_legend_lb')}</strong>:${_('cm_rg_aid_overview_legend_life_skills')}
-</div>
-% if h.hasRole(['cm_ka']):
-  <div class="waska_form">
-  <form name="new_unterstuetzung" action="/case/newAidAction" method="POST">
-  <label for="angebot">${_('cm_rg_aid_overview_legend_new_offer')}</label><br>
-  <select name="aid_type" id="angebot">
-    <option value="0">${_('cm_rg_aid_overview_option_common_educational_area')}</option>
-    <option value="1">${_('cm_rg_aid_overview_option_vocational_preparation')}</option>
-    <option value="2">${_('cm_rg_aid_overview_option_qualifications')}</option>
-    <option value="3">${_('cm_rg_aid_overview_option_life_skills')}</option>
-  </select>
-  <input type="hidden" name="page_id" value="${c.page_id}">
-  <input type="hidden" name="case_id" value="${c.ds_id}">
-  <input type="submit" value="Hinzufügen">
-  </form>
-  </div>
-% endif

Modified: trunk/waskaweb/templates/casemanagement/static_form/statement.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/static_form/statement.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/static_form/statement.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -11,23 +11,23 @@
 <p></p>
 <div class="waska_form_element w50">
 <label for="vorname_1">Vorname:</label>
-<input class="field" type="text" size="50" maxlength="60" name="vorname_1" id="vorname_1" value="${session.get('case_first_name', "")}"> 
+<input class="field" type="text" size="50" maxlength="60" name="vorname_1" id="vorname_1" value="${session.get('case').first_name}"> 
 </div>
 <div class="waska_form_element w50">
 <label for="name_1">Name:</label>
-<input class="field" type="text" size="50" maxlength="60" name="name_1" id="name_1" value="${session.get('case_last_name', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="name_1" id="name_1" value="${session.get('case').last_name}">
 </div>
 <div class="waska_form_element w100">
 <label for="strasse">Strasse:</label>
-<input class="field" type="text" size="50" maxlength="60" name="strasse" id="strasse" value="${session.get('case_address', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="strasse" id="strasse" value="${session.get('case').street}">
 </div>
 <div class="waska_form_element w25">
 <label for="plz">PLZ:</label>
-<input class="field" type="text" size="50" maxlength="60" name="plz" id="plz" value="${session.get('case_plz', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="plz" id="plz" value="${session.get('case').plz}">
 </div>
 <div class="waska_form_element w75">
 <label for="wohnort">Ort:</label>
-<input class="field" type="text" size="50" maxlength="60" name="wohnort" id="wohnort" value="${session.get('case_city', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="wohnort" id="wohnort" value="${session.get('case').city}">
 </div>
 <p>Bitte beachten Sie, dass Sie eine neue Fallakte nur mit vorliegender Einwilligungserklärung des Jugendlichen anlegen können.<br>
 Sie haben nun die Möglichkeit die Fallakte mit den von Ihnen eingegbenen Daten auszudrucken. Klicken Sie hierzu auf die Auswahl "Erklärung drucken".

Modified: trunk/waskaweb/templates/casemanagement/static_form/statement_print.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/static_form/statement_print.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/static_form/statement_print.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -12,24 +12,24 @@
 <p>Hiermit willige ich,</p>
 <div class="waska_form_element w50">
 <label for"vorname_">Vorname:</label>
-<input class="field" type="text" size="50" maxlength="60" name="vorname_1" id="vorname_1" value="${session.get('case_first_name', "")}"> 
+<input class="field" type="text" size="50" maxlength="60" name="vorname_1" id="vorname_1" value="${session.get('case').first_name}"> 
 </div>
 <div class="waska_form_element w50">
 <label for"name_1">Name:</label>
-<input class="field" type="text" size="50" maxlength="60" name="name_1" id="name_1" value="${session.get('case_last_name', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="name_1" id="name_1" value="${session.get('case').last_name}">
 </div>
 <p>Wohnhaft in,</p>
 <div class="waska_form_element w100">
 <label for"strasse">Strasse:</label
-<input class="field" type="text" size="50" maxlength="60" name="strasse" id="strasse" value="${session.get('case_address', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="strasse" id="strasse" value="${session.get('case').street}">
 </div>
 <div class="waska_form_element w25">
 <label for"plz">PLZ:</label>
-<input class="field" type="text" size="50" maxlength="60" name="plz" id="plz" value="${session.get('case_plz', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="plz" id="plz" value="${session.get('case').plz}">
 </div>
 <div class="waska_form_element w75">
 <label for"wohnort">Ort:</label>
-<input class="field" type="text" size="50" maxlength="60" name="wohnort" id="wohnort" value="${session.get('case_city', "")}">
+<input class="field" type="text" size="50" maxlength="60" name="wohnort" id="wohnort" value="${session.get('case').city}">
 </div>
 <p>
 ein, dass die Kompetenzagentur XY im Rahmen ihrer Aufgabe, mich bei meiner beruflichen und

Modified: trunk/waskaweb/templates/casemanagement/upload.mako
===================================================================
--- trunk/waskaweb/templates/casemanagement/upload.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/casemanagement/upload.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,4 +1,5 @@
 <%inherit file="../main.mako" />
+<%!  import waskaweb.lib.filters as F %>
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
 	<li><a href="/case">${_('cm_np_root')}</a></li>

Modified: trunk/waskaweb/templates/dialogs/alert.mako
===================================================================
--- trunk/waskaweb/templates/dialogs/alert.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/dialogs/alert.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,5 +1,5 @@
-<div class="dialog" />
-<h1><img alt="Achtung" src="/images/alert.png"/>${_('dialog_header_alert')}</h1>
+<div class="dialog">
+<h1><img src="/images/alert.png" alt="achtung"/>${_('dialog_header_alert')}</h1>
 <h2>${c.alert_for}</h2>
 <p>${c.question}</p>
 <a class="button" href="${c.url_ok}">${_('dialog_header_confirm_option_ok')}</a>

Modified: trunk/waskaweb/templates/dialogs/confirm.mako
===================================================================
--- trunk/waskaweb/templates/dialogs/confirm.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/dialogs/confirm.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 <div class="dialog" />
-<h1><img alt="Achtung" src="/images/question.png"/>${_('dialog_header_confirm')}</h1>
+<h1><img src="/images/question.png" alt="achtung"/>${_('dialog_header_confirm')}</h1>
 <h2>${c.confirm_for}</h2>
 <p>${c.question}</p>
 <a class="button" href="${c.url_yes}">${_('dialog_header_confirm_option_yes')}</a>

Modified: trunk/waskaweb/templates/dialogs/notification.mako
===================================================================
--- trunk/waskaweb/templates/dialogs/notification.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/dialogs/notification.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 <div class="dialog" />
-<h1><img alt="Achtung" src="/images/alert.png"/>${_('dialog_header_notification')}</h1>
+<h1><img src="/images/alert.png" alt="Achtung"/>${_('dialog_header_notification')}</h1>
 <h2>${c.notification_for}</h2>
 <p>${c.notification_text}</p>
 <a class="button" href="${c.url_ok}">${_('dialog_header_notification_option_ok')}</a>

Modified: trunk/waskaweb/templates/documents/case_new.mako
===================================================================
--- trunk/waskaweb/templates/documents/case_new.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/documents/case_new.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,8 @@
 <%inherit file="../casemanagement/main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/case/documents/${session.get('case_id')}">${_('cm_np_doc_overview')}</a></li>
+	<li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
+	<li><a href="/case/documents/${session.get('case').id}">${_('cm_np_doc_overview')}</a></li>
 	<li><a href="/case/newDocument">${_('cm_np_doc_upload')}</a></li>
 </%def>
 <div id="content_header_small">
@@ -13,7 +13,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/case/documents/${session.get('case_id', None)}">${self.buildIco()} ${_('cm_menu_link_document_back')}</a></li>
+		<li><a href="/case/documents/${session.get('case').id}"> ${_('cm_menu_link_document_back')}</a></li>
 	</ul>
     </div>
   </div>
@@ -25,7 +25,7 @@
 <label for="file">${_('doc_form_upload_label_file')}:</label><br>
 ${h.file_field('file')}<br>
 ${h.submit(_('doc_form_upload_submit'))}
-${h.hidden_field('case', value=session.get('case_id', None))}
+${h.hidden_field('case', value=session.get('case').id)}
 ${h.end_form()}
 </div>
 </div>

Modified: trunk/waskaweb/templates/documents/case_overview.mako
===================================================================
--- trunk/waskaweb/templates/documents/case_overview.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/documents/case_overview.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -2,8 +2,8 @@
 <%inherit file="../casemanagement/main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-	<li><a href="/case/select/${session.get('case_id')}/1">${_('cm_np_select')}</a></li>
-	<li><a href="/case/documents/${session.get('case_id')}">${_('cm_np_doc_overview')}</a></li>
+	<li><a href="/case/select/${session.get('case').id}/1">${_('cm_np_select')}</a></li>
+	<li><a href="/case/documents/${session.get('case').id}">${_('cm_np_doc_overview')}</a></li>
 </%def>
 
 <div id="content_header_small">
@@ -14,7 +14,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/case/newDocument/">${self.buildIco()} ${_('cm_actions_link_doc_new')}</a></li>
+		<li><a href="/case/newDocument/${session.get('case').id}"> ${_('cm_actions_link_doc_new')}</a></li>
 	</ul>
     </div>
   </div>
@@ -24,23 +24,36 @@
 <%!  import waskaweb.lib.filters as F %>
 <table>
   <tr>
-    <th>${_('doc_overview_tbl_header_filename')}</th>
-    <th class="number_field">${_('doc_overview_tbl_header_filesize')}</th>
-    <th>${_('doc_overview_tbl_header_actions')}</th>
+    <th class="table_header_h table_description">${_('doc_overview_tbl_header_filename')}</th>
+    <th class="number_field table_header_h table_date">${_('doc_overview_tbl_header_filesize')}</th>
+    <th class="table_header_h table_action">${_('doc_overview_tbl_header_actions')}</th>
   </tr>
+  <% idset = 0 %>
 % if len(c.files) > 0:
   <% 
     kb = lambda x: h.formatNumber(x * 1.0/1024.0) 
-    myid = session.get('case_id', None)
+    myid = session.get('case').id
   %>
   % for f in c.files:
-  <tr>
-    <td>${ f.getName() | F.shorten, h}</td>
-    <td class="number_field">${kb(f.size)} KB</td>
-    <td><a href="/document/caseShow/${f.id}/${f.getName() | F.H}" target="_blank">${_('doc_overview_tbl_show')}</a>
+  % if idset==0:
+   <tr>
+     <td>${ f.getName() | F.shorten, h}</td>
+     <td class="number_field">${kb(f.size)} KB</td>
+     <td class="table_action"><a href="/document/caseShow/${f.id}/${f.getName() | F.H}" target="_blank">${_('doc_overview_tbl_show')}</a>
+     <a href="/document/caseDelete/${f.id}/${myid}/0">${_('doc_overview_tbl_delete')}</a>
+     </td>
+   </tr>
+   <% idset = 1 %>
+  % else:
+   <tr>
+    <td class="table_row_h">${ f.getName() | F.shorten, h}</td>
+    <td class="number_field table_row_h">${kb(f.size)} KB</td>
+    <td class="table_row_h table_action"><a href="/document/caseShow/${f.id}/${f.getName() | F.H}" target="_blank">${_('doc_overview_tbl_show')}</a>
     <a href="/document/caseDelete/${f.id}/${myid}/0">${_('doc_overview_tbl_delete')}</a>
     </td>
-  </tr>
+   </tr>
+   <% idset = 0 %>
+  % endif
   % endfor
 % else:
   <tr>

Modified: trunk/waskaweb/templates/documents/dialogs/confirm.mako
===================================================================
--- trunk/waskaweb/templates/documents/dialogs/confirm.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/documents/dialogs/confirm.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,8 +1,7 @@
 <%inherit file="../../main.mako" />
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
-	<li><a href="/document">Dokumente</a></li>
-	<li><a href="/document/overview">Dokument &Uuml;bersicht</a></li>
-	<li><a href="#">Dokument L&ouml;schen</a></li>
+	<li><a href="/document/overview">${_('doc_np_overview')}</a></li>
+	<li><a href="#">${_('doc_np_delete')}</a></li>
 </%def>
 <%include file="../../dialogs/confirm.mako" />

Modified: trunk/waskaweb/templates/documents/global_overview.mako
===================================================================
--- trunk/waskaweb/templates/documents/global_overview.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/documents/global_overview.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,9 +1,8 @@
 ## -*- coding: utf-8 -*-
+<%inherit file="../main.mako" />
 <%!  import waskaweb.lib.filters as F %>
-<%inherit file="../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/document">${_('doc_np_root')}</a></li>
 	<li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
 </%def>
 <div id="content_header_small">
@@ -14,7 +13,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/document/globalUpload/">${self.buildIco()} ${_('doc_actions_link_new')}</a></li>
+		<li><a href="/document/globalUpload/"> ${_('doc_actions_link_new')}</a></li>
 	</ul>
     </div>
 
@@ -23,24 +22,39 @@
 </div>
 
 <table>
-  <tr>
-    <th>${_('doc_overview_tbl_header_filename')}</th>
-    <th class="number_field">${_('doc_overview_tbl_header_filesize')}</th>
-    <th>${_('doc_overview_tbl_header_actions')}</th>
+  <tr class="table_header_h">
+    <th class="table_description">${_('doc_overview_tbl_header_filename')}</th>
+    <th class="number_field table_date">${_('doc_overview_tbl_header_filesize')}</th>
+    <th class="table_action">${_('doc_overview_tbl_header_actions')}</th>
   </tr>
+  <% idset = 0 %>
 % if len(c.files) > 0:
   <% kb = lambda x: h.formatNumber(x * 1.0/1024.0) %>
   % for f in c.files:
+  % if idset==0:
   <tr>
     <td>${ f.getName() | F.shorten, h}</td>
     <td class="number_field">${kb(f.size)} KB</td>
-    <td><a href="/document/globalShow/${f.id}/${f.getName() | F.H}" target="_blank">${_('doc_overview_tbl_show')}</a>
+    <td class="table_action"><a href="/document/globalShow/${f.id}/${f.getName() | F.H}" target="_blank">${_('doc_overview_tbl_show')}</a>
     % if h.hasRole(['admin_ka']):
     <a href="/document/globalDelete/${f.id}">${_('doc_overview_tbl_delete')}</a>
     % endif
     </td>
   </tr>
-  % endfor
+  <% idset = 1 %>
+  % else:
+    <tr>
+      <td class="table_row_h">${ f.getName() | F.shorten, h}</td>
+      <td class="number_field table_row_h">${kb(f.size)} KB</td>
+      <td class="table_row_h table_action"><a href="/document/globalShow/${f.id}/${f.getName() | F.H}" target="_blank">${_('doc_overview_tbl_show')}</a>
+        % if h.hasRole(['admin_ka']):
+          <a href="/document/globalDelete/${f.id}">${_('doc_overview_tbl_delete')}</a>
+        % endif
+      </td>
+    </tr>
+    <% idset = 0 %>
+    % endif
+    % endfor
 % else:
   <tr>
     <td colspan="3">

Modified: trunk/waskaweb/templates/documents/global_upload.mako
===================================================================
--- trunk/waskaweb/templates/documents/global_upload.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/documents/global_upload.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,7 +1,7 @@
 <%inherit file="../main.mako" />
 <%def name="buildNavipath()">
 		${parent.buildNavipath()}
-	<li><a href="/document">${_('doc_np_root')}</a></li>
+        <li><a href="/document/globalOverview">${_('doc_np_overview')}</a></li>
 	<li><a href="/document/globalUpload">${_('doc_np_upload')}</a></li>
 </%def>
 <div id="content_header_small">
@@ -11,7 +11,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='document', action='globalOverview')}">${self.buildIco()} ${_('menu_doc_link_overview_back')}</a></li>
+		<li><a href="${h.url_for(controller='document', action='globalOverview')}"> ${_('menu_doc_link_overview_back')}</a></li>
 	</ul>
     </div>
   </div>
@@ -25,4 +25,4 @@
 ${h.submit(_('doc_form_upload_submit'))}
 ${h.end_form()}
 </div>
-</div>
\ No newline at end of file
+</div>

Modified: trunk/waskaweb/templates/login.mako
===================================================================
--- trunk/waskaweb/templates/login.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/login.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -3,7 +3,7 @@
 <h1>${_('login_header_waska_login')}</h1>
 <div id="waska_form_login">
 <p>${_('login_p_insert_pw_and_identifier')}</p>
-<form name="login" action="${h.url_for(controller='waska', action='loginAction')}" method="POST">
+<form name="login" action="${h.url_for(controller='waska', action='loginAction')}" accept-charset="UTF-8" method="POST">
 <div class="label">
    <label for="login">${_('login_label_identifier')}</label>
 </div>

Modified: trunk/waskaweb/templates/main.mako
===================================================================
--- trunk/waskaweb/templates/main.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/main.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -13,6 +13,7 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <meta http-equiv="content-style-type" content="text/css">
     <meta http-equiv="expires" content="0">
+    <link rel="shortcut icon" type="image/x-icon" href="/images/kompetenz3.ico">
     % if c.print_version:
     <link href="${h.url_for('/styles/all.css')}" media="all" rel="stylesheet" type="text/css">
     <link href="${h.url_for('/styles/print.css')}" media="screen" rel="stylesheet" type="text/css">
@@ -26,9 +27,13 @@
     <script src="/js/check.js" type="text/javascript"></script>
   </head>
   <body onload="clearModification();">
+  <span class="skiplink"><a href="#startmenu" title="Direkt zum Hauptmen&#252; springen" tabindex="1">
+  Zum Hauptmen&#252; springen</a></span>
+  <span class="skiplink"><a href="#navigation" title="Direkt zum Bereichsmen&#252; springen" tabindex="1">Zum Bereichsmen&#252; springen</a></span>
+  <span class="skiplink"><a href="#content" title="Direkt zum Inhalt springen" tabindex="2">Zum Inhalt springen</a></span>
     <div id="header">
       <div class="left" id="logo">
-        <a href="${h.url_for(controller='waska', action='start')}" onclick="return checkModification();">
+        <a href="${h.url_for(controller='/waska', action='start')}" onclick="return checkModification();">
           <img src="${h.url_for('/images/logo_ka_75.png')}" alt="Logo Kompetenzagentur" border="0">
         </a>
       </div>
@@ -36,7 +41,6 @@
         ${self.buildStartMenu()}
         ${self.buildStatusBar()}
         <div id="navipath">
-          <span style="float:left">${_('np_text')}&nbsp;</span>
           <ul>
             ${self.buildNavipath()}
           </ul>
@@ -45,18 +49,20 @@
     </div>
     <div id="main">
       <div class="left">
-	<div class="navigation">
-	${self.buildPrivacyfield()}
-        ${next.buildNavigation()}
-        <div id="content" class="right">
-	${self.buildUeberschrift()}
-	${self.buildModusfield()}
+	<div class="navigation" id="navigation">
+	  ${self.buildPrivacyfield()}
+          ${next.buildNavigation()}
+        </div>
+      </div>
+      <div id="content" class="right">
+        ${self.buildContentHeader()}
         ${self.body()}
+      </div>
     </div>
-</div>
-${self.buildFooter()}
+    ${self.buildFooter()}
   </body>
 </html>
+
 <%def name="buildStatusBar()">
   <div id="statusbar">
     ${_('statusbar_logininfo')}: <strong>${h.getUserFullname()}</strong> (${h.getRole()})
@@ -90,76 +96,69 @@
 </%def>
 
 <%def name="buildNavigation()">
-    % if (h.getLogin() != 'adm'):
- % if h.hasRole(['cm_ka', 'admin_ka']):
+ % if (h.getLogin() != 'adm'):
+  % if h.hasRole(['cm_ka', 'admin_ka']):
     <div class="menu">
       <div class="actions">
         <h1>${_('np_root')}</h1>
         <ul>
-	  <li><a href="${h.url_for(controller='/waska')}">${self.buildIco()} ${_('sm_menu_link_home')}
+	  <li><a href="${h.url_for(controller='/waska')}">${_('sm_menu_link_home')}
             </a>
           </li>
-          <li><a href="${h.url_for(controller='/appointment', action='overview')}">${self.buildIco()} ${_('menu_app_link_overview')}
+          <!--<li><a href="${h.url_for(controller='/appointment', action='overview')}"> ${_('menu_app_link_overview')}
 	    </a>
-	  </li>
-	  <li><a href="${h.url_for(controller='/document', action='globalOverview')}">${self.buildIco()} ${_('menu_doc_link_overview')}
+	  </li>-->
+	  <li><a href="${h.url_for(controller='/document', action='globalOverview')}"> ${_('menu_doc_link_overview')}
             </a>
           </li>
         </ul>
       </div>
     </div>
-    % endif
-    <div class="menu">
-      <div class="actions">
-        <h1>${_('menu_header_cm')}</h1>
-        <ul>
-          <li><a href="${h.url_for(controller='/case', action='overview')}">${self.buildIco()} ${_('menu_cm_link_overview')}</a>
-          </li>
-          % if h.hasRole(['cm_ka']):
-          <li><a href="${h.url_for(controller='/case', action='new')}">${self.buildIco()} ${_('menu_cm_link_new')}</a>
-          </li>
-          <li><a href="${h.url_for(controller='/case', action='importCase')}">${self.buildIco()} ${_('menu_cm_link_import')}</a>
-          </li>
-          % endif
-          <li><a href="${h.url_for(controller='/evaluate', action='evaluate')}">${self.buildIco()} ${_('cm_actions_link_evaluate')}</a>
-          </li>
-        </ul>
-      </div>
+  % endif
+  <div class="menu">
+    <div class="actions">
+      <h1>${_('menu_header_cm')}</h1>
+      <ul>
+        <li><a href="${h.url_for(controller='/case_overview')}"> ${_('menu_cm_link_overview')}</a>
+        </li>
+        % if h.hasRole(['cm_ka']):
+        <li><a href="${h.url_for(controller='/case', action='new')}"> ${_('menu_cm_link_new')}</a>
+        </li>
+        <li><a href="${h.url_for(controller='/case', action='importCase')}"> ${_('menu_cm_link_import')}</a>
+        </li>
+        % endif
+        <li><a href="${h.url_for(controller='/evaluate', action='evaluate')}"> ${_('cm_actions_link_evaluate')}</a>
+        </li>
+      </ul>
     </div>
-    % endif
-    % if h.hasRole(['admin_ka']):
-    <div class="menu">
-      <div class="actions">
-        <h1>${_('menu_header_adm')}</h1>
-        <ul>
-          <li><a href="${h.url_for(controller='/administration', action='overviewUser')}">${self.buildIco()} ${_('menu_adm_link_useroverview')}
-            </a>
-          </li>
-          <li><a href="${h.url_for(controller='/administration', action='showSettings')}">${self.buildIco()} ${_('menu_adm_link_showsettings')}
-            </a>
-          </li>
-        </ul>
-      </div>
+  </div>
+  <div class="menu_spacer">
+    <div class="actions">
     </div>
-    % endif
-      </div>
+  </div>
+  % endif
+  % if h.hasRole(['admin_ka']):
+  <div class="menu">
+    <div class="actions">
+      <h1>${_('menu_header_adm')}</h1>
+      <ul>
+        <li><a href="${h.url_for(controller='/administration', action='overviewUser')}"> ${_('menu_adm_link_useroverview')}
+          </a>
+        </li>
+        <li><a href="${h.url_for(controller='/administration', action='showSettings')}"> ${_('menu_adm_link_showsettings')}
+          </a>
+        </li>
+      </ul>
     </div>
+  </div>
+  % endif
 </%def>
 
-<%def name="buildFormErrors()">
+<%def name="buildFormErrors(labels=None)">
+  <% formular_labels = labels or {} %>
   % if len(c.form_errors) > 0:
   <div class="form_errors">
     <h1><a name="error_list">${_('main_formular_input_error')}</a></h1>
-    <%
-      # Please fill this dictionary in the templates if you want to substitute
-      # the formular identifier
-      formular_labels = {'firstname': 'adm_form_user_firstname',
-                          'lastname': 'adm_form_user_lastname',
-                          'login': 'adm_form_user_login',
-                          'passwd': 'adm_form_newuser_passwd',
-                          'passwd2': 'adm_form_newuser_passwd_confirm'
-                          }
-    %>
     <ul>
       % for key, value in c.form_errors.iteritems():
         <li>${_(formular_labels.get(key, '%s' % key))}: ${value}</li>
@@ -170,12 +169,16 @@
 </%def>
 
 <%def name="buildFooter()">
-
 <div id="footer">
-${_('footer_title')} | ${_('footer_version')}
+  <p>${_('footer_title')} | ${_('footer_version')}</p>
 </div>
 </%def>
 
+<%def name="buildContentHeader()">
+    ${self.buildUeberschrift()}
+    ${self.buildModusfield()}
+</%def>
+
 <%def name="buildUeberschrift()">
 </%def>
 

Modified: trunk/waskaweb/templates/start/responsible.mako
===================================================================
--- trunk/waskaweb/templates/start/responsible.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/start/responsible.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -51,7 +51,7 @@
     <p> Realisation und Programmierung der Webanwendung</p>
   </div>
   <div class="traeger_name_img">
-    <a href="http://www.dlr.de/" target="_blank">
+    <a href="http://www.intevation.de/" target="_blank">
       <img src="/images/logo_intevation.png" alt="Logo Intevation" style="border:0">
     </a>
   </div>

Modified: trunk/waskaweb/templates/start/start.mako
===================================================================
--- trunk/waskaweb/templates/start/start.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/start/start.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -25,60 +25,9 @@
 % if h.hasRole(['cm_ka']):
 <p>Hier werden Sie eine kurze &Uuml;bersicht Ihrer anliegenden Termine und
 Erinnerungen zu den F&auml;lle sehen.</p>
-<h2>${_('start_header_remind')}</h2>
-<table>
-	<tr>
-		<th width="100">${_('app_overview_tbl_header_date')}</th>
-		<th>${_('app_overview_tbl_header_desc')}</th>
-		<th>${_('app_overview_tbl_header_actions')}</th>
-	</tr>
-<!-- appointments for cm -->
-	<tr>
-		<td>07.12.2007</td>
-		<td>Akte pr&#252;fen </td>
-		<td>
-			<a href="/appointment/show/1">Anzeigen</a>
-			<a href="/appointment/delete/1">Löschen</a>
-		</td>
-	</tr>
-	<tr>
-		<td>17.12.2007</td>
-		<td>Auswertung Fallakten vorbereiten</td>
-		<td>
-			<a href="/appointment/show/2">Anzeigen</a>
-			<a href="/appointment/delete/2">Löschen</a>
-		</td>
-	</tr>
-	<tr>
-		<td>21.12.2007</td>
-		<td>Weihnachtsfeier</td>
-		<td>
-			<a href="/appointment/show/3">Anzeigen</a>
-		</td>
-	</tr>
-</table>
-<!-- appointments for cm -->
 % endif
 % if h.hasRole(['admin_ka']): 
 <p>Hier werden Sie eine kurze &Uuml;bersicht der allgemeinen Termine in der
 Kompetenzagentur sehen.</p>
-<h2>${_('start_header_remind')}</h2>
-<table>
-	<tr>
-		<th width="100">${_('app_overview_tbl_header_date')}</th>
-		<th>${_('app_overview_tbl_header_desc')}</th>
-		<th>${_('app_overview_tbl_header_actions')}</th>
-	</tr>
-<!-- appointments for admin -->
-	<tr>
-		<td>21.12.2007</td>
-		<td>Weihnachtsfeier</td>
-		<td>
-			<a href="/appointment/show/3">Anzeigen</a>
-			<a href="/appointment/delete/3">Löschen</a>
-		</td>
-	</tr>
-</table>
-<!-- appointments for admin -->
 % endif
 % endif

Modified: trunk/waskaweb/templates/statement/dialogs/missing_statement.mako
===================================================================
--- trunk/waskaweb/templates/statement/dialogs/missing_statement.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/statement/dialogs/missing_statement.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -3,6 +3,7 @@
 <%def name="buildNavipath()">
 	${parent.buildNavipath()}
 	<li><a href="/case/">${_('cm_np_root')}</a></li>
+        <li><a href="/case/overview/">${_('cm_np_overview')}</a></li>
 	<li><a href="#">${_('cm_np_show')}</a></li>
 </%def>
 <div class="dialog" />

Modified: trunk/waskaweb/templates/statement/edit.mako
===================================================================
--- trunk/waskaweb/templates/statement/edit.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/statement/edit.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -23,7 +23,7 @@
       <input type="radio" id="statement_not_signed" name="statement_signed" value="0">
       <label for="statement_not_signed">${_('statement_label_statement_no')}
       </label>
-      <input type="hidden" name="case_id" value="${c.ds_id}"> 
+      <input type="hidden" name="case_id" value="${c.ds_id | h}"> 
       <br>
       <input type="submit" value="Speichern" name="save">
   </form>

Modified: trunk/waskaweb/templates/usersettings/change_password.mako
===================================================================
--- trunk/waskaweb/templates/usersettings/change_password.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/usersettings/change_password.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -8,7 +8,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska', action='settings', id=h.getUserId())}">${self.buildIco()} ${_('sm_menu_link_settings_back')}</a></li>
+		<li><a href="${h.url_for(controller='waska', action='settings', id=h.getUserId())}"> ${_('sm_menu_link_settings_back')}</a></li>
 	</ul>
     </div>
   </div>

Modified: trunk/waskaweb/templates/usersettings/change_password_login.mako
===================================================================
--- trunk/waskaweb/templates/usersettings/change_password_login.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/usersettings/change_password_login.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -32,8 +32,8 @@
 		<input type="password" class="field" id="passwd2" name="passwd2">
 	</div>
 	</fieldset>
-	<input type="hidden" name="uid" value="${h.getUserId()}">
+	<input type="hidden" name="uid" value="${h.getUserId() | h}">
 	<input type="submit" value="${_('adm_form_changepassword_submit')}">
 </form>
 </div>
-</div>
\ No newline at end of file
+</div>

Modified: trunk/waskaweb/templates/usersettings/edit_standin.mako
===================================================================
--- trunk/waskaweb/templates/usersettings/edit_standin.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/usersettings/edit_standin.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="../main.mako" />
-
+<%!  import waskaweb.lib.filters as F %>
 <div id="content_header_small">
   <div id="content_ueberschrift">
  ${_('usrset_header_changestandin')}
@@ -8,7 +8,7 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="${h.url_for(controller='waska', action='settings', id=h.getUserId())}">${self.buildIco()} ${_('sm_menu_link_settings_back')}</a></li>
+		<li><a href="${h.url_for(controller='waska', action='settings', id=h.getUserId())}"> ${_('sm_menu_link_settings_back')}</a></li>
 	</ul>
     </div>
   </div>
@@ -24,9 +24,9 @@
     <select name="standin" id="standin">
       % for u in c.userlist:
         % if u.id == c.uo.standin:
-          <option value="${u.id}" selected>${u.first_name}, ${u.last_name}</option>
+          <option value="${u.id}" selected>${u.first_name | F.NA, h}, ${u.last_name | F.NA, h}</option>
         % else:
-          <option value="${u.id}">${u.first_name}, ${u.last_name}</option>
+          <option value="${u.id}">${u.first_name | F.NA, h}, ${u.last_name | F.NA, h}</option>
         % endif
       % endfor
         % if c.uo.standin is None:

Modified: trunk/waskaweb/templates/usersettings/show_settings.mako
===================================================================
--- trunk/waskaweb/templates/usersettings/show_settings.mako	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/templates/usersettings/show_settings.mako	2008-08-13 13:04:40 UTC (rev 16)
@@ -9,9 +9,9 @@
   <div id="modusfield">
     <div class="actions">
 	<ul>
-		<li><a href="/usersettings/changePassword/${h.getUserId()}">${self.buildIco()} ${_('usersettings_a_change_pw')}</a></li>
+		<li><a href="/usersettings/changePassword/${h.getUserId()}"> ${_('usersettings_a_change_pw')}</a></li>
                 % if h.hasRole(['cm_ka']):
-		<li><a href="/usersettings/editStandin/${h.getUserId()}">${self.buildIco()} ${_('usersettings_a_change_replace')}</a></li>
+		<li><a href="/usersettings/editStandin/${h.getUserId()}"> ${_('usersettings_a_change_replace')}</a></li>
 	        % endif
 	</ul>
     </div>

Added: trunk/waskaweb/tests/functional/test_CaseBase.py
===================================================================
--- trunk/waskaweb/tests/functional/test_CaseBase.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/tests/functional/test_CaseBase.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,7 @@
+from waskaweb.tests import *
+
+class TestCasebaseController(TestController):
+
+    def test_index(self):
+        response = self.app.get(url_for(controller='CaseBase'))
+        # Test response...

Added: trunk/waskaweb/tests/functional/test_case_overview.py
===================================================================
--- trunk/waskaweb/tests/functional/test_case_overview.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/tests/functional/test_case_overview.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,7 @@
+from waskaweb.tests import *
+
+class TestCaseOverviewController(TestController):
+
+    def test_index(self):
+        response = self.app.get(url_for(controller='case_overview'))
+        # Test response...

Added: trunk/waskaweb/tests/functional/test_rg_aid.py
===================================================================
--- trunk/waskaweb/tests/functional/test_rg_aid.py	2008-08-13 13:04:14 UTC (rev 15)
+++ trunk/waskaweb/tests/functional/test_rg_aid.py	2008-08-13 13:04:40 UTC (rev 16)
@@ -0,0 +1,7 @@
+from waskaweb.tests import *
+
+class TestRgAidController(TestController):
+
+    def test_index(self):
+        response = self.app.get(url_for(controller='rg_aid'))
+        # Test response...



More information about the Mpuls-commits mailing list