[Mpuls-commits] r5684 - in base/trunk/mpulsweb: controllers i18n i18n/de/LC_MESSAGES lib model templates/casemanagement templates/documents

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Dec 1 15:26:55 CET 2011


Author: ludwig
Date: 2011-12-01 15:26:49 +0100 (Thu, 01 Dec 2011)
New Revision: 5684

Added:
   base/trunk/mpulsweb/templates/casemanagement/rename_attachment.mako
   base/trunk/mpulsweb/templates/documents/global_rename.mako
Modified:
   base/trunk/mpulsweb/controllers/casedocument.py
   base/trunk/mpulsweb/controllers/document.py
   base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
   base/trunk/mpulsweb/i18n/mpulsweb.pot
   base/trunk/mpulsweb/lib/validators.py
   base/trunk/mpulsweb/model/document.py
   base/trunk/mpulsweb/templates/documents/case_overview.mako
   base/trunk/mpulsweb/templates/documents/global_overview.mako
Log:
Issue 2732 Part 1: Renaming of name and description of a document is enabled.
In the documents overview add a rename action.



Modified: base/trunk/mpulsweb/controllers/casedocument.py
===================================================================
--- base/trunk/mpulsweb/controllers/casedocument.py	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/controllers/casedocument.py	2011-12-01 14:26:49 UTC (rev 5684)
@@ -11,11 +11,14 @@
 
 from mpulsweb.lib.base import BaseController, render, session, g
 from mpulsweb.lib.validators import UploadCaseDocumentForm, \
-                                    UploadCaseDocumentWDescForm
+                                    UploadCaseDocumentWDescForm, \
+                                    RenameDocumentForm, \
+                                    RenameDocumentWDescForm
+
 from mpulsweb.lib.security import checkRole
 import mpulsweb.lib.helpers as h
 
-from mpulsweb.model.document import Document, deleteDocument
+from mpulsweb.model.document import Document, deleteDocument, renameDocument
 
 
 log = logging.getLogger(__name__)
@@ -116,3 +119,35 @@
                                  id=session['case'].id)
             return render('/casemanagement/dialogs/'
                           'confirm_delete_attachment.mako')
+    @checkRole('cm')
+    def rename(self, id, confirmed='0'):
+        c.id = self._checkInt(id)
+        return render('/casemanagement/rename_attachment.mako')
+
+    @checkRole('cm')
+    def renameAction(self, id):
+        if g.mpuls_config.is_enabled("module", "documents-description"):
+            validator = RenameDocumentWDescForm()
+        else:    
+            validator = RenameDocumentForm()
+        try:
+            result =  validator.to_python(request.params)
+            if result.has_key('name'):
+                filename = result['name']
+            else:
+                filename = ""
+            if result.has_key('description'):
+                desc  = result['description'] 
+            else:
+                desc = ""
+            renameDocument(id, filename, desc, True)
+        except formencode.Invalid, error:
+            c.form_result = error.value
+            c.form_errors = error.error_dict or {}
+            log.debug(c.form_result)
+            form = render('/casemanagement/rename_attachment.mako')
+            return formencode.htmlfill.render(form,
+                                              defaults=c.form_result,
+                                              auto_insert_errors=False,
+                                              errors=c.form_errors)
+        return self.overview(session['case'].id)

Modified: base/trunk/mpulsweb/controllers/document.py
===================================================================
--- base/trunk/mpulsweb/controllers/document.py	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/controllers/document.py	2011-12-01 14:26:49 UTC (rev 5684)
@@ -39,8 +39,12 @@
                               request, g
 from mpulsweb.lib.security import checkRole
 from mpulsweb.lib.validators import UploadGlobalDocumentForm, \
-                                    UploadGlobalDocumentWDescForm  
-from mpulsweb.model.document import Document, listDocuments, deleteDocument
+                                    UploadGlobalDocumentWDescForm, \
+                                    RenameDocumentForm, \
+                                    RenameDocumentWDescForm
+from mpulsweb.model.document import Document, listDocuments, deleteDocument, \
+                                    renameDocument
+        
 
 log = logging.getLogger(__name__)
 
@@ -134,5 +138,37 @@
             c.url_no = h.url_for(controller='/document',
                                  action='globalOverview')
             return render('/documents/dialogs/confirm.mako')
+    
+    @checkRole('admin')
+    def globalRename(self, id, confirmed='0'):
+        c.id = self._checkInt(id)
+        return render('/documents/global_rename.mako')
 
+    @checkRole('admin')
+    def globalRenameAction(self, id):
+        if g.mpuls_config.is_enabled("module", "documents-description"):
+            validator = RenameDocumentWDescForm()
+        else:    
+            validator = RenameDocumentForm()
+        try:
+            result =  validator.to_python(request.params)
+            if result.has_key('name'):
+                filename = result['name']
+            else:
+                filename = ""
+            if result.has_key('description'):
+                desc  = result['description'] 
+            else:
+                desc = ""
+            renameDocument(id, filename, desc)
+        except formencode.Invalid, error:
+            c.form_result = error.value
+            c.form_errors = error.error_dict or {}
+            log.debug(c.form_result)
+            form = render('/documents/global_rename.mako')
+            return formencode.htmlfill.render(form,
+                                              defaults=c.form_result,
+                                              auto_insert_errors=False,
+                                              errors=c.form_errors)
+        return self.globalOverview()
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

Modified: base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po
===================================================================
--- base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po	2011-12-01 14:26:49 UTC (rev 5684)
@@ -8,7 +8,7 @@
 "Project-Id-Version: mpulsweb 0.0.0\n"
 "Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
 "POT-Creation-Date: 2011-09-15 17:48+0200\n"
-"PO-Revision-Date: 2011-11-25 11:44+0100\n"
+"PO-Revision-Date: 2011-12-01 15:16+0100\n"
 "Last-Translator: Torsten Irländer <torsten.irlaender at intevation.de>\n"
 "Language-Team: de <LL at li.org>\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -176,7 +176,7 @@
 msgid "No help available"
 msgstr "Keine Hilfe verfügbar"
 
-#: mpulsweb/controllers/annotations.py:33 mpulsweb/templates/main.mako:37
+#: mpulsweb/controllers/annotations.py:33 mpulsweb/templates/main.mako:46
 #: mpulsweb/templates/phase/dialogs/success_fullautomatic_set_phase.mako:16
 msgid "Help"
 msgstr "Hilfe"
@@ -349,14 +349,14 @@
 
 #: mpulsweb/controllers/case.py:218 mpulsweb/model/case.py:1463
 #: mpulsweb/model/phase.py:302
-#: mpulsweb/templates/casemanagement/caselist.mako:154
+#: mpulsweb/templates/casemanagement/caselist.mako:155
 #: mpulsweb/templates/phase/phase.mako:51
 msgid "Running"
 msgstr "laufend"
 
 #: mpulsweb/controllers/case.py:220 mpulsweb/model/case.py:1465
 #: mpulsweb/model/phase.py:304
-#: mpulsweb/templates/casemanagement/caselist.mako:157
+#: mpulsweb/templates/casemanagement/caselist.mako:158
 #: mpulsweb/templates/phase/phase.mako:53
 #: mpulsweb/templates/phase/phase.mako:55
 msgid "Finished"
@@ -575,9 +575,9 @@
 #: mpulsweb/controllers/case_bundle.py:535
 #: mpulsweb/controllers/case_bundle.py:569
 #: mpulsweb/controllers/case_bundle.py:592
-#: mpulsweb/controllers/casedocument.py:65
-#: mpulsweb/controllers/casedocument.py:106 mpulsweb/controllers/document.py:84
-#: mpulsweb/controllers/document.py:126 mpulsweb/controllers/usersettings.py:91
+#: mpulsweb/controllers/casedocument.py:68
+#: mpulsweb/controllers/casedocument.py:109 mpulsweb/controllers/document.py:88
+#: mpulsweb/controllers/document.py:130 mpulsweb/controllers/usersettings.py:91
 #: mpulsweb/controllers/usersettings.py:126
 msgid "Please click OK to continue."
 msgstr "Bitte klicken Sie auf OK, um fortzufahren."
@@ -1023,39 +1023,39 @@
 "Verarbeitung mittels Serienbrief zur Verfügung. Bitte klicken Sie auf "
 "'Herunterladen', um die exportierten Daten herunterzuladen."
 
-#: mpulsweb/controllers/casedocument.py:64
+#: mpulsweb/controllers/casedocument.py:67
 msgid "Attachment added!"
 msgstr "Anlage hinzugefügt!"
 
-#: mpulsweb/controllers/casedocument.py:105
+#: mpulsweb/controllers/casedocument.py:108
 msgid "Attachment deleted!"
 msgstr "Anlage gelöscht!"
 
-#: mpulsweb/controllers/casedocument.py:111
+#: mpulsweb/controllers/casedocument.py:114
 #: mpulsweb/templates/casemanagement/dialogs/confirm_delete_attachment.mako:6
 msgid "Delete attachment?"
 msgstr "Anlage löschen?"
 
