summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-07-05 23:30:10 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-07-05 23:30:10 +0200
commitfc4ac8af35b5bfacb6b3ff996cea64f3ef2956df (patch)
treec7432de7fccb6bfc2272e1956bc16ca9c3dfdf8a
parent08931ab607d0e1803c4756e371cbf715520650c8 (diff)
downloadbugzilla-fc4ac8af35b5bfacb6b3ff996cea64f3ef2956df.tar.gz
bugzilla-fc4ac8af35b5bfacb6b3ff996cea64f3ef2956df.tar.xz
Bug 775429 - Add attachment comment to splinter review
-rw-r--r--extensions/Splinter/template/en/default/pages/splinter.html.tmpl7
-rw-r--r--extensions/Splinter/web/splinter.js1
2 files changed, 8 insertions, 0 deletions
diff --git a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl
index a6dc9114a..16d312759 100644
--- a/extensions/Splinter/template/en/default/pages/splinter.html.tmpl
+++ b/extensions/Splinter/template/en/default/pages/splinter.html.tmpl
@@ -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 %]');
@@ -146,6 +149,10 @@
[% 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>
diff --git a/extensions/Splinter/web/splinter.js b/extensions/Splinter/web/splinter.js
index ee47aa160..d249ef17a 100644
--- a/extensions/Splinter/web/splinter.js
+++ b/extensions/Splinter/web/splinter.js
@@ -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');