]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 775429 - Add attachment comment to splinter review
authorDavid Lawrence <dkl@mozilla.com>
Tue, 5 Jul 2016 21:30:10 +0000 (21:30 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Tue, 5 Jul 2016 21:30:10 +0000 (21:30 +0000)
extensions/Splinter/template/en/default/pages/splinter.html.tmpl
extensions/Splinter/web/splinter.js

index a6dc9114ab8d4c771f960c3ab62927161e24d8d2..16d31275962613458810d34b1178fd7ef7cba7eb 100644 (file)
@@ -73,6 +73,9 @@
 
     [% FOREACH comment = bug.comments %]
       [% NEXT IF comment.is_private && !user.is_insider %]
+      [% IF comment.type == constants.CMT_ATTACHMENT_CREATED && comment.extra_data == attach_id %]
+        Splinter.attachmentComment = '[% comment.body FILTER html FILTER js %]';
+      [% END %]
       [% NEXT UNLESS comment.thetext.match('(?i)^\s*review\s+of\s+attachment\s+\d+\s*:') %]
       var comment = new Splinter.Bug.Comment();
       comment.whoName = Splinter.Utils.strip('[% comment.author.name FILTER js %]');
   [% END %]
   <a href="[% urlbase FILTER none %]attachment.cgi?id=[% attach_id FILTER uri %]&amp;action=edit"
      target="_blank">[details]</a>
+  <p>
+    <b>Comment:</b><br>
+    <span id="attachComment"></span>
+  </p>
 </div>
 
 <div id="error" style="display: none;"> </div>
index ee47aa1606e13be90366b419a371fee48319a3d3..d249ef17ac46a40b2de92142e19c66d8c7a099db 100644 (file)
@@ -2690,6 +2690,7 @@ Splinter.init = function () {
         Splinter.replaceText(Dom.get("attachDesc"), Splinter.theAttachment.description);
         Splinter.replaceText(Dom.get("attachCreator"), Splinter.Bug._formatWho(Splinter.theAttachment.whoName, Splinter.theAttachment.whoEmail));
         Splinter.replaceText(Dom.get("attachDate"), Splinter.Utils.formatDate(Splinter.theAttachment.date));
+        Splinter.replaceText(Dom.get("attachComment"), Splinter.attachmentComment);
         var warnings = [];
         if (Splinter.theAttachment.isObsolete)
             warnings.push('OBSOLETE');