Fix display of annotation for non-first-level etypes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 11 Jan 2017 22:09:24 +0100
changeset 2292 7c3ee1f5bdaf
parent 2291 82a17de65358
child 2293 71684d75fcd8
Fix display of annotation for non-first-level etypes else extra \n get inserted.
views/viewlib.py
--- a/views/viewlib.py	Wed Jan 11 12:06:48 2017 +0100
+++ b/views/viewlib.py	Wed Jan 11 22:09:24 2017 +0100
@@ -36,9 +36,9 @@
             description = entity.printable_value('user_annotation')
             if entity.cw_etype in FIRST_LEVEL_ETYPES:
                 # skip first line, already displayed since it's used as title for the entity
-                description = description.splitlines()[1:]
+                description = '\n'.join(description.splitlines()[1:])
             if description:
-                self.w(u' <span class="description text-muted">%s</span>' % '\n'.join(description))
+                self.w(u' <span class="description text-muted">%s</span>' % description)
 
 
 class TextEntityAttributeView(EntityView):