changeset 5154:f9a581561184

comments: inline pointless inline template function It was badly named and required an explanation, it wasn't a function, it was short, and it didn't really add much abstraction.
author Mads Kiilerich <madski@unity3d.com>
date Sun, 17 May 2015 21:47:33 +0200
parents abad971d21d1
children d8993baa00dc
files kallithea/templates/changeset/changeset_file_comment.html
diffstat 1 files changed, 16 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/changeset/changeset_file_comment.html	Sun May 17 21:41:40 2015 +0200
+++ b/kallithea/templates/changeset/changeset_file_comment.html	Sun May 17 21:47:33 2015 +0200
@@ -107,36 +107,30 @@
     <span class="firstlink"></span>
 </%def>
 
-## generates inlines taken from c.comments var
-<%def name="inlines()">
-    <div class="comments-number">
-        ${comment_count(c.inline_cnt, len(c.comments))}
-    </div>
-    %for path, lines in c.inline_comments:
-        % for line,comments in lines.iteritems():
-            <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${h.safeid(h.safe_unicode(path))}">
-            %for co in comments:
-                ${comment_block(co)}
-            %endfor
-            </div>
-        %endfor
-    %endfor
-
-</%def>
 
 ## generate inline comments and the main ones
 <%def name="generate_comments()">
 <div class="comments">
-    <div id="inline-comments-container">
-    ## generate inlines for this changeset
-     ${inlines()}
-    </div>
+  <div class="comments-number">
+    ${comment_count(c.inline_cnt, len(c.comments))}
+  </div>
+  <div id="inline-comments-container">
+    %for path, lines in c.inline_comments:
+        %for line, comments in lines.iteritems():
+          <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${h.safeid(h.safe_unicode(path))}">
+            %for co in comments:
+                ${comment_block(co)}
+            %endfor
+          </div>
+        %endfor
+    %endfor
+  </div>
 
-    %for co in c.comments:
+  %for co in c.comments:
         <div id="comment-tr-${co.comment_id}">
           ${comment_block(co)}
         </div>
-    %endfor
+  %endfor
 </div>
 </%def>