-#: mpulsweb/controllers/casedocument.py:112
+#: mpulsweb/controllers/casedocument.py:115
 msgid "Do you want to irrevocably delete the attachment?"
 msgstr ""
 "Wollen Sie die Anlage wirklich löschen und die Daten unwiederbringlich "
 "verlieren?"
 
-#: mpulsweb/controllers/document.py:83
+#: mpulsweb/controllers/document.py:87
 msgid "Document added!"
 msgstr "Dokument hinzugefügt!"
 
-#: mpulsweb/controllers/document.py:125
+#: mpulsweb/controllers/document.py:129
 msgid "Document deleted!"
 msgstr "Dokument gelöscht!"
 
-#: mpulsweb/controllers/document.py:130
+#: mpulsweb/controllers/document.py:134
 #: mpulsweb/templates/documents/dialogs/confirm.mako:5
 msgid "Delete document?"
 msgstr "Dokument löschen?"
 
-#: mpulsweb/controllers/document.py:131
+#: mpulsweb/controllers/document.py:135
 msgid "Do you want to delete the document and irrevocably lose the data?"
 msgstr ""
 "Wollen Sie wirklich das Dokument löschen und die Daten unwiederbringlich "
@@ -1104,11 +1104,11 @@
 "Auswertungen werden auf diese Agenturen beschränkt. Bitte klicken sie auf"
 " OK um fortzufahren."
 
-#: mpulsweb/controllers/formularpage.py:213
+#: mpulsweb/controllers/formularpage.py:212
 msgid "Phase automatically changed"
 msgstr "Phase automatisch gewechselt"
 
-#: mpulsweb/controllers/formularpage.py:214
+#: mpulsweb/controllers/formularpage.py:213
 #, python-format
 msgid ""
 "The phase of the case was changed automatically after checking the filled"
@@ -1120,11 +1120,11 @@
 "Bitte klicken Sie auf 'Ok', um mit der Bearbeitung der Fallakte "
 "fortzufahren."
 
-#: mpulsweb/controllers/formularpage.py:219
+#: mpulsweb/controllers/formularpage.py:218
 msgid "Change phase?"
 msgstr "Phase wechseln?"
 
-#: mpulsweb/controllers/formularpage.py:220
+#: mpulsweb/controllers/formularpage.py:219
 #, python-format
 msgid ""
 "After checking the filled out required fields, it seems that a phase "
@@ -1814,8 +1814,8 @@
 msgstr "Fehler beim Laden der Daten für Serienbrieffunktion"
 
 #: mpulsweb/model/case.py:1415 mpulsweb/model/case.py:1416
-#: mpulsweb/templates/casemanagement/caselist.mako:183
 #: mpulsweb/templates/casemanagement/caselist.mako:184
+#: mpulsweb/templates/casemanagement/caselist.mako:185
 #: mpulsweb/templates/search/search.mako:75
 msgid "Editable"
 msgstr "Bearbeitbar"
@@ -1860,19 +1860,19 @@
 "Die XML-Datei hat die Version '%s', unterstützt wird aber nur Version "
 "'%s'."
 
-#: mpulsweb/model/document.py:188
+#: mpulsweb/model/document.py:212
 msgid "Could not create new document"
 msgstr "Konnte neues Dokument nicht anlegen."
 
-#: mpulsweb/model/document.py:262
+#: mpulsweb/model/document.py:306
 msgid "No document available"
 msgstr "Kein Dokumentname vorhanden."
 
-#: mpulsweb/model/document.py:287
+#: mpulsweb/model/document.py:331
 msgid "An ID is needed"
 msgstr "ID wird benötigt"
 
-#: mpulsweb/model/document.py:306
+#: mpulsweb/model/document.py:350
 msgid "The requested document can't be found."
 msgstr "Das angeforderte Dokument kann nicht gefunden werden."
 
@@ -1929,7 +1929,7 @@
 msgid "role_initialadmin"
 msgstr "Super-Administration"
 
-#: mpulsweb/templates/base.mako:6 mpulsweb/templates/main.mako:199
+#: mpulsweb/templates/base.mako:6 mpulsweb/templates/main.mako:208
 msgid "Wrong formular input"
 msgstr "Fehlerhafte Formulareingabe"
 
@@ -1949,26 +1949,26 @@
 msgid "Login as"
 msgstr "Angemeldet als"
 
-#: mpulsweb/templates/main.mako:7 mpulsweb/templates/main.mako:30
+#: mpulsweb/templates/main.mako:8 mpulsweb/templates/main.mako:39
 #: mpulsweb/templates/usersettings/change_password.mako:5
 #: mpulsweb/templates/usersettings/show_settings.mako:4
 msgid "My Account"
 msgstr "Mein Konto"
 
-#: mpulsweb/templates/main.mako:23 mpulsweb/templates/main.mako:72
+#: mpulsweb/templates/main.mako:32 mpulsweb/templates/main.mako:81
 msgid "Black board"
 msgstr "Schwarzes Brett"
 
-#: mpulsweb/templates/main.mako:42
+#: mpulsweb/templates/main.mako:51
 msgid "Logout"
 msgstr "Abmelden"
 
-#: mpulsweb/templates/main.mako:50 mpulsweb/templates/main.mako:68
+#: mpulsweb/templates/main.mako:59 mpulsweb/templates/main.mako:77
 #, python-format
 msgid "%s Start"
 msgstr "%s Start"
 
-#: mpulsweb/templates/main.mako:80
+#: mpulsweb/templates/main.mako:89
 #: mpulsweb/templates/appointments/dialogs/confirm.mako:4
 #: mpulsweb/templates/appointments/dialogs/success_delete_appointment.mako:5
 #: mpulsweb/templates/casemanagement/dialogs/confirm_delete_appointment.mako:5
@@ -1976,12 +1976,12 @@
 msgid "Events"
 msgstr "Termine"
 
-#: mpulsweb/templates/main.mako:89
+#: mpulsweb/templates/main.mako:98
 #: mpulsweb/templates/casemanagement/dialogs/confirm_export.mako:45
 msgid "Documents"
 msgstr "Dokumente"
 
-#: mpulsweb/templates/main.mako:100 mpulsweb/templates/casebundle/editor.mako:6
+#: mpulsweb/templates/main.mako:109 mpulsweb/templates/casebundle/editor.mako:6
 #: mpulsweb/templates/casebundle/standin.mako:6
 #: mpulsweb/templates/casebundle/dialogs/confirm_anonymize.mako:5
 #: mpulsweb/templates/casebundle/dialogs/download_formletter.mako:5
@@ -2015,34 +2015,34 @@
 msgid "Case Management"
 msgstr "Case Management"
 
-#: mpulsweb/templates/main.mako:105
+#: mpulsweb/templates/main.mako:114
 msgid "Case documents\t"
 msgstr "Fallakten\t"
 
-#: mpulsweb/templates/main.mako:112
+#: mpulsweb/templates/main.mako:121
 msgid "New case document"
 msgstr "Fallakte anlegen"
 
-#: mpulsweb/templates/main.mako:119
+#: mpulsweb/templates/main.mako:128
 msgid "Import case document"
 msgstr "Fallakte importieren"
 
-#: mpulsweb/templates/main.mako:132
+#: mpulsweb/templates/main.mako:141
 msgid "Overview"
 msgstr "Übersicht"
 
-#: mpulsweb/templates/main.mako:136 mpulsweb/templates/auth/login.mako:17
+#: mpulsweb/templates/main.mako:145 mpulsweb/templates/auth/login.mako:17
 #: mpulsweb/templates/auth/login.mako:46
 msgid "Agency"
 msgstr "Einrichtung"
 
-#: mpulsweb/templates/main.mako:146
+#: mpulsweb/templates/main.mako:155
 #: mpulsweb/templates/evaluation/evaluate.mako:81
 #: mpulsweb/templates/help/help.mako:53
 msgid "Evaluations"
 msgstr "Auswertungen"
 
-#: mpulsweb/templates/main.mako:159
+#: mpulsweb/templates/main.mako:168
 #: mpulsweb/templates/administration/delete_user_helper.mako:6
 #: mpulsweb/templates/administration/edit_user.mako:13
 #: mpulsweb/templates/administration/edit_usergroup.mako:10
@@ -2072,56 +2072,56 @@
 msgid "Administration"
 msgstr "Administration"
 
-#: mpulsweb/templates/main.mako:164
+#: mpulsweb/templates/main.mako:173
 msgid "User"
 msgstr "Benutzer"
 
-#: mpulsweb/templates/main.mako:170
+#: mpulsweb/templates/main.mako:179
 msgid "Usergroup"
 msgstr "Benutzergruppen"
 
-#: mpulsweb/templates/main.mako:175
+#: mpulsweb/templates/main.mako:184
 msgid "Settings"
 msgstr "Einrichtung"
 
