[Mpuls-commits] r2810 - in base/trunk: . mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 28 21:01:34 CEST 2010


Author: bh
Date: 2010-05-28 21:01:33 +0200 (Fri, 28 May 2010)
New Revision: 2810

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/phase.py
Log:
* mpulsweb/model/phase.py (Field.get_link): Use h.url_for
consistently for all-intra application URLs.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-28 18:48:40 UTC (rev 2809)
+++ base/trunk/ChangeLog	2010-05-28 19:01:33 UTC (rev 2810)
@@ -1,5 +1,10 @@
 2010-05-28  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/model/phase.py (Field.get_link): Use h.url_for
+	consistently for all-intra application URLs.
+
+2010-05-28  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/model/phase.py (Field.get_link): Use the tag function
 	to generate tags with attributes.
 

Modified: base/trunk/mpulsweb/model/phase.py
===================================================================
--- base/trunk/mpulsweb/model/phase.py	2010-05-28 18:48:40 UTC (rev 2809)
+++ base/trunk/mpulsweb/model/phase.py	2010-05-28 19:01:33 UTC (rev 2810)
@@ -10,7 +10,7 @@
 from formed.instance.backends.common import RuleEvalContext
 from formed.instance.tree import InstanceLeaf, PageInstanceNode, RepeatInstanceContainerNode 
 
-from mpulsweb.lib.helpers import tag
+from mpulsweb.lib.helpers import tag, url_for
 from mpulsweb.lib.db import PostgresDBInterface
 
 
@@ -365,9 +365,10 @@
         style = self.is_ok() and "ok" or "error"
         element_id = ":".join(self.id.split(':')[1:])
         out.append(tag("a", class_=style,
-                       href=("/formularpage/select/%s:%s#%s:%s"
-                             % (self.page, element_id, self.name,
-                                element_id))))
+                       href=url_for(controller='/formularpage', action='select',
+                                    id=('%s:%s' % (self.page, element_id)),
+                                    anchor=('%s:%s' % (self.name,
+                                                       element_id)))))
         out.append('%s' % self.label)
         out.append('</a>')
         return "".join(out)



More information about the Mpuls-commits mailing list