From 2bd57ce8e6f2c2bb59a99d825fc9d181ea2cb4a5 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 27 May 2007 03:27:45 +0000 Subject: Bug 344965: Fix process_bug.cgi and bug/* templates to work with custom bug status workflow - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/bug/knob.html.tmpl | 108 ++++++++++----------------------- 1 file changed, 32 insertions(+), 76 deletions(-) (limited to 'template/en/default/bug/knob.html.tmpl') diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index 0e1a928f4..99aed9c22 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -18,42 +18,39 @@ # # Contributor(s): Gervase Markham # Vaskin Kissoyan + # Frédéric Buclin #%] [% PROCESS global/variables.none.tmpl %] -[%# *** Knob *** %] -
- - [% knum = 1 %] [% initial_action_shown = 0 %] - [% IF bug.isunconfirmed && bug.user.canconfirm %] - [% PROCESS initial_action %] - - -
- [% knum = knum + 1 %] - [% END %] - - [% IF bug.isopened && bug.bug_status != "ASSIGNED" && bug.user.canedit - && (!bug.isunconfirmed || bug.user.canconfirm) %] + [%# These actions are based on the current custom workflow. %] + [% FOREACH bug_status = bug.status.can_change_to %] + [% NEXT IF bug.isunconfirmed && bug_status.is_open && !bug.user.canconfirm %] + [% NEXT IF bug.isopened && !bug.isunconfirmed && bug_status.is_open && !bug.user.canedit %] + [% NEXT IF !bug_status.is_open && !bug.user.canedit && !bug.user.isreporter %] + [% NEXT IF !bug_status.is_open && bug_status.is_open && !bug.user.canedit && !bug.user.isreporter %] + [%# Special hack to only display UNCO or REOP when reopening, but not both; + # for compatibility with older versions. %] + [% NEXT IF !bug.isopened && (bug.everconfirmed && bug_status.name == "UNCONFIRMED" + || !bug.everconfirmed && bug_status.name == "REOPENED") %] [% PROCESS initial_action %] - -
- [% knum = knum + 1 %] [% END %] - - [% PROCESS initial_action %] - - - [% PROCESS select_resolution %] - - [% PROCESS duplicate %] [% ELSE %] - [% IF bug.resolution != "MOVED" || - (bug.resolution == "MOVED" && bug.user.canmove) %] + [% IF bug.resolution != "MOVED" || bug.user.canmove %] [% PROCESS initial_action %] - -
- + [% IF bug.user.canmove %] -   |   - + [% END %]
@@ -143,23 +102,20 @@ [% END %] [% BLOCK select_resolution %] - [% FOREACH r = bug.choices.resolution %] [% END %] -
- [% knum = knum + 1 %] [% END %] [% BLOCK duplicate %] - -