-#: mpulsweb/templates/main.mako:214
+#: mpulsweb/templates/main.mako:223
 msgid "Info"
 msgstr "Info"
 
-#: mpulsweb/templates/main.mako:234
+#: mpulsweb/templates/main.mako:243
 msgid "Go to main menu directly"
 msgstr "Direkt zum Hauptmenü springen"
 
-#: mpulsweb/templates/main.mako:236
+#: mpulsweb/templates/main.mako:245
 msgid "Go to main menu"
 msgstr "Zum Hauptmenü springen"
 
-#: mpulsweb/templates/main.mako:240
+#: mpulsweb/templates/main.mako:249
 msgid "Go to domain menu directly"
 msgstr "Direkt zum Bereichsmenü springen"
 
-#: mpulsweb/templates/main.mako:242
+#: mpulsweb/templates/main.mako:251
 msgid "Go to domain menu"
 msgstr "Zum Bereichsmenü springen"
 
-#: mpulsweb/templates/main.mako:246
+#: mpulsweb/templates/main.mako:255
 msgid "Go to content directly"
 msgstr "Direkt zum Inhalt springen"
 
-#: mpulsweb/templates/main.mako:247
+#: mpulsweb/templates/main.mako:256
 msgid "Go to content"
 msgstr "Zum Inhalt springen"
 
-#: mpulsweb/templates/main.mako:255 mpulsweb/templates/annotations/main.mako:33
+#: mpulsweb/templates/main.mako:264 mpulsweb/templates/annotations/main.mako:33
 #: mpulsweb/templates/auth/main.mako:6
 msgid "Logo agency"
 msgstr "Logo Einrichtung"
 
-#: mpulsweb/templates/main.mako:282
+#: mpulsweb/templates/main.mako:291
 msgid "Notice"
 msgstr "Hinweis"
 
-#: mpulsweb/templates/main.mako:283
+#: mpulsweb/templates/main.mako:292
 #, python-format
 msgid ""
 "This session will be automatically terminated at %s. Please make sure you"
@@ -2217,8 +2217,8 @@
 #: mpulsweb/templates/administration/new_user.mako:7
 #: mpulsweb/templates/auth/main.mako:29
 #: mpulsweb/templates/usersettings/change_password.mako:10
-#: mpulsweb/templates/usersettings/change_password.mako:43
-#: mpulsweb/templates/usersettings/change_password.mako:46
+#: mpulsweb/templates/usersettings/change_password.mako:48
+#: mpulsweb/templates/usersettings/change_password.mako:54
 #: mpulsweb/templates/usersettings/change_password_login.mako:20
 #: mpulsweb/templates/usersettings/change_password_login.mako:23
 msgid "Enter new password"
@@ -2228,8 +2228,8 @@
 #: mpulsweb/templates/administration/new_user.mako:8
 #: mpulsweb/templates/auth/main.mako:30
 #: mpulsweb/templates/usersettings/change_password.mako:11
-#: mpulsweb/templates/usersettings/change_password.mako:52
-#: mpulsweb/templates/usersettings/change_password.mako:55
+#: mpulsweb/templates/usersettings/change_password.mako:61
+#: mpulsweb/templates/usersettings/change_password.mako:67
 #: mpulsweb/templates/usersettings/change_password_login.mako:29
 #: mpulsweb/templates/usersettings/change_password_login.mako:32
 msgid "Repeat pasword"
@@ -2473,14 +2473,16 @@
 #: mpulsweb/templates/administration/overview_usergroups.mako:41
 #: mpulsweb/templates/appointments/appointmentlist.mako:3
 #: mpulsweb/templates/casemanagement/appointmentlist.mako:7
-#: mpulsweb/templates/casemanagement/caselist.mako:217
-#: mpulsweb/templates/casemanagement/caselist.mako:218
+#: mpulsweb/templates/casemanagement/caselist.mako:219
+#: mpulsweb/templates/casemanagement/caselist.mako:220
+#: mpulsweb/templates/casemanagement/caselist.mako:262
+#: mpulsweb/templates/casemanagement/caselist.mako:263
 #: mpulsweb/templates/casemanagement/reminderlist.mako:6
 #: mpulsweb/templates/casemanagement/reminderlist.mako:7
-#: mpulsweb/templates/documents/case_overview.mako:63
-#: mpulsweb/templates/documents/case_overview.mako:64
-#: mpulsweb/templates/documents/global_overview.mako:53
-#: mpulsweb/templates/documents/global_overview.mako:54
+#: mpulsweb/templates/documents/case_overview.mako:66
+#: mpulsweb/templates/documents/case_overview.mako:67
+#: mpulsweb/templates/documents/global_overview.mako:56
+#: mpulsweb/templates/documents/global_overview.mako:57
 #: mpulsweb/templates/home/caseappointmentlist.mako:7
 #: mpulsweb/templates/home/caseappointmentlist.mako:11
 #: mpulsweb/templates/home/caseappointmentlist.mako:15
@@ -2498,22 +2500,23 @@
 #: mpulsweb/templates/appointments/appointmentlist.mako:5
 #: mpulsweb/templates/casemanagement/appointmentlist.mako:14
 #: mpulsweb/templates/casemanagement/appointmentlist.mako:15
-#: mpulsweb/templates/casemanagement/caselist.mako:271
-#: mpulsweb/templates/casemanagement/caselist.mako:272
+#: mpulsweb/templates/casemanagement/caselist.mako:282
+#: mpulsweb/templates/casemanagement/caselist.mako:283
 #: mpulsweb/templates/casemanagement/overview.mako:34
 #: mpulsweb/templates/casemanagement/overview.mako:44
 #: mpulsweb/templates/casemanagement/reminderlist.mako:12
 #: mpulsweb/templates/casemanagement/reminderlist.mako:13
-#: mpulsweb/templates/documents/case_overview.mako:69
-#: mpulsweb/templates/documents/case_overview.mako:70
-#: mpulsweb/templates/documents/global_overview.mako:59
+#: mpulsweb/templates/documents/case_overview.mako:72
+#: mpulsweb/templates/documents/case_overview.mako:80
+#: mpulsweb/templates/documents/case_overview.mako:81
+#: mpulsweb/templates/documents/global_overview.mako:66
 msgid "Delete"
 msgstr "Löschen"
 
 #: mpulsweb/templates/administration/overview_user.mako:60
 #: mpulsweb/templates/administration/overview_usergroups.mako:49
 #: mpulsweb/templates/casebundle/standin.mako:52
-#: mpulsweb/templates/casemanagement/caselist.mako:290
+#: mpulsweb/templates/casemanagement/caselist.mako:301
 #: mpulsweb/templates/evaluation/agencylist.mako:94
 #: mpulsweb/templates/meta/search.mako:101
 msgid "No data found."
@@ -2690,7 +2693,9 @@
 #: mpulsweb/templates/appointments/overview_body.mako:6
 #: mpulsweb/templates/appointments/remindlist_body.mako:6
 #: mpulsweb/templates/appointments/show_body.mako:29
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:46
 #: mpulsweb/templates/documents/case_new.mako:72
+#: mpulsweb/templates/documents/global_rename.mako:47
 #: mpulsweb/templates/documents/global_upload.mako:60
 #: mpulsweb/templates/evaluation/evaluate.mako:30
 #: mpulsweb/templates/home/globalappointmentlist.mako:12
@@ -2875,8 +2880,8 @@
 msgstr "Vertretung setzen"
 
 #: mpulsweb/templates/casebundle/standin.mako:15
-#: mpulsweb/templates/casemanagement/caselist.mako:174
 #: mpulsweb/templates/casemanagement/caselist.mako:175
+#: mpulsweb/templates/casemanagement/caselist.mako:176
 #: mpulsweb/templates/casemanagement/organisation.mako:42
 #: mpulsweb/templates/search/search.mako:60
 #: mpulsweb/templates/usersettings/edit_standin.mako:24
@@ -2912,8 +2917,8 @@
 
 #: mpulsweb/templates/casebundle/standin.mako:34
 #: mpulsweb/templates/casemanagement/caselist.mako:32
-#: mpulsweb/templates/casemanagement/caselist.mako:167
 #: mpulsweb/templates/casemanagement/caselist.mako:168
+#: mpulsweb/templates/casemanagement/caselist.mako:169
 #: mpulsweb/templates/casemanagement/digest.mako:118
 #: mpulsweb/templates/casemanagement/organisation.mako:16
 #: mpulsweb/templates/casemanagement/organisation.mako:49
@@ -2933,10 +2938,10 @@
 #: mpulsweb/templates/casebundle/dialogs/confirm_anonymize.mako:6
 #: mpulsweb/templates/casebundle/dialogs/failure_anonymize.mako:6
 #: mpulsweb/templates/casebundle/dialogs/success_anonymize.mako:6
