# HG changeset patch # User Sylvain Thénault <sylvain.thenault@logilab.fr> # Date 1295281413 -3600 # Mon Jan 17 17:23:33 2011 +0100 # Branch stable # Node ID 46cc97b563324a908ba029661355663738e900b3 # Parent 95dedf5cb317dd1c5b00919a4ed66add07b7cf01 actually make comment section 3.10 compatible: this div is now handled by the layout, no need for match_kwargs, no more 'Component' added to domid diff --git a/data/cubes.comment.js b/data/cubes.comment.js --- a/data/cubes.comment.js +++ b/data/cubes.comment.js @@ -21,7 +21,7 @@ var ul = null; if (!commentNode.length) { // we are adding a comment to the top level entity - commentNode = $('#commentsectionComponent'); + commentNode = $('#commentsection' + eid); klass = 'comment'; } else { klass = 'section'; diff --git a/views.py b/views.py --- a/views.py +++ b/views.py @@ -278,7 +278,7 @@ related to an object """ __regid__ = 'commentsection' - __select__ = ((component.EntityCtxComponent.__select__ | match_kwargs('entity')) + __select__ = (component.EntityCtxComponent.__select__ & relation_possible('comments', 'object', 'Comment')) context = 'navcontentbottom' @@ -299,15 +299,12 @@ rset = None if not (rset or addcomment): return - w(u'<div id="%s" class="%s" cubicweb:rooteid="%s">' % ( - self.domid, self.cssclass, entity.eid)) if rset.rowcount: w(u'<h4>%s</h4>' % (req._('Comment_plural'))) w(u'<ul class="comment">') for i in xrange(rset.rowcount): self.view('tree', rset, row=i, w=w) w(u'</ul>') - w(u'</div>') if addcomment is not None: w(u'<div id="comment%sHolder"></div>' % entity.eid) params = self.cw_extra_kwargs.copy()