From 9c1ee9e4c120ef412d7b7d97b5caba7ecf3ab4fd Mon Sep 17 00:00:00 2001 From: Hugo Seabrook Date: Sat, 16 Mar 2013 17:18:00 +0100 Subject: Bug 827983: "[reply]" link besides the original description will insert ("in reply to comment #N+1") when the comments order is "Newest to Oldest, but keep Descritption at the top" r/a=LpSolit --- template/en/default/bug/comments.html.tmpl | 41 ++++++++---------------------- 1 file changed, 11 insertions(+), 30 deletions(-) (limited to 'template/en/default/bug/comments.html.tmpl') diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index d2de3521c..61d1c67e0 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -55,34 +55,15 @@ [% 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 %] -
[% FOREACH comment = comments %] - [% IF count >= start_at %] + [% IF comment.count >= start_at %] [% PROCESS a_comment %] [% END %] - - [% count = count + increment %] [% END %] [% IF mode == "edit" && user.id @@ -126,15 +107,15 @@ [% comment_text = comment.body_full %] [% RETURN IF comment_text == '' AND (comment.work_time - 0) != 0 AND !user.is_timetracker %] -
- [% IF count == description %] +
+ [% IF comment.count == 0 %] [% class_name = "bz_first_comment_head" %] [% comment_label = "Description" %] [% ELSE %] [% class_name = "bz_comment_head" %] - [% comment_label = "Comment " _ count %] + [% comment_label = "Comment " _ comment.count %] [% END %]
@@ -144,12 +125,12 @@ [% IF bug.check_can_change_field('longdesc', 0, 1) %] [reply] [% END %] [% END %] @@ -161,7 +142,7 @@
@@ -169,7 +150,7 @@ + href="show_bug.cgi?id=[% bug.bug_id %]#c[% comment.count %]"> [%- comment_label FILTER html %] @@ -208,7 +189,7 @@ # generated HTML #%]
+     [% ' id="comment_text_' _ comment.count _ '"' IF mode == "edit" %]>
   [%- comment_text FILTER quoteUrls(bug, comment) -%]
 
-- cgit v1.2.3-24-g4f1b