[Mpuls-commits] r835 - in wasko/branches/2.0: . waskaweb/model waskaweb/templates/casemanagement

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jan 25 16:33:34 CET 2010


Author: bh
Date: 2010-01-25 16:33:33 +0100 (Mon, 25 Jan 2010)
New Revision: 835

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/model/case.py
   wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako
Log:
* waskaweb/templates/casemanagement/digest_body.mako,
waskaweb/model/case.py (CaseDigest._loadFromDB): Apply the F.NA
and nl_to_br in the template, not in _loadFromDB.  Also,
html-escape the value properly.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-25 15:31:14 UTC (rev 834)
+++ wasko/branches/2.0/ChangeLog	2010-01-25 15:33:33 UTC (rev 835)
@@ -1,5 +1,12 @@
 2010-01-25  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/templates/casemanagement/digest_body.mako,
+	waskaweb/model/case.py (CaseDigest._loadFromDB): Apply the F.NA
+	and nl_to_br in the template, not in _loadFromDB.  Also,
+	html-escape the value properly.
+
+2010-01-25  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/lib/filters.py (nl_to_br): New.  filter to convert
 	newlines to HTML <br> tags
 

Modified: wasko/branches/2.0/waskaweb/model/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/case.py	2010-01-25 15:31:14 UTC (rev 834)
+++ wasko/branches/2.0/waskaweb/model/case.py	2010-01-25 15:33:33 UTC (rev 835)
@@ -845,7 +845,7 @@
         self.telephone_3       = ""
         self.telephone_4       = ""
 
-        self.telephone_more    = F.NA(unicode(str(result.get('addresse_weiteretelefonnummern', '')), 'utf-8')).replace('\n', '<br>')
+        self.telephone_more    = unicode(str(result.get('addresse_weiteretelefonnummern', '')), 'utf-8')
 
         self.email             = unicode(str(result.get('addresse_email', '')), 'utf-8')
         td                     = date.today() - result .get('geburtsdatum', date.today())

Modified: wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako
===================================================================
--- wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako	2010-01-25 15:31:14 UTC (rev 834)
+++ wasko/branches/2.0/waskaweb/templates/casemanagement/digest_body.mako	2010-01-25 15:33:33 UTC (rev 835)
@@ -100,7 +100,7 @@
               </tr>
               <tr>
                       <td class="label hl">${_('cm_digest_tbl_label_telephone_more')}</td>
-                      <td class="hl">${c.digest.telephone_more | }</td>
+                      <td class="hl">${c.digest.telephone_more | F.NA, h, F.nl_to_br}</td>
               </tr>
       </table>
     </td>



More information about the Mpuls-commits mailing list