[Mpuls-commits] r2216 - in wasko/branches/2.0: . mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Mar 25 20:29:05 CET 2010
Author: bh
Date: 2010-03-25 20:29:03 +0100 (Thu, 25 Mar 2010)
New Revision: 2216
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/mpulsweb/controllers/casedocument.py
Log:
* mpulsweb/controllers/casedocument.py: Fix formatting.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-03-25 19:26:27 UTC (rev 2215)
+++ wasko/branches/2.0/ChangeLog 2010-03-25 19:29:03 UTC (rev 2216)
@@ -1,5 +1,9 @@
2010-03-25 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/controllers/casedocument.py: Fix formatting.
+
+2010-03-25 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/controllers/caseappointment.py: Fix formatting.
2010-03-25 Bernhard Herzog <bh at intevation.de>
Modified: wasko/branches/2.0/mpulsweb/controllers/casedocument.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/casedocument.py 2010-03-25 19:26:27 UTC (rev 2215)
+++ wasko/branches/2.0/mpulsweb/controllers/casedocument.py 2010-03-25 19:29:03 UTC (rev 2216)
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+
import logging
import formencode
@@ -8,14 +9,16 @@
from pylons.controllers.util import redirect_to
from mpulsweb.lib.base import BaseController, render
-from mpulsweb.lib.validators import UploadCaseDocumentForm
+from mpulsweb.lib.validators import UploadCaseDocumentForm
from mpulsweb.lib.security import checkRole
import mpulsweb.lib.helpers as h
from mpulsweb.model.document import Document, deleteDocument
+
log = logging.getLogger(__name__)
+
SET_ATTACHMENT_SUCCESS_HEADER = u"""Anlage hinzugefügt!"""
SET_ATTACHMENT_SUCCESS_TEXT = u"""\
Bitte klicken Sie auf "OK", um fortzufahren."""
@@ -33,6 +36,7 @@
Wollen Sie die Anlage wirklich löschen und die Daten unwiederbringlich
verlieren?"""
+
class CasedocumentController(BaseController):
@checkRole(('admin_ka', 'cm_ka'))
@@ -64,8 +68,8 @@
doc.create(filename, content, case)
c.dialog_title = SET_ATTACHMENT_SUCCESS_HEADER
c.dialog_text = SET_ATTACHMENT_SUCCESS_TEXT
- c.url_ok = h.url_for(controller="/casedocument",
- action="index", id=case)
+ c.url_ok = h.url_for(controller="/casedocument", action="index",
+ id=case)
return render('/documents/dialogs/success_attachment.mako')
except formencode.Invalid, error:
c.form_result = error.value
@@ -105,7 +109,8 @@
id=session['case'].id)
c.success_for = SET_ATTACHMENT_SUCCESS_DELETE_HEADER
c.success_text = SET_ATTACHMENT_SUCCESS_DELETE_TEXT
- return render('/casemanagement/dialogs/success_delete_attachment.mako',
+ return render('/casemanagement/dialogs/'
+ 'success_delete_attachment.mako',
id=session['case'].id)
else:
c.context = "../main.mako"
@@ -114,4 +119,5 @@
c.url_yes = "/casedocument/delete/%d/1" % (id)
c.url_no = h.url_for(controller="/casedocument", action="index",
id=session['case'].id)
- return render('/casemanagement/dialogs/confirm_delete_attachment.mako')
+ return render('/casemanagement/dialogs/'
+ 'confirm_delete_attachment.mako')
More information about the Mpuls-commits
mailing list