From 4f6724b0f86ccffa091ca33c04e237b9dd5d4c4a Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 23 Oct 2013 15:25:27 +0800 Subject: Bug 895687: add UserStory extension --- .../hook/bug/comments-comment_banner.html.tmpl | 51 ++++++++++++++++++++++ .../default/hook/bug/edit-custom_field.html.tmpl | 9 ++++ .../en/default/hook/bug/show-header-end.html.tmpl | 9 ++++ 3 files changed, 69 insertions(+) create mode 100644 extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl create mode 100644 extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl create mode 100644 extensions/UserStory/template/en/default/hook/bug/show-header-end.html.tmpl (limited to 'extensions/UserStory/template/en') diff --git a/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl new file mode 100644 index 000000000..f58c2fb8b --- /dev/null +++ b/extensions/UserStory/template/en/default/hook/bug/comments-comment_banner.html.tmpl @@ -0,0 +1,51 @@ +[%# 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 UNLESS bug.product_obj.user_story_group %] +[% can_edit_story = bug.check_can_change_field('cf_user_story', 0, 1) %] + +
+
+ User Story + [% IF can_edit_story %] + + (edit) + + [% END %] +
+ + [% IF bug.cf_user_story != "" %] +
+
+        [%- bug.cf_user_story FILTER quoteUrls(bug) -%]
+      
+
+ [% ELSE %] +
+ [% END %] + + [% IF can_edit_story %] +
+ [% INCLUDE global/textarea.html.tmpl + name = 'cf_user_story' + id = 'user_story' + minrows = 10 + maxrows = 10 + cols = constants.COMMENT_COLS + defaultcontent = bug.cf_user_story %] +
+ + [% END %] +
diff --git a/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl new file mode 100644 index 000000000..2f0f758a4 --- /dev/null +++ b/extensions/UserStory/template/en/default/hook/bug/edit-custom_field.html.tmpl @@ -0,0 +1,9 @@ +[%# 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. + #%] + +[% field.hidden = field.name == 'cf_user_story' %] diff --git a/extensions/UserStory/template/en/default/hook/bug/show-header-end.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/show-header-end.html.tmpl new file mode 100644 index 000000000..abdbe865e --- /dev/null +++ b/extensions/UserStory/template/en/default/hook/bug/show-header-end.html.tmpl @@ -0,0 +1,9 @@ +[%# 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. + #%] + +[% style_urls.push("extensions/UserStory/web/style/user_story.css") %] -- cgit v1.2.3-24-g4f1b