summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en/default
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-04-01 05:09:11 +0200
committerByron Jones <glob@mozilla.com>2015-04-01 05:09:11 +0200
commitae43a6a2e60c07a474debe60c4a1f08753d42b35 (patch)
tree7bd2eef9ec1f78f09451c6fc3cbe2672c220cdcb /extensions/BugModal/template/en/default
parentb527e84a026f0211391f93b487b33009f7cb0bce (diff)
downloadbugzilla-ae43a6a2e60c07a474debe60c4a1f08753d42b35.tar.gz
bugzilla-ae43a6a2e60c07a474debe60c4a1f08753d42b35.tar.xz
Bug 1146777: use lightbox for images
Diffstat (limited to 'extensions/BugModal/template/en/default')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl9
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl13
2 files changed, 19 insertions, 3 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
index 08849ef17..2e7b3c87b 100644
--- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
@@ -164,7 +164,14 @@
[% BLOCK comment_body %]
<pre class="comment-text [%= "bz_private" IF comment.is_private %]" id="ct-[% comment.count FILTER none %]"
[% IF comment.collapsed +%] style="display:none"[% END ~%]
- >[% comment.body_full FILTER quoteUrls(bug, comment) %]</pre>
+ >[% FILTER collapse %]
+ [% IF comment.is_about_attachment && comment.attachment.is_image ~%]
+ <a href="attachment.cgi?id=[% comment.attachment.id FILTER none %]"
+ title="[% comment.attachment.description FILTER html %]"
+ class="lightbox"><img src="extensions/BugModal/web/image.png" width="16" height="16"></a>
+ [% END %]
+ [% END %]
+ [%~ comment.body_full FILTER quoteUrls(bug, comment) ~%]</pre>
[% END %]
[%
diff --git a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
index 3055cc861..f9209d3bf 100644
--- a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
@@ -20,8 +20,17 @@
" [% IF attachment.isobsolete %]style="display:none"[% END %]>
<td class="attach-desc-td">
<div class="attach-desc">
- <a href="attachment.cgi?id=[% attachment.id FILTER none %]">
- [%~ attachment.description FILTER html %]</a>
+ [% IF attachment.is_image %]
+ <a href="attachment.cgi?id=[% attachment.id FILTER none %]"
+ title="[% attachment.description FILTER html %]"
+ class="lightbox">
+ <img src="extensions/BugModal/web/image.png" width="16" height="16">
+ [%~ attachment.description FILTER html %]
+ </a>
+ [% ELSE %]
+ <a href="attachment.cgi?id=[% attachment.id FILTER none %]">
+ [%~ attachment.description FILTER html %]</a>
+ [% END %]
</div>
<div>
<span class="attach-time">[% INCLUDE bug_modal/rel_time.html.tmpl ts=attachment.attached %]</span>