summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-03-18 08:31:28 +0100
committerByron Jones <bjones@mozilla.com>2013-03-18 08:31:28 +0100
commit617b0bbe5cee5e089af206d79169a2d99d43211f (patch)
tree7f81c3984a5bafa8ac67ca8000c22d15972b585b
parent46aa9a664f174d73f9decfd826cb9b279b778849 (diff)
downloadbugzilla-617b0bbe5cee5e089af206d79169a2d99d43211f.tar.gz
bugzilla-617b0bbe5cee5e089af206d79169a2d99d43211f.tar.xz
backout the fix for bug 827983 (see bug 852054)
-rw-r--r--template/en/default/bug/comments.html.tmpl41
-rw-r--r--template/en/default/filterexceptions.pl1
2 files changed, 31 insertions, 11 deletions
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") %]
+
<!-- This auto-sizes the comments and positions the collapse/expand links
to the right. -->
<table class="bz_comment_table" cellpadding="0" cellspacing="0"><tr>
<td>
[% 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 %]
- <div id="c[% comment.count %]" class="bz_comment[% " bz_private" IF comment.is_private %]
- [% " bz_comment_hilite" IF marks.${comment.count} %]
- [% " bz_first_comment" IF comment.count == 0 %]">
- [% IF comment.count == 0 %]
+ <div id="c[% count %]" class="bz_comment[% " bz_private" IF comment.is_private %]
+ [% " bz_comment_hilite" IF marks.$count %]
+ [% " bz_first_comment" IF count == description %]">
+ [% 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 %]
<div class="[% class_name FILTER html %]">
@@ -157,7 +178,7 @@
>reply</a>]
[% END %]
<script type="text/javascript"><!--
- addCollapseLink([% comment.count %], 'Toggle comment display'); // -->
+ addCollapseLink([% count %], 'Toggle comment display'); // -->
</script>
</span>
[% END %]
@@ -169,7 +190,7 @@
<input type="checkbox"
name="isprivate_[% comment.id %]" value="1"
id="isprivate_[% comment.id %]"
- onClick="updateCommentPrivacy(this, [% comment.count %])"
+ onClick="updateCommentPrivacy(this, [% count %])"
[% " checked=\"checked\"" IF comment.is_private %]>
<label for="isprivate_[% comment.id %]">Private</label>
</div>
@@ -177,7 +198,7 @@
<span class="bz_comment_number">
<a
- href="show_bug.cgi?id=[% bug.bug_id %]#c[% comment.count %]">
+ href="show_bug.cgi?id=[% bug.bug_id %]#c[% count %]">
[%- comment_label FILTER html %]</a>
</span>
@@ -217,7 +238,7 @@
# generated HTML
#%]
<pre class="bz_comment_text"
- [% ' id="comment_text_' _ comment.count _ '"' IF mode == "edit" %]>
+ [% ' id="comment_text_' _ count _ '"' IF mode == "edit" %]>
[%- comment_text FILTER quoteUrls(bug, comment) -%]
</pre>
</div>
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index cc3cd2441..08757cfe7 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -218,7 +218,6 @@
'bug/comments.html.tmpl' => [
'comment.id',
- 'comment.count',
'bug.bug_id',
],