[Mpuls-commits] r3834 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 30 18:12:16 CEST 2010


Author: bh
Date: 2010-09-30 18:12:15 +0200 (Thu, 30 Sep 2010)
New Revision: 3834

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py: Fix formatting


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-09-30 13:15:44 UTC (rev 3833)
+++ base/trunk/ChangeLog	2010-09-30 16:12:15 UTC (rev 3834)
@@ -1,3 +1,7 @@
+2010-09-30  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/lib/renderer.py: Fix formatting
+
 2010-09-30 Roland Geider <roland.geider at intevation.de>
 
 	* mpulsweb/model/logbook.py,

Modified: base/trunk/mpulsweb/lib/renderer.py
===================================================================
--- base/trunk/mpulsweb/lib/renderer.py	2010-09-30 13:15:44 UTC (rev 3833)
+++ base/trunk/mpulsweb/lib/renderer.py	2010-09-30 16:12:15 UTC (rev 3834)
@@ -76,7 +76,8 @@
     '''Returns which place in sequence of the children the given child is'''
     parent = child.parent
     for num, c in enumerate(parent.children):
-        if c.getIdentifier() == child.getIdentifier(): return num+1
+        if c.getIdentifier() == child.getIdentifier():
+            return num + 1
     return 0
 
 
@@ -383,9 +384,8 @@
         description = meta.getDescription()
         out = []
         out.append('<fieldset>')
-        out.append('<legend>%s %s</legend>' 
-                   % (escape(description),
-                      self._renderAttributes(node)))
+        out.append('<legend>%s %s</legend>'
+                   % (escape(description), self._renderAttributes(node)))
         out.append('<table class="repeatgroup">')
         if True:
             out.extend(self._renderRepeatList(node))
@@ -964,9 +964,9 @@
             def __init__(self, rg, it, case_id, sort_field, fields):
                 self.rg = rg
                 self.value = unicode(it.getItem('%s:%s:%s'
-                                            % (sort_field,
-                                               rg.getInternalIdentifier(),
-                                               case_id)).getValue())
+                                                % (sort_field,
+                                                   rg.getInternalIdentifier(),
+                                                   case_id)).getValue())
                 self.fields = fields
 
         unsorted_items = []
@@ -1011,7 +1011,7 @@
                 out.append("</a>")
             out.append('</td>')
             out.append('</tr>')
-            
+
         out.append('<tr>')
         out.append('<td style="text-align:right;">')
         if not self.ro_mode:
@@ -1020,13 +1020,12 @@
         out.append('<td class="actions">')
         if not self.ro_mode:
             out.append(tag("a",
-                        #class_="button",
-                        href=url_for(controller="/repeatgroup",
-                                        action="new",
+                           href=url_for(controller="/repeatgroup", action="new",
                                         id=self.page.getIdentifier())))
-            
+
             out.append(tag("img", src=icon("new_22.png"),
-                            border="0", alt=_('Add new RG'), title=_('Add new RG')))
+                           border="0", alt=_('Add new RG'),
+                           title=_('Add new RG')))
             out.append("</a>")
         out.append('</td>')
         out.append('</tr>')



More information about the Mpuls-commits mailing list