[CMF-checkins] CVS: CMF/DCWorkflow - Guard.py:1.4

Ken Manheimer klm@zope.com
Thu, 11 Oct 2001 13:02:46 -0400


Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv24329

Modified Files:
	Guard.py 
Log Message:
Make it a bit easier to read the distinct guard conditions
(permission, expression, etc).


=== CMF/DCWorkflow/Guard.py 1.3 => 1.4 ===
         if self.roles:
             if res:
-                res.append(', role:')
-            else:
-                res.append('Requires role:')
+                res.append('<br/>')
+            res.append('Requires role:')
             for idx in range(len(self.roles)):
                 r = self.roles[idx]
                 if idx > 0:
@@ -171,9 +170,8 @@
                 res.append('<code>' + escape(r) + '</code>')
         if self.expr is not None:
             if res:
-                res.append(', expr:')
-            else:
-                res.append('Requires expr:')
+                res.append('<br/>')
+            res.append('Requires expr:')
             res.append('<code>' + escape(self.expr.text) + '</code>')
         return join(res, ' ')