summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorKohei Yoshino <kohei.yoshino@gmail.com>2018-01-09 18:33:35 +0100
committerDylan William Hardison <dylan@hardison.net>2018-01-09 18:33:35 +0100
commitb2a62ff40dac527676ac1ece441f17f7ce85170a (patch)
tree7219c693633abdebfcedde6e4f2c1a0d9a43ab71 /extensions
parent84780b25e91a4ad91549bc4a723e1f08916e8893 (diff)
downloadbugzilla-b2a62ff40dac527676ac1ece441f17f7ce85170a.tar.gz
bugzilla-b2a62ff40dac527676ac1ece441f17f7ce85170a.tar.xz
Bug 1429076 - Can we have a lock icon for requests in security-sensitive bugs in Requests Quick Look Dropdown?
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Review/web/js/badge.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/extensions/Review/web/js/badge.js b/extensions/Review/web/js/badge.js
index cff22dc40..d22ca4e57 100644
--- a/extensions/Review/web/js/badge.js
+++ b/extensions/Review/web/js/badge.js
@@ -82,14 +82,16 @@ Bugzilla.Review.Badge = class Badge {
? `attachment.cgi?id=${req.attach_id}&amp;action=edit` : `show_bug.cgi?id=${req.bug_id}`;
$li.setAttribute('role', 'none');
- $li.innerHTML = `<a href="${link}" role="menuitem" tabindex="-1" data-type="${req.type}">
- <img src="https://secure.gravatar.com/avatar/${md5(email)}?d=mm&amp;size=64" alt="">
- <label><strong>${pretty_name.htmlEncode()}</strong> asked for your
- ${(req.type === 'needinfo' ? 'info' : req.type)} ${(req.attach_id ? 'on' : '')}
- ${(req.attach_id && req.ispatch ? (req.dup_count > 1 ? `${req.dup_count} patches` : 'a patch') : '')}
- ${(req.attach_id && !req.ispatch ? (req.dup_count > 1 ? `${req.dup_count} files` : 'a file') : '')}
- in <strong>Bug ${req.bug_id} &ndash; ${req.bug_summary.htmlEncode()}</strong>.</label>
- <time datetime="${req.created}">${timeAgo(new Date(req.created))}</time></a>`;
+ $li.innerHTML = `<a href="${link}" role="menuitem" tabindex="-1" `
+ + `class="${(req.restricted ? 'secure' : '')}" data-type="${req.type}">`
+ + `<img src="https://secure.gravatar.com/avatar/${md5(email)}?d=mm&amp;size=64" alt="">`
+ + `<label><strong>${pretty_name.htmlEncode()}</strong> asked for your `
+ + (req.type === 'needinfo' ? 'info' : req.type) + (req.attach_id ? ' on ' : '')
+ + (req.attach_id && req.ispatch ? (req.dup_count > 1 ? `${req.dup_count} patches` : 'a patch') : '')
+ + (req.attach_id && !req.ispatch ? (req.dup_count > 1 ? `${req.dup_count} files` : 'a file') : '')
+ + ' in ' + (req.restricted ? '<span class="icon" aria-label="secure"></span>&nbsp;' : '')
+ + `<strong>Bug ${req.bug_id} &ndash; ${req.bug_summary.htmlEncode()}</strong>.</label>`
+ + `<time datetime="${req.created}">${timeAgo(new Date(req.created))}</time></a>`;
$fragment.appendChild($li);
});