From 617b0bbe5cee5e089af206d79169a2d99d43211f Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 18 Mar 2013 15:31:28 +0800 Subject: backout the fix for bug 827983 (see bug 852054) --- template/en/default/bug/comments.html.tmpl | 41 ++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'template/en/default/bug') diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 68a64561f..a876fb081 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -92,15 +92,36 @@ [% sort_order = "oldest_to_newest" %] [% END %] + +[%# Set up the variables as needed, depending on the sort order %] +[% IF sort_order == "oldest_to_newest" %] + [% count = 0 %] + [% description = 0 %] + [% increment = 1 %] +[% ELSE %] + [% increment = -1 %] + [% IF sort_order == "newest_to_oldest" %] + [% count = comments.size - 1 %] + [% description = 0 %] + [% ELSIF sort_order == "newest_to_oldest_desc_first" %] + [% count = comments.size %] + [% description = comments.size %] + [% END %] +[% END %] + +[% Hook.process("comment_banner") %] +
[% FOREACH comment = comments %] - [% IF comment.count >= start_at %] + [% IF count >= start_at %] [% PROCESS a_comment %] [% END %] + + [% count = count + increment %] [% END %] [%# Note: this template is used in multiple places; if you use this hook, @@ -130,15 +151,15 @@ [% comment_text = comment.body_full %] [% RETURN IF comment_text == '' AND (comment.work_time - 0) != 0 AND !user.is_timetracker %] -
- [% IF comment.count == 0 %] +
+ [% IF count == description %] [% class_name = "bz_first_comment_head" %] [% comment_label = "Description" %] [% ELSE %] [% class_name = "bz_comment_head" %] - [% comment_label = "Comment " _ comment.count %] + [% comment_label = "Comment " _ count %] [% END %]
@@ -157,7 +178,7 @@ >reply] [% END %] [% END %] @@ -169,7 +190,7 @@
@@ -177,7 +198,7 @@ + href="show_bug.cgi?id=[% bug.bug_id %]#c[% count %]"> [%- comment_label FILTER html %] @@ -217,7 +238,7 @@ # generated HTML #%]
+     [% ' id="comment_text_' _ count _ '"' IF mode == "edit" %]>
   [%- comment_text FILTER quoteUrls(bug, comment) -%]
 
-- cgit v1.2.3-24-g4f1b