diff options
author | Byron Jones <glob@mozilla.com> | 2015-10-15 17:59:10 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-10-15 17:59:10 +0200 |
commit | 2e2981d25c185fde56f29c7aed4e3e6bba50039e (patch) | |
tree | 725b4a4b7de9d444ce2b84e9cedce3dc8d7f7896 /extensions/EditComments/template/en/default/hook/bug_modal | |
parent | 5265c09db899e148ceef6ba47aa199fa1e282e7b (diff) | |
download | bugzilla-2e2981d25c185fde56f29c7aed4e3e6bba50039e.tar.gz bugzilla-2e2981d25c185fde56f29c7aed4e3e6bba50039e.tar.xz |
Bug 1153101 - add hooks for edit-comments extension
Diffstat (limited to 'extensions/EditComments/template/en/default/hook/bug_modal')
2 files changed, 40 insertions, 0 deletions
diff --git a/extensions/EditComments/template/en/default/hook/bug_modal/activity_stream-comment_action.html.tmpl b/extensions/EditComments/template/en/default/hook/bug_modal/activity_stream-comment_action.html.tmpl new file mode 100644 index 000000000..358359243 --- /dev/null +++ b/extensions/EditComments/template/en/default/hook/bug_modal/activity_stream-comment_action.html.tmpl @@ -0,0 +1,26 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% + RETURN IF comment.body == ''; + RETURN UNLESS Param('edit_comments_group') && user.in_group(Param('edit_comments_group')); + RETURN UNLESS + comment.type == constants.CMT_NORMAL + || comment.type == constants.CMT_DUPE_OF + || comment.type == constants.CMT_ATTACHMENT_CREATED + || comment.type == constants.CMT_ATTACHMENT_UPDATED; +%] + +[% IF comment.edit_count %] + <a href="page.cgi?id=editcomments.html&bug_id=[% bug.id FILTER none %]&comment_id=[% comment.id FILTER none %]" + title="[% comment.edit_count FILTER none %] edit[% "s" UNLESS comment.edit_count == 1 %]">(Edited)</a> +[% END %] + +<button class="edit-comment-btn minor edit-show" type="button" style="display:none" + data-id="[% comment.id FILTER none %]" + data-no="[% comment.count FILTER none %]">Edit</button> diff --git a/extensions/EditComments/template/en/default/hook/bug_modal/header-end.html.tmpl b/extensions/EditComments/template/en/default/hook/bug_modal/header-end.html.tmpl new file mode 100644 index 000000000..68597bcb0 --- /dev/null +++ b/extensions/EditComments/template/en/default/hook/bug_modal/header-end.html.tmpl @@ -0,0 +1,14 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% + IF Param('edit_comments_group') && user.in_group(Param('edit_comments_group')); + style_urls.push('extensions/EditComments/web/styles/editcomments.css'); + javascript_urls.push('extensions/EditComments/web/js/editcomments.js'); + END; +%] |