-#: mpulsweb/templates/casemanagement/caselist.mako:239
 #: mpulsweb/templates/casemanagement/caselist.mako:240
-#: mpulsweb/templates/casemanagement/caselist.mako:262
-#: mpulsweb/templates/casemanagement/caselist.mako:263
+#: mpulsweb/templates/casemanagement/caselist.mako:241
+#: mpulsweb/templates/casemanagement/caselist.mako:273
+#: mpulsweb/templates/casemanagement/caselist.mako:274
 #: mpulsweb/templates/casemanagement/main.mako:63
 #: mpulsweb/templates/casemanagement/dialogs/confirm_anonymize.mako:14
 #: mpulsweb/templates/casemanagement/dialogs/confirm_markanonymize.mako:13
@@ -3062,32 +3067,32 @@
 msgid "Status"
 msgstr "Status"
 
-#: mpulsweb/templates/casemanagement/caselist.mako:147
+#: mpulsweb/templates/casemanagement/caselist.mako:148
 msgid "Legend"
 msgstr "Legende"
 
-#: mpulsweb/templates/casemanagement/caselist.mako:190
 #: mpulsweb/templates/casemanagement/caselist.mako:191
+#: mpulsweb/templates/casemanagement/caselist.mako:192
 msgid "Mark delete"
 msgstr "Schwebend gelöscht"
 
-#: mpulsweb/templates/casemanagement/caselist.mako:197
 #: mpulsweb/templates/casemanagement/caselist.mako:198
+#: mpulsweb/templates/casemanagement/caselist.mako:199
 msgid "Mark anonym"
 msgstr "Schwebend anonymisiert"
 
-#: mpulsweb/templates/casemanagement/caselist.mako:204
 #: mpulsweb/templates/casemanagement/caselist.mako:205
+#: mpulsweb/templates/casemanagement/caselist.mako:206
 msgid "Make anonymousym"
 msgstr "Anonymisiert"
 
-#: mpulsweb/templates/casemanagement/caselist.mako:228
 #: mpulsweb/templates/casemanagement/caselist.mako:229
+#: mpulsweb/templates/casemanagement/caselist.mako:230
 msgid "Delete case"
 msgstr "Fallakte löschen"
 
-#: mpulsweb/templates/casemanagement/caselist.mako:250
 #: mpulsweb/templates/casemanagement/caselist.mako:251
+#: mpulsweb/templates/casemanagement/caselist.mako:252
 msgid "Restore case document"
 msgstr "Fallakte wiederherstellen"
 
@@ -3382,6 +3387,46 @@
 msgid "submit action"
 msgstr "Aktion für Auswahl ausführen"
 
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:5
+#: mpulsweb/templates/documents/case_overview.mako:19
+#: mpulsweb/templates/documents/global_overview.mako:6
+#: mpulsweb/templates/documents/global_overview.mako:10
+#: mpulsweb/templates/documents/global_rename.mako:5
+#: mpulsweb/templates/documents/global_upload.mako:5
+#: mpulsweb/templates/documents/dialogs/confirm.mako:4
+#: mpulsweb/templates/documents/dialogs/delete_document_success.mako:4
+#: mpulsweb/templates/documents/dialogs/failed_document.mako:4
+#: mpulsweb/templates/documents/dialogs/success_documents.mako:4
+msgid "Document overview"
+msgstr "Anlagenübersicht"
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:10
+#: mpulsweb/templates/documents/global_rename.mako:11
+msgid "Rename document"
+msgstr "Umbenennen von Anlagen"
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:17
+#: mpulsweb/templates/documents/global_rename.mako:18
+#: mpulsweb/templates/documents/global_upload.mako:18
+msgid "Back to: user overview"
+msgstr "Zurück zu: Benutzerübersicht"
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:37
+#: mpulsweb/templates/documents/case_new.mako:63
+#: mpulsweb/templates/documents/case_overview.mako:36
+#: mpulsweb/templates/documents/global_overview.mako:27
+#: mpulsweb/templates/documents/global_rename.mako:38
+#: mpulsweb/templates/documents/global_upload.mako:51
+msgid "Filename"
+msgstr "Dateiname"
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:56
+#: mpulsweb/templates/documents/case_new.mako:110
+#: mpulsweb/templates/documents/global_rename.mako:57
+#: mpulsweb/templates/documents/global_upload.mako:96
+msgid "Submit"
+msgstr "Hinzufügen"
+
 #: mpulsweb/templates/casemanagement/search.mako:9
 #: mpulsweb/templates/evaluation/search.mako:11
 #: mpulsweb/templates/evaluation/search.mako:14
@@ -3582,13 +3627,6 @@
 msgid "File"
 msgstr "Datei"
 
-#: mpulsweb/templates/documents/case_new.mako:63
-#: mpulsweb/templates/documents/case_overview.mako:36
-#: mpulsweb/templates/documents/global_overview.mako:27
-#: mpulsweb/templates/documents/global_upload.mako:51
-msgid "Filename"
-msgstr "Dateiname"
-
 #: mpulsweb/templates/documents/case_new.mako:82
 #: mpulsweb/templates/documents/global_upload.mako:70
 msgid ""
@@ -3620,42 +3658,30 @@
 "Beachten Sie, dass Sie den Haken bei \"Überschreiben\" setzen müssen, "
 "wenn Sie Daten gleichen Namens überschreiben wollen."
 
-#: mpulsweb/templates/documents/case_new.mako:110
-#: mpulsweb/templates/documents/global_upload.mako:96
-msgid "Submit"
-msgstr "Hinzufügen"
-
-#: mpulsweb/templates/documents/case_overview.mako:19
-#: mpulsweb/templates/documents/global_overview.mako:6
-#: mpulsweb/templates/documents/global_overview.mako:10
-#: mpulsweb/templates/documents/global_upload.mako:5
-#: mpulsweb/templates/documents/dialogs/confirm.mako:4
-#: mpulsweb/templates/documents/dialogs/delete_document_success.mako:4
-#: mpulsweb/templates/documents/dialogs/failed_document.mako:4
-#: mpulsweb/templates/documents/dialogs/success_documents.mako:4
-msgid "Document overview"
-msgstr "Anlagenübersicht"
-
 #: mpulsweb/templates/documents/case_overview.mako:39
 #: mpulsweb/templates/documents/global_overview.mako:30
 msgid "Filesize"
 msgstr "Dateigröße"
 
-#: mpulsweb/templates/documents/case_overview.mako:84
-#: mpulsweb/templates/documents/global_overview.mako:73
+#: mpulsweb/templates/documents/case_overview.mako:72
+#: mpulsweb/templates/documents/global_overview.mako:62
+#, fuzzy
+#| msgid "Forename"
+msgid "Rename"
+msgstr "Vorname"
+
+#: mpulsweb/templates/documents/case_overview.mako:90
+#: mpulsweb/templates/documents/global_overview.mako:75
 msgid "No files found"
 msgstr "Es wurden keine Dateien gefunden"
 
+#: mpulsweb/templates/documents/global_rename.mako:6
 #: mpulsweb/templates/documents/global_upload.mako:6
 #: mpulsweb/templates/documents/dialogs/failed_document.mako:5
 #: mpulsweb/templates/documents/dialogs/success_documents.mako:5
 msgid "Add document"
 msgstr "Dokument hinzufügen"
 
-#: mpulsweb/templates/documents/global_upload.mako:18
-msgid "Back to: user overview"
-msgstr "Zurück zu: Benutzerübersicht"
-
 #: mpulsweb/templates/documents/global_upload.mako:27
 msgid "The size of the documents isnt allowed to exceed 10MB."
 msgstr "Die Größe eines Dokuments darf nicht 10MB überschreiten."
@@ -4762,8 +4788,8 @@
 msgstr "Benutzerpasswort ändern"
 
 #: mpulsweb/templates/usersettings/change_password.mako:12
-#: mpulsweb/templates/usersettings/change_password.mako:34
-#: mpulsweb/templates/usersettings/change_password.mako:37
+#: mpulsweb/templates/usersettings/change_password.mako:35
+#: mpulsweb/templates/usersettings/change_password.mako:41
 msgid "Enter old password"
 msgstr "Altes Passwort eingeben"
 
@@ -4780,7 +4806,7 @@
 "Das neue Passwort muss aus mindestens zwölf Zeichen bestehen und zwei "
 "Nicht-Buchstaben enthalten. "
 
-#: mpulsweb/templates/usersettings/change_password.mako:61
+#: mpulsweb/templates/usersettings/change_password.mako:75
 #: mpulsweb/templates/usersettings/change_password_login.mako:37
 msgid "Save"
 msgstr "Speichern"

Modified: base/trunk/mpulsweb/i18n/mpulsweb.pot
===================================================================
--- base/trunk/mpulsweb/i18n/mpulsweb.pot	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/i18n/mpulsweb.pot	2011-12-01 14:26:49 UTC (rev 5684)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: mpulsweb 2.0.16\n"
 "Report-Msgid-Bugs-To: EMAIL at ADDRESS\n"
