From 09f53409bf172a3d6452d992e3afce7cd7879f12 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 28 May 2015 15:44:19 +0800 Subject: Bug 1146787: "take" buttons missing in edit mode --- .../template/en/default/bug_modal/edit.html.tmpl | 7 ++++++- .../template/en/default/bug_modal/field.html.tmpl | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'extensions/BugModal/template/en/default/bug_modal') diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index fa87066fd..095724e67 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -455,7 +455,7 @@ [% IF unassigned %] Unassigned [% IF bug.check_can_change_field("assigned_to", 0, 1) %] - + [% END %] [% ELSE %] [% INCLUDE bug_modal/user.html.tmpl u=bug.assigned_to %] @@ -465,6 +465,11 @@ field = bug_fields.assigned_to field_type = constants.FIELD_TYPE_USER hide_on_view = 1 + action = { + class = "take-btn" + caption = "Take" + hidden = bug.assigned_to.id == user.id || !user.in_group("editbugs") + } append_content = 1 default = bug.component_obj.default_assignee.login %] diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl index b11152bf1..c988bd645 100644 --- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl @@ -25,6 +25,11 @@ # append_content: (boolean) when called as a WRAPPER, the content will be appended to the # edit html instead of replacing it. forces edit_only (default: false); # default: (string) default value (eg. used as a placeholder in user fields) + # action: (hash) show a button to the right of the edit field (user fields only currently). keys: + # id: (string) optional button id + # class: (string) optional button class + # caption: (string) button caption + # hidden: (boolean) don't show the button (default: false) #%] [% @@ -191,6 +196,14 @@ END; [% CASE constants.FIELD_TYPE_USER %] + [% IF action && !action.hidden %] + +
+ [% END %] [%# single user %] [% INCLUDE global/userselect.html.tmpl id = name @@ -199,6 +212,9 @@ END; classes = [ "bz_userfield" ] placeholder = default %] + [% IF action && !action.hidden %] +
+ [% END %] [% CASE constants.FIELD_TYPE_USERS %] [%# multiple users %] -- cgit v1.2.3-24-g4f1b