[Mpuls-commits] r5493 - base/trunk/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 24 10:50:33 CEST 2011


Author: ludwig
Date: 2011-10-24 10:50:30 +0200 (Mon, 24 Oct 2011)
New Revision: 5493

Modified:
   base/trunk/mpulsweb/controllers/case.py
   base/trunk/mpulsweb/controllers/case_bundle.py
Log:
Issue 395: Renamed function buildCaseList into build_case_list.
The new name fit into the code.


Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py	2011-10-21 13:40:48 UTC (rev 5492)
+++ base/trunk/mpulsweb/controllers/case.py	2011-10-24 08:50:30 UTC (rev 5493)
@@ -31,7 +31,7 @@
 from mpulsweb.model.agencysettings import Agency
 
 from mpulsweb.controllers.formularpage import get_rendered_page
-from mpulsweb.controllers.case_bundle import buildCaseList
+from mpulsweb.controllers.case_bundle import build_case_list
 
 log = logging.getLogger(__name__)
 
@@ -121,7 +121,7 @@
                               " deletion?%s The case will not be editable"
                               " afterwards, and submited to the administration"
                               " for deletion.<br>") \
-                            % "\n".join(buildCaseList([case]))
+                            % "\n".join(build_case_list([case]))
 
             c.url_yes = h.url_for(controller='/case', action='markForDelete',
                                   id=id, confirmed=1)
@@ -143,7 +143,7 @@
                               " <b>not needed for evaluations</b> anymore."
                               "<br><br>Do you want to delete the case "
                               "from the server?%s<br>") \
-                            % "\n".join(buildCaseList([case]))
+                            % "\n".join(build_case_list([case]))
             c.url_yes = h.url_for(controller='/case', action='delete',
                                   id=id, confirmed=1)
             c.url_no = h.url_for(controller='/case_overview')
@@ -233,7 +233,7 @@
                                u" for final anonymisation.</p>"
                                u"<p><b>The case document is going to be"
                                u" anonymised in phase </b>%s<b>!</b><br>""") \
-                             % ("\n".join(buildCaseList([case])),
+                             % ("\n".join(build_case_list([case])),
                                  " ".join(phase_name)))
             c.url_yes = h.url_for(controller='/case', action='markForAnonymize',
                                   id=id, confirmed=1)
@@ -386,7 +386,7 @@
                               u" After it the case will not be available you."
                               u" The anonymised case will still be considered"
                               u" for the analysis.<br>") \
-                            % "\n".join(buildCaseList([case]))
+                            % "\n".join(build_case_list([case]))
             c.url_yes = h.url_for(controller='/case', action='anonymize',
                                   id=id, confirmed=1)
             c.url_no = h.url_for(controller='/case', action='digest', id=id)
@@ -501,7 +501,7 @@
             c.dialog_text = _("Do you really want to restore the case?%s"
                               " The case will be editable afterwards again"
                               " for the users.<br>") \
-                            % "\n".join(buildCaseList([case]))
+                            % "\n".join(build_case_list([case]))
             c.url_yes = h.url_for(controller='/case', action='restore', id=id,
                                   confirmed=1)
             c.url_no = h.url_for(controller='/case_overview')

Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py	2011-10-21 13:40:48 UTC (rev 5492)
+++ base/trunk/mpulsweb/controllers/case_bundle.py	2011-10-24 08:50:30 UTC (rev 5493)
@@ -231,7 +231,7 @@
 
     def _buildCaseList(self, case_bundle):
         case_list = case_bundle.getCases()
-        return buildCaseList(case_list)
+        return build_case_list(case_list)
 
     def _build_casebundle(self, options):
         if options.get('all_cases') > 0:
@@ -682,7 +682,7 @@
                                      **extra)
         return data(request.environ, self.start_response)
 
-def buildCaseList(cases):
+def build_case_list(cases):
     """From a list of cases this function builds a html list of overview fields 
 of the cases."""
     list = ["<ul>"]



More information about the Mpuls-commits mailing list