-"POT-Creation-Date: 2011-11-25 11:43+0100\n"
+"POT-Creation-Date: 2011-12-01 15:16+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"
@@ -153,7 +153,7 @@
 msgid "No help available"
 msgstr ""
 
-#: mpulsweb/controllers/annotations.py:33 mpulsweb/templates/main.mako:37
+#: mpulsweb/controllers/annotations.py:33 mpulsweb/templates/main.mako:46
 #: mpulsweb/templates/phase/dialogs/success_fullautomatic_set_phase.mako:16
 msgid "Help"
 msgstr ""
@@ -293,13 +293,13 @@
 msgstr ""
 
 #: mpulsweb/controllers/case.py:218 mpulsweb/model/case.py:1463
-#: mpulsweb/model/phase.py:302 mpulsweb/templates/casemanagement/caselist.mako:154
+#: mpulsweb/model/phase.py:302 mpulsweb/templates/casemanagement/caselist.mako:155
 #: mpulsweb/templates/phase/phase.mako:51
 msgid "Running"
 msgstr ""
 
 #: mpulsweb/controllers/case.py:220 mpulsweb/model/case.py:1465
-#: mpulsweb/model/phase.py:304 mpulsweb/templates/casemanagement/caselist.mako:157
+#: mpulsweb/model/phase.py:304 mpulsweb/templates/casemanagement/caselist.mako:158
 #: mpulsweb/templates/phase/phase.mako:53 mpulsweb/templates/phase/phase.mako:55
 msgid "Finished"
 msgstr ""
@@ -454,9 +454,9 @@
 #: mpulsweb/controllers/case_bundle.py:440 mpulsweb/controllers/case_bundle.py:490
 #: mpulsweb/controllers/case_bundle.py:504 mpulsweb/controllers/case_bundle.py:515
 #: mpulsweb/controllers/case_bundle.py:535 mpulsweb/controllers/case_bundle.py:569
-#: mpulsweb/controllers/case_bundle.py:592 mpulsweb/controllers/casedocument.py:65
-#: mpulsweb/controllers/casedocument.py:106 mpulsweb/controllers/document.py:84
-#: mpulsweb/controllers/document.py:126 mpulsweb/controllers/usersettings.py:91
+#: mpulsweb/controllers/case_bundle.py:592 mpulsweb/controllers/casedocument.py:68
+#: mpulsweb/controllers/casedocument.py:109 mpulsweb/controllers/document.py:88
+#: mpulsweb/controllers/document.py:130 mpulsweb/controllers/usersettings.py:91
 #: mpulsweb/controllers/usersettings.py:126
 msgid "Please click OK to continue."
 msgstr ""
@@ -826,37 +826,37 @@
 msgstr[0] ""
 msgstr[1] ""
 
-#: mpulsweb/controllers/casedocument.py:64
+#: mpulsweb/controllers/casedocument.py:67
 msgid "Attachment added!"
 msgstr ""
 
-#: mpulsweb/controllers/casedocument.py:105
+#: mpulsweb/controllers/casedocument.py:108
 msgid "Attachment deleted!"
 msgstr ""
 
-#: mpulsweb/controllers/casedocument.py:111
+#: mpulsweb/controllers/casedocument.py:114
 #: mpulsweb/templates/casemanagement/dialogs/confirm_delete_attachment.mako:6
 msgid "Delete attachment?"
 msgstr ""
 
-#: mpulsweb/controllers/casedocument.py:112
+#: mpulsweb/controllers/casedocument.py:115
 msgid "Do you want to irrevocably delete the attachment?"
 msgstr ""
 
-#: mpulsweb/controllers/document.py:83
+#: mpulsweb/controllers/document.py:87
 msgid "Document added!"
 msgstr ""
 
-#: mpulsweb/controllers/document.py:125
+#: mpulsweb/controllers/document.py:129
 msgid "Document deleted!"
 msgstr ""
 
-#: mpulsweb/controllers/document.py:130
+#: mpulsweb/controllers/document.py:134
 #: mpulsweb/templates/documents/dialogs/confirm.mako:5
 msgid "Delete document?"
 msgstr ""
 
-#: mpulsweb/controllers/document.py:131
+#: mpulsweb/controllers/document.py:135
 msgid "Do you want to delete the document and irrevocably lose the data?"
 msgstr ""
 
@@ -893,11 +893,11 @@
 msgstr[0] ""
 msgstr[1] ""
 
-#: mpulsweb/controllers/formularpage.py:213
+#: mpulsweb/controllers/formularpage.py:212
 msgid "Phase automatically changed"
 msgstr ""
 
-#: mpulsweb/controllers/formularpage.py:214
+#: mpulsweb/controllers/formularpage.py:213
 #, python-format
 msgid ""
 "The phase of the case was changed automatically after checking the filled out"
@@ -905,11 +905,11 @@
 "to proceed editing the case."
 msgstr ""
 
-#: mpulsweb/controllers/formularpage.py:219
+#: mpulsweb/controllers/formularpage.py:218
 msgid "Change phase?"
 msgstr ""
 
-#: mpulsweb/controllers/formularpage.py:220
+#: mpulsweb/controllers/formularpage.py:219
 #, python-format
 msgid ""
 "After checking the filled out required fields, it seems that a phase change "
@@ -1472,8 +1472,8 @@
 msgstr ""
 
 #: mpulsweb/model/case.py:1415 mpulsweb/model/case.py:1416
-#: mpulsweb/templates/casemanagement/caselist.mako:183
 #: mpulsweb/templates/casemanagement/caselist.mako:184
+#: mpulsweb/templates/casemanagement/caselist.mako:185
 #: mpulsweb/templates/search/search.mako:75
 msgid "Editable"
 msgstr ""
@@ -1512,19 +1512,19 @@
 msgid "The XML file has the version '%s', but supported is only version '%s'"
 msgstr ""
 
-#: mpulsweb/model/document.py:188
+#: mpulsweb/model/document.py:212
 msgid "Could not create new document"
 msgstr ""
 
-#: mpulsweb/model/document.py:262
+#: mpulsweb/model/document.py:306
 msgid "No document available"
 msgstr ""
 
-#: mpulsweb/model/document.py:287
+#: mpulsweb/model/document.py:331
 msgid "An ID is needed"
 msgstr ""
 
-#: mpulsweb/model/document.py:306
+#: mpulsweb/model/document.py:350
 msgid "The requested document can't be found."
 msgstr ""
 
@@ -1577,7 +1577,7 @@
 msgid "role_initialadmin"
 msgstr ""
 
-#: mpulsweb/templates/base.mako:6 mpulsweb/templates/main.mako:199
+#: mpulsweb/templates/base.mako:6 mpulsweb/templates/main.mako:208
 msgid "Wrong formular input"
 msgstr ""
 
@@ -1593,26 +1593,26 @@
 msgid "Login as"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:7 mpulsweb/templates/main.mako:30
+#: mpulsweb/templates/main.mako:8 mpulsweb/templates/main.mako:39
 #: mpulsweb/templates/usersettings/change_password.mako:5
 #: mpulsweb/templates/usersettings/show_settings.mako:4
 msgid "My Account"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:23 mpulsweb/templates/main.mako:72
+#: mpulsweb/templates/main.mako:32 mpulsweb/templates/main.mako:81
 msgid "Black board"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:42
+#: mpulsweb/templates/main.mako:51
 msgid "Logout"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:50 mpulsweb/templates/main.mako:68
+#: mpulsweb/templates/main.mako:59 mpulsweb/templates/main.mako:77
 #, python-format
 msgid "%s Start"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:80
+#: mpulsweb/templates/main.mako:89
 #: mpulsweb/templates/appointments/dialogs/confirm.mako:4
 #: mpulsweb/templates/appointments/dialogs/success_delete_appointment.mako:5
 #: mpulsweb/templates/casemanagement/dialogs/confirm_delete_appointment.mako:5
@@ -1620,12 +1620,12 @@
 msgid "Events"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:89
+#: mpulsweb/templates/main.mako:98
 #: mpulsweb/templates/casemanagement/dialogs/confirm_export.mako:45
 msgid "Documents"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:100 mpulsweb/templates/casebundle/editor.mako:6
+#: mpulsweb/templates/main.mako:109 mpulsweb/templates/casebundle/editor.mako:6
 #: mpulsweb/templates/casebundle/standin.mako:6
 #: mpulsweb/templates/casebundle/dialogs/confirm_anonymize.mako:5
 #: mpulsweb/templates/casebundle/dialogs/download_formletter.mako:5
@@ -1659,33 +1659,33 @@
 msgid "Case Management"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:105
+#: mpulsweb/templates/main.mako:114
 msgid "Case documents\t"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:112
+#: mpulsweb/templates/main.mako:121
 msgid "New case document"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:119
