src/cm/views/texts.py
changeset 493 32c402ed2f14
parent 486 c9a646707d86
child 504 b2e0186daa5b
equal deleted inserted replaced
492:5b5245f4fe9a 493:32c402ed2f14
   399         wrapped_text_version, _ , _ = spannify(html)
   399         wrapped_text_version, _ , _ = spannify(html)
   400         with_markers = True
   400         with_markers = True
   401         marked_content = insert_comment_markers(wrapped_text_version, comments, with_markers, with_color)
   401         marked_content = insert_comment_markers(wrapped_text_version, comments, with_markers, with_color)
   402         # Prepends title
   402         # Prepends title
   403         marked_content = "<h1>%s</h1>%s" %(text_version.title, marked_content)
   403         marked_content = "<h1>%s</h1>%s" %(text_version.title, marked_content)
   404         viewable_comments = comments_thread(request, text_version, text) 
   404         viewable_comments = [x for x in comments_thread(request, text_version, text) if x in comments]
   405         extended_comments = {}
   405         extended_comments = {}
   406         nb_children = {}
   406         nb_children = {}
   407         for cc in viewable_comments :
   407         for cc in viewable_comments :
   408             id = 0 #<-- all top comments are children of comment with id 0
   408             id = 0 #<-- all top comments are children of comment with id 0
   409             if cc.is_reply() :
   409             if cc.is_reply() :