From e1b433e3d54504dceb151213d4addac42a1e5ca9 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 12 Dec 2009 21:55:15 +0000 Subject: Bug 512606: Make statuses currently available for the user to change this bug to be controlled by Bugzilla::Bug, not the template Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- template/en/default/bug/knob.html.tmpl | 123 +++++++++------------------------ 1 file changed, 34 insertions(+), 89 deletions(-) (limited to 'template') diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index 10d58e51b..ac14e6dc0 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -23,71 +23,33 @@ [% PROCESS global/variables.none.tmpl %]
- [% initial_action_shown = 0 %] - [% show_resolution = 0 %] - [% bug_status_select_displayed = 0 %] + [% PROCESS bug/field.html.tmpl + no_tds = 1 + field = bug_fields.bug_status + value = bug.bug_status + override_legal_values = bug.choices.bug_status + editable = bug.choices.bug_status.size > 1 + %] - [% closed_status_array = [] %] - [%# 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.isopened) && !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") %] - [% IF NOT bug_status_select_displayed %] - - [% bug_status_select_displayed = 1 %] - [% END %] - [% IF bug.isopened %] - [% IF bug.resolution %] - [% PROCESS initial_action %] - [% END %] - [% ELSIF bug.resolution != "MOVED" || bug.user.canmove %] - [% PROCESS initial_action %] - [% show_resolution = 1 %] - [% END %] - [% END %] - [% IF bug_status_select_displayed %] - - [% ELSE %] - [% display_value("bug_status", bug.bug_status) FILTER html %] - [% IF bug.resolution %] - [%+ display_value("resolution", bug.resolution) FILTER html %] - [% IF bug.dup_id %] - of - [% "${terms.bug} ${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] - [% END %] - [% END %] - [% END %] - [% IF bug.user.canedit || bug.user.isreporter %] - [% IF show_resolution %] - - [% PROCESS select_resolution %] - [% END %] + + [% PROCESS bug/field.html.tmpl + no_tds = 1 + field = bug_fields.resolution + value = bug.resolution + override_legal_values = bug.choices.resolution + editable = bug.check_can_change_field('resolution', bug.resolution, 1) + %] + + + [% IF bug.check_can_change_field('dup_id', 0, 1) %] - - of + of [% "${terms.bug} ${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] (edit) @@ -101,11 +63,20 @@ + [% ELSIF bug.dup_id %] + + of + [% "${terms.bug} ${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] [% END %]
+ - -[%# Common actions %] - -[% BLOCK initial_action %] - [% IF !initial_action_shown %] - - [% IF !bug.isopened %] - [% show_resolution = 1 %] - [% filtered_status = bug.bug_status FILTER js %] - [% closed_status_array.push(filtered_status) %] - [% END %] - [% initial_action_shown = 1 %] - [% END %] -[% END %] - -[% BLOCK select_resolution %] - -[% END %] -- cgit v1.2.3-24-g4f1b