+#: mpulsweb/templates/main.mako:128
 msgid "Import case document"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:132
+#: mpulsweb/templates/main.mako:141
 msgid "Overview"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:136 mpulsweb/templates/auth/login.mako:17
+#: mpulsweb/templates/main.mako:145 mpulsweb/templates/auth/login.mako:17
 #: mpulsweb/templates/auth/login.mako:46
 msgid "Agency"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:146 mpulsweb/templates/evaluation/evaluate.mako:81
+#: mpulsweb/templates/main.mako:155 mpulsweb/templates/evaluation/evaluate.mako:81
 #: mpulsweb/templates/help/help.mako:53
 msgid "Evaluations"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:159
+#: mpulsweb/templates/main.mako:168
 #: mpulsweb/templates/administration/delete_user_helper.mako:6
 #: mpulsweb/templates/administration/edit_user.mako:13
 #: mpulsweb/templates/administration/edit_usergroup.mako:10
@@ -1714,56 +1714,56 @@
 msgid "Administration"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:164
+#: mpulsweb/templates/main.mako:173
 msgid "User"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:170
+#: mpulsweb/templates/main.mako:179
 msgid "Usergroup"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:175
+#: mpulsweb/templates/main.mako:184
 msgid "Settings"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:214
+#: mpulsweb/templates/main.mako:223
 msgid "Info"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:234
+#: mpulsweb/templates/main.mako:243
 msgid "Go to main menu directly"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:236
+#: mpulsweb/templates/main.mako:245
 msgid "Go to main menu"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:240
+#: mpulsweb/templates/main.mako:249
 msgid "Go to domain menu directly"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:242
+#: mpulsweb/templates/main.mako:251
 msgid "Go to domain menu"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:246
+#: mpulsweb/templates/main.mako:255
 msgid "Go to content directly"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:247
+#: mpulsweb/templates/main.mako:256
 msgid "Go to content"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:255 mpulsweb/templates/annotations/main.mako:33
+#: mpulsweb/templates/main.mako:264 mpulsweb/templates/annotations/main.mako:33
 #: mpulsweb/templates/auth/main.mako:6
 msgid "Logo agency"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:282
+#: mpulsweb/templates/main.mako:291
 msgid "Notice"
 msgstr ""
 
-#: mpulsweb/templates/main.mako:283
+#: mpulsweb/templates/main.mako:292
 #, python-format
 msgid ""
 "This session will be automatically terminated at %s. Please make sure you "
@@ -1853,8 +1853,8 @@
 #: mpulsweb/templates/administration/new_user.mako:7
 #: mpulsweb/templates/auth/main.mako:29
 #: mpulsweb/templates/usersettings/change_password.mako:10
-#: mpulsweb/templates/usersettings/change_password.mako:43
-#: mpulsweb/templates/usersettings/change_password.mako:46
+#: mpulsweb/templates/usersettings/change_password.mako:48
+#: mpulsweb/templates/usersettings/change_password.mako:54
 #: mpulsweb/templates/usersettings/change_password_login.mako:20
 #: mpulsweb/templates/usersettings/change_password_login.mako:23
 msgid "Enter new password"
@@ -1864,8 +1864,8 @@
 #: mpulsweb/templates/administration/new_user.mako:8
 #: mpulsweb/templates/auth/main.mako:30
 #: mpulsweb/templates/usersettings/change_password.mako:11
-#: mpulsweb/templates/usersettings/change_password.mako:52
-#: mpulsweb/templates/usersettings/change_password.mako:55
+#: mpulsweb/templates/usersettings/change_password.mako:61
+#: mpulsweb/templates/usersettings/change_password.mako:67
 #: mpulsweb/templates/usersettings/change_password_login.mako:29
 #: mpulsweb/templates/usersettings/change_password_login.mako:32
 msgid "Repeat pasword"
@@ -2108,14 +2108,16 @@
 #: mpulsweb/templates/administration/overview_usergroups.mako:41
 #: mpulsweb/templates/appointments/appointmentlist.mako:3
 #: mpulsweb/templates/casemanagement/appointmentlist.mako:7
-#: mpulsweb/templates/casemanagement/caselist.mako:217
-#: mpulsweb/templates/casemanagement/caselist.mako:218
+#: mpulsweb/templates/casemanagement/caselist.mako:219
+#: mpulsweb/templates/casemanagement/caselist.mako:220
+#: mpulsweb/templates/casemanagement/caselist.mako:262
+#: mpulsweb/templates/casemanagement/caselist.mako:263
 #: mpulsweb/templates/casemanagement/reminderlist.mako:6
 #: mpulsweb/templates/casemanagement/reminderlist.mako:7
-#: mpulsweb/templates/documents/case_overview.mako:63
-#: mpulsweb/templates/documents/case_overview.mako:64
-#: mpulsweb/templates/documents/global_overview.mako:53
-#: mpulsweb/templates/documents/global_overview.mako:54
+#: mpulsweb/templates/documents/case_overview.mako:66
+#: mpulsweb/templates/documents/case_overview.mako:67
+#: mpulsweb/templates/documents/global_overview.mako:56
+#: mpulsweb/templates/documents/global_overview.mako:57
 #: mpulsweb/templates/home/caseappointmentlist.mako:7
 #: mpulsweb/templates/home/caseappointmentlist.mako:11
 #: mpulsweb/templates/home/caseappointmentlist.mako:15
@@ -2133,22 +2135,23 @@
 #: mpulsweb/templates/appointments/appointmentlist.mako:5
 #: mpulsweb/templates/casemanagement/appointmentlist.mako:14
 #: mpulsweb/templates/casemanagement/appointmentlist.mako:15
-#: mpulsweb/templates/casemanagement/caselist.mako:271
-#: mpulsweb/templates/casemanagement/caselist.mako:272
+#: mpulsweb/templates/casemanagement/caselist.mako:282
+#: mpulsweb/templates/casemanagement/caselist.mako:283
 #: mpulsweb/templates/casemanagement/overview.mako:34
 #: mpulsweb/templates/casemanagement/overview.mako:44
 #: mpulsweb/templates/casemanagement/reminderlist.mako:12
 #: mpulsweb/templates/casemanagement/reminderlist.mako:13
-#: mpulsweb/templates/documents/case_overview.mako:69
-#: mpulsweb/templates/documents/case_overview.mako:70
-#: mpulsweb/templates/documents/global_overview.mako:59
+#: mpulsweb/templates/documents/case_overview.mako:72
+#: mpulsweb/templates/documents/case_overview.mako:80
+#: mpulsweb/templates/documents/case_overview.mako:81
+#: mpulsweb/templates/documents/global_overview.mako:66
 msgid "Delete"
 msgstr ""
 
 #: mpulsweb/templates/administration/overview_user.mako:60
 #: mpulsweb/templates/administration/overview_usergroups.mako:49
 #: mpulsweb/templates/casebundle/standin.mako:52
-#: mpulsweb/templates/casemanagement/caselist.mako:290
+#: mpulsweb/templates/casemanagement/caselist.mako:301
 #: mpulsweb/templates/evaluation/agencylist.mako:94
 #: mpulsweb/templates/meta/search.mako:101
 msgid "No data found."
@@ -2325,7 +2328,9 @@
 #: mpulsweb/templates/appointments/overview_body.mako:6
 #: mpulsweb/templates/appointments/remindlist_body.mako:6
 #: mpulsweb/templates/appointments/show_body.mako:29
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:46
 #: mpulsweb/templates/documents/case_new.mako:72
+#: mpulsweb/templates/documents/global_rename.mako:47
 #: mpulsweb/templates/documents/global_upload.mako:60
 #: mpulsweb/templates/evaluation/evaluate.mako:30
 #: mpulsweb/templates/home/globalappointmentlist.mako:12
@@ -2505,8 +2510,8 @@
 msgstr ""
 
 #: mpulsweb/templates/casebundle/standin.mako:15
-#: mpulsweb/templates/casemanagement/caselist.mako:174
 #: mpulsweb/templates/casemanagement/caselist.mako:175
+#: mpulsweb/templates/casemanagement/caselist.mako:176
 #: mpulsweb/templates/casemanagement/organisation.mako:42
 #: mpulsweb/templates/search/search.mako:60
 #: mpulsweb/templates/usersettings/edit_standin.mako:24
@@ -2542,8 +2547,8 @@
 
 #: mpulsweb/templates/casebundle/standin.mako:34
 #: mpulsweb/templates/casemanagement/caselist.mako:32
-#: mpulsweb/templates/casemanagement/caselist.mako:167
 #: mpulsweb/templates/casemanagement/caselist.mako:168
+#: mpulsweb/templates/casemanagement/caselist.mako:169
 #: mpulsweb/templates/casemanagement/digest.mako:118
 #: mpulsweb/templates/casemanagement/organisation.mako:16
 #: mpulsweb/templates/casemanagement/organisation.mako:49
