]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 827983: "[reply]" link besides the original description will insert ("in reply...
authorHugo Seabrook <hugo.seabrook@gmail.com>
Sat, 16 Mar 2013 16:18:00 +0000 (17:18 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 16 Mar 2013 16:18:00 +0000 (17:18 +0100)
r/a=LpSolit

template/en/default/bug/comments.html.tmpl
template/en/default/filterexceptions.pl

index d2de3521c9367b34eced707099df1efe07886999..61d1c67e07e9827f61f5c42f65532823e91a945b 100644 (file)
     [% 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 %]
-
 <!-- 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 count >= start_at %]
+  [% IF comment.count >= start_at %]
     [% PROCESS a_comment %]
   [% END %]
-  
-  [% count = count + increment %]
 [% END %]
 
 [% IF mode == "edit" && user.id
   [% comment_text = comment.body_full %]
   [% RETURN IF comment_text == '' AND (comment.work_time - 0) != 0 AND !user.is_timetracker %]
 
-    <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 %]
+    <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 %]
         [% 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 %]
 
       <div class="[% class_name FILTER html %]">
             [% IF bug.check_can_change_field('longdesc', 0, 1) %]
               [<a class="bz_reply_link" href="#add_comment"
                 [% IF user.settings.quote_replies.value != 'off' %]
-                  onclick="replyToComment('[% count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]'); return false;"
+                  onclick="replyToComment('[% comment.count %]', '[% comment.id %]', '[% comment.author.name || comment.author.nick FILTER html FILTER js %]'); return false;"
                 [% END %]
               >reply</a>]
             [% END %]
             <script type="text/javascript"><!--
-              addCollapseLink([% count %], 'Toggle comment display'); // -->
+              addCollapseLink([% comment.count %], 'Toggle comment display'); // -->
             </script>
           </span>
         [% END %]
             <input type="checkbox"
                    name="isprivate_[% comment.id %]" value="1"
                    id="isprivate_[% comment.id %]"
-                   onClick="updateCommentPrivacy(this, [% count %])"
+                   onClick="updateCommentPrivacy(this, [% comment.count %])"
                    [% " checked=\"checked\"" IF comment.is_private %]>
             <label for="isprivate_[% comment.id %]">Private</label>
           </div>
 
         <span class="bz_comment_number">
           <a 
-             href="show_bug.cgi?id=[% bug.bug_id %]#c[% count %]">
+             href="show_bug.cgi?id=[% bug.bug_id %]#c[% comment.count %]">
             [%- comment_label FILTER html %]</a>
         </span>
 
   # generated HTML
   #%]
 <pre class="bz_comment_text" 
-     [% ' id="comment_text_' _ count _ '"' IF mode == "edit" %]>
+     [% ' id="comment_text_' _ comment.count _ '"' IF mode == "edit" %]>
   [%- comment_text FILTER quoteUrls(bug, comment) -%]
 </pre>
     </div>
index e12fcb18900f382cbb6761a29b4c58fa9a1ec5a9..36b9032ddaee71b2b381052404a5e076aaed7f3d 100644 (file)
 
 'bug/comments.html.tmpl' => [
   'comment.id',
+  'comment.count',
   'bug.bug_id',
 ],