@@ -2562,10 +2567,10 @@
 #: mpulsweb/templates/casebundle/dialogs/confirm_anonymize.mako:6
 #: mpulsweb/templates/casebundle/dialogs/failure_anonymize.mako:6
 #: mpulsweb/templates/casebundle/dialogs/success_anonymize.mako:6
-#: mpulsweb/templates/casemanagement/caselist.mako:239
 #: mpulsweb/templates/casemanagement/caselist.mako:240
-#: mpulsweb/templates/casemanagement/caselist.mako:262
-#: mpulsweb/templates/casemanagement/caselist.mako:263
+#: mpulsweb/templates/casemanagement/caselist.mako:241
+#: mpulsweb/templates/casemanagement/caselist.mako:273
+#: mpulsweb/templates/casemanagement/caselist.mako:274
 #: mpulsweb/templates/casemanagement/main.mako:63
 #: mpulsweb/templates/casemanagement/dialogs/confirm_anonymize.mako:14
 #: mpulsweb/templates/casemanagement/dialogs/confirm_markanonymize.mako:13
@@ -2689,32 +2694,32 @@
 msgid "Status"
 msgstr ""
 
-#: mpulsweb/templates/casemanagement/caselist.mako:147
+#: mpulsweb/templates/casemanagement/caselist.mako:148
 msgid "Legend"
 msgstr ""
 
-#: mpulsweb/templates/casemanagement/caselist.mako:190
 #: mpulsweb/templates/casemanagement/caselist.mako:191
+#: mpulsweb/templates/casemanagement/caselist.mako:192
 msgid "Mark delete"
 msgstr ""
 
-#: mpulsweb/templates/casemanagement/caselist.mako:197
 #: mpulsweb/templates/casemanagement/caselist.mako:198
+#: mpulsweb/templates/casemanagement/caselist.mako:199
 msgid "Mark anonym"
 msgstr ""
 
-#: mpulsweb/templates/casemanagement/caselist.mako:204
 #: mpulsweb/templates/casemanagement/caselist.mako:205
+#: mpulsweb/templates/casemanagement/caselist.mako:206
 msgid "Make anonymousym"
 msgstr ""
 
-#: mpulsweb/templates/casemanagement/caselist.mako:228
 #: mpulsweb/templates/casemanagement/caselist.mako:229
+#: mpulsweb/templates/casemanagement/caselist.mako:230
 msgid "Delete case"
 msgstr ""
 
-#: mpulsweb/templates/casemanagement/caselist.mako:250
 #: mpulsweb/templates/casemanagement/caselist.mako:251
+#: mpulsweb/templates/casemanagement/caselist.mako:252
 msgid "Restore case document"
 msgstr ""
 
@@ -2993,6 +2998,46 @@
 msgid "submit action"
 msgstr ""
 
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:5
+#: mpulsweb/templates/documents/case_overview.mako:19
+#: mpulsweb/templates/documents/global_overview.mako:6
+#: mpulsweb/templates/documents/global_overview.mako:10
+#: mpulsweb/templates/documents/global_rename.mako:5
+#: mpulsweb/templates/documents/global_upload.mako:5
+#: mpulsweb/templates/documents/dialogs/confirm.mako:4
+#: mpulsweb/templates/documents/dialogs/delete_document_success.mako:4
+#: mpulsweb/templates/documents/dialogs/failed_document.mako:4
+#: mpulsweb/templates/documents/dialogs/success_documents.mako:4
+msgid "Document overview"
+msgstr ""
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:10
+#: mpulsweb/templates/documents/global_rename.mako:11
+msgid "Rename document"
+msgstr ""
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:17
+#: mpulsweb/templates/documents/global_rename.mako:18
+#: mpulsweb/templates/documents/global_upload.mako:18
+msgid "Back to: user overview"
+msgstr ""
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:37
+#: mpulsweb/templates/documents/case_new.mako:63
+#: mpulsweb/templates/documents/case_overview.mako:36
+#: mpulsweb/templates/documents/global_overview.mako:27
+#: mpulsweb/templates/documents/global_rename.mako:38
+#: mpulsweb/templates/documents/global_upload.mako:51
+msgid "Filename"
+msgstr ""
+
+#: mpulsweb/templates/casemanagement/rename_attachment.mako:56
+#: mpulsweb/templates/documents/case_new.mako:110
+#: mpulsweb/templates/documents/global_rename.mako:57
+#: mpulsweb/templates/documents/global_upload.mako:96
+msgid "Submit"
+msgstr ""
+
 #: mpulsweb/templates/casemanagement/search.mako:9
 #: mpulsweb/templates/evaluation/search.mako:11
 #: mpulsweb/templates/evaluation/search.mako:14
@@ -3181,13 +3226,6 @@
 msgid "File"
 msgstr ""
 
-#: mpulsweb/templates/documents/case_new.mako:63
-#: mpulsweb/templates/documents/case_overview.mako:36
-#: mpulsweb/templates/documents/global_overview.mako:27
-#: mpulsweb/templates/documents/global_upload.mako:51
-msgid "Filename"
-msgstr ""
-
 #: mpulsweb/templates/documents/case_new.mako:82
 #: mpulsweb/templates/documents/global_upload.mako:70
 msgid ""
@@ -3213,42 +3251,28 @@
 "same name."
 msgstr ""
 
-#: mpulsweb/templates/documents/case_new.mako:110
-#: mpulsweb/templates/documents/global_upload.mako:96
-msgid "Submit"
-msgstr ""
-
-#: mpulsweb/templates/documents/case_overview.mako:19
-#: mpulsweb/templates/documents/global_overview.mako:6
-#: mpulsweb/templates/documents/global_overview.mako:10
-#: mpulsweb/templates/documents/global_upload.mako:5
-#: mpulsweb/templates/documents/dialogs/confirm.mako:4
-#: mpulsweb/templates/documents/dialogs/delete_document_success.mako:4
-#: mpulsweb/templates/documents/dialogs/failed_document.mako:4
-#: mpulsweb/templates/documents/dialogs/success_documents.mako:4
-msgid "Document overview"
-msgstr ""
-
 #: mpulsweb/templates/documents/case_overview.mako:39
 #: mpulsweb/templates/documents/global_overview.mako:30
 msgid "Filesize"
 msgstr ""
 
-#: mpulsweb/templates/documents/case_overview.mako:84
-#: mpulsweb/templates/documents/global_overview.mako:73
+#: mpulsweb/templates/documents/case_overview.mako:72
+#: mpulsweb/templates/documents/global_overview.mako:62
+msgid "Rename"
+msgstr ""
+
+#: mpulsweb/templates/documents/case_overview.mako:90
+#: mpulsweb/templates/documents/global_overview.mako:75
 msgid "No files found"
 msgstr ""
 
+#: mpulsweb/templates/documents/global_rename.mako:6
 #: mpulsweb/templates/documents/global_upload.mako:6
 #: mpulsweb/templates/documents/dialogs/failed_document.mako:5
 #: mpulsweb/templates/documents/dialogs/success_documents.mako:5
 msgid "Add document"
 msgstr ""
 
-#: mpulsweb/templates/documents/global_upload.mako:18
-msgid "Back to: user overview"
-msgstr ""
-
 #: mpulsweb/templates/documents/global_upload.mako:27
 msgid "The size of the documents isnt allowed to exceed 10MB."
 msgstr ""
@@ -4243,8 +4267,8 @@
 msgstr ""
 
 #: mpulsweb/templates/usersettings/change_password.mako:12
-#: mpulsweb/templates/usersettings/change_password.mako:34
-#: mpulsweb/templates/usersettings/change_password.mako:37
+#: mpulsweb/templates/usersettings/change_password.mako:35
+#: mpulsweb/templates/usersettings/change_password.mako:41
 msgid "Enter old password"
 msgstr ""
 
@@ -4259,7 +4283,7 @@
 "character at least. "
 msgstr ""
 
-#: mpulsweb/templates/usersettings/change_password.mako:61
+#: mpulsweb/templates/usersettings/change_password.mako:75
 #: mpulsweb/templates/usersettings/change_password_login.mako:37
 msgid "Save"
 msgstr ""

Modified: base/trunk/mpulsweb/lib/validators.py
===================================================================
--- base/trunk/mpulsweb/lib/validators.py	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/lib/validators.py	2011-12-01 14:26:49 UTC (rev 5684)
@@ -583,6 +583,15 @@
 
     description = String()
 
+class RenameDocumentForm(BaseFormValidator):
+
+    name = String(not_empty=True)
+
+class RenameDocumentWDescForm(RenameDocumentForm):
+
+    description = String()
+    
+
 class UploadCaseDocumentForm(BaseFormValidator):
 
     pre_validators = [formencode.variabledecode.NestedVariables()]

Modified: base/trunk/mpulsweb/model/document.py
===================================================================
--- base/trunk/mpulsweb/model/document.py	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/model/document.py	2011-12-01 14:26:49 UTC (rev 5684)
@@ -82,12 +82,24 @@
 WHERE id = %(id)s
 '''
 
+RENAME_GLOBAL_WITH_DESC = '''
+UPDATE ka_global_dokumente_tbl_view
+SET name = %(name)s, beschreibung = %(desc)s
+WHERE id = %(id)s
+'''
+
 UPDATE_GLOBAL = '''
 UPDATE ka_global_dokumente_tbl_view
 SET daten = %(bytes)s, groesse = %(size)s, name = %(name)s, mime = %(mime)s
 WHERE id = %(id)s
 '''
 
+RENAME_GLOBAL = '''
+UPDATE ka_global_dokumente_tbl_view
+SET name = %(name)s
+WHERE id = %(id)s
+'''
+
 LIST_GLOBAL = '''
 SELECT id, master_id, groesse, mime, name
 FROM ka_global_dokumente_tbl_view
@@ -118,6 +130,12 @@
 WHERE id = %(id)s
 '''
 
+RENAME_CASE_WITH_DESC = '''
+UPDATE ka_fall_dokumente_tbl_view
+SET name = %(name)s, beschreibung = %(desc)s
+WHERE id = %(id)s
+'''
+
 UPDATE_CASE = '''
 UPDATE ka_fall_dokumente_tbl_view
 SET daten = %(bytes)s, groesse = %(size)s, name = %(name)s, mime = %(mime)s
@@ -136,6 +154,12 @@
 WHERE id = %(id)s
 '''
 
+RENAME_CASE = '''
+UPDATE ka_fall_dokumente_tbl_view
+SET name = %(name)s 
+WHERE id = %(id)s
+'''
+
 class DocumentException(Exception):
 
     def __init__(self, value):
@@ -208,7 +232,22 @@
 
     return document_id
 
+def rename_document_with_cursor(cursor, id, name, desc, is_case_document):
+    if g.mpuls_config.is_enabled("module", "documents-description"):
+        fields = {'id': id, 'name': name, 'desc':desc}
+        if is_case_document:
+            statement = RENAME_CASE_WITH_DESC 
+        else:
+            statement = RENAME_GLOBAL_WITH_DESC
+    else:
+        fields  = {'id': id, 'name': name}
+        if is_case_document:
+            statement = RENAME_CASE
+        else:
+            statement = RENAME_GLOBAL
+    cursor.execute(statement, fields)
 
+
 def delete_document_with_cursor(cursor, id, is_case_document):
     if is_case_document:
         statement = DELETE_CASE
@@ -229,6 +268,11 @@
     finally:
         db.recycleConnection(con, cur)
 
+def renameDocument(id, name, desc, case=False):
+     with db.transaction() as cur:
+        rename_document_with_cursor(cur, int(id), 
+                                    unicode(name), unicode(desc),
+                                    case)
 
 def deleteDocument(id, case=False):
     with db.transaction() as cur:

Added: base/trunk/mpulsweb/templates/casemanagement/rename_attachment.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/rename_attachment.mako	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/templates/casemanagement/rename_attachment.mako	2011-12-01 14:26:49 UTC (rev 5684)
@@ -0,0 +1,61 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../main.mako" />
+<%def name="buildNavipath()">
+  ${parent.buildNavipath()}
+  <li><a href="${h.url_for(controller='casedocument', action='overview')}">${_('Document overview')}</a></li>
+</%def>
+
+<div id="content_header_small">
+  <div id="content_ueberschrift">
+    ${_('Rename document')}
+  </div>
+  <div id="modusfield">
+    <div class="actions">
+      <ul>
+	<li>
+          <a href="${h.url_for(controller='casedocument', action='overview')}">
+            ${_('Back to: user overview')}
+          </a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+
+<p class="import_p">
+${h.form(h.url_for(controller="casedocument", action='renameAction', id= c.id), 
+  multipart=True)}
+<div class="widget container">
+  <table class="form">
+    <colgroup>
+      <col width="20%">
+      <col width="60%">
+      <col width="20%">
+    </colgroup>
+    <tr>
+      <td class="label">
+        <label for="name">${_('Filename')}</label></td>
+      <td class="">
+        <input type="text" name="name" id="name"><br>
+      </td>
+      <td class=""><span class="error"><form:error name="name"></span></td>
+    </tr>
+    % if g.mpuls_config.is_enabled("module", "documents-description"):
+    <tr>
+	<td class="label">
+        <label for="description">${_('Description')}</label></td>
+      <td class="">
+        <input type="text" name="description" id="description" style="width: auto;"><br>
+      </td>
+      <td class=""><span class="error"><form:error name="description"></span></td>
+    </tr>
+    % endif
+    <tr>
+      <td class=""></td>
+      <td colspan="2">
+        ${h.submit('upload', _('Submit'))}
+      </td>
+    </tr>
+  </table>
+</div>
+${h.end_form()}

Modified: base/trunk/mpulsweb/templates/documents/case_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/case_overview.mako	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/templates/documents/case_overview.mako	2011-12-01 14:26:49 UTC (rev 5684)
@@ -66,6 +66,14 @@
              ><img src="${h.url_for('/images/icons/open_active_22.png')}" border="0" alt="${_('Show')}" 
                    title="${_('Show')}" title="${_('Show')}">
           </a>
+	  % if h.hasRole(['cm']):
+	  <a href="${h.url_for(controller='/casedocument', action='rename', id=f.id)}"
+             ><img src="${h.url_for('/images/icons/edit_22.png')}" border="0" 
+                   alt="${_('Rename')}" title="${_('Delete')}">
+          </a>
+
+	  
+	  % endif
           % if h.hasRole(['cm']) and session.get('case').getState().getState() == 1:
             <a href="${h.url_for(controller='/casedocument', action='delete', id=f.id, confirmed=0)}">
               <img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" 

Modified: base/trunk/mpulsweb/templates/documents/global_overview.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/global_overview.mako	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/templates/documents/global_overview.mako	2011-12-01 14:26:49 UTC (rev 5684)
@@ -57,6 +57,10 @@
                  title="${_('Show')}" title="${_('Show')}">
         </a>
         % if h.hasRole(['admin']):
+	  <a href="${h.url_for(controller='/document', action='globalRename', id=f.id)}"
+             ><img src="${h.url_for('/images/icons/edit_22.png')}" border="0" 
+                   alt="${_('Rename')}" title="${_('Rename')}">
+          </a>
           <a href="${h.url_for(controller='/document', action='globalDelete', id=f.id)}"
              ><img src="${h.url_for('/images/icons/delete_active_22.png')}" border="0" 
                    alt="${_('Delete')}" title="${_('Delete')}">

Added: base/trunk/mpulsweb/templates/documents/global_rename.mako
===================================================================
--- base/trunk/mpulsweb/templates/documents/global_rename.mako	2011-12-01 12:42:58 UTC (rev 5683)
+++ base/trunk/mpulsweb/templates/documents/global_rename.mako	2011-12-01 14:26:49 UTC (rev 5684)
@@ -0,0 +1,62 @@
+## -*- coding: utf-8 -*-
+<%inherit file="../main.mako" />
+<%def name="buildNavipath()">
+  ${parent.buildNavipath()}
+  <li><a href="${h.url_for(controller='/document', action='globalOverview')}">${_('Document overview')}</a></li>
+  <li><a href="${h.url_for(controller='/document', action='globalUpload')}">${_('Add document')}</a></li>
+</%def>
+
+<div id="content_header_small">
+  <div id="content_ueberschrift">
+    ${_('Rename document')}
+  </div>
+  <div id="modusfield">
+    <div class="actions">
+      <ul>
+	<li>
+          <a href="${h.url_for(controller='document', action='globalOverview')}">
+            ${_('Back to: user overview')}
+          </a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+
+<p class="import_p">
+${h.form(h.url_for(controller="document", action='globalRenameAction', id= c.id), 
+  multipart=True)}
+<div class="widget container">
+  <table class="form">
+    <colgroup>
+      <col width="20%">
+      <col width="60%">
+      <col width="20%">
+    </colgroup>
+    <tr>
+      <td class="label">
+        <label for="name">${_('Filename')}</label></td>
+      <td class="">
+        <input type="text" name="name" id="name"><br>
+      </td>
+      <td class=""><span class="error"><form:error name="name"></span></td>
+    </tr>
+    % if g.mpuls_config.is_enabled("module", "documents-description"):
+    <tr>
+	<td class="label">
+        <label for="description">${_('Description')}</label></td>
+      <td class="">
+        <input type="text" name="description" id="description" style="width: auto;"><br>
+      </td>
+      <td class=""><span class="error"><form:error name="description"></span></td>
+    </tr>
+    % endif
+    <tr>
+      <td class=""></td>
+      <td colspan="2">
+        ${h.submit('upload', _('Submit'))}
+      </td>
+    </tr>
+  </table>
+</div>
+${h.end_form()}



More information about the Mpuls-commits mailing list