From d06db94e9793766ba8b67fcf6602f6d87bd624d4 Mon Sep 17 00:00:00 2001 From: "guy.pyrzak%gmail.com" <> Date: Thu, 10 Apr 2008 21:33:15 +0000 Subject: =?UTF-8?q?Bug=20414236=20=C3=90=20show=5Fbug.cgi:=20Remove=20the?= =?UTF-8?q?=20knob=20in=20favor=20of=20normal=20, in case there is more - # than one open -> closed transition allowed. Allow to fallback to - # 'resolution' (useful when called from email_in.pl). - my $knob = $cgi->param('knob'); - my $status = new Bugzilla::Status({name => $knob}); - my $resolution; - if ($status) { - $resolution = $cgi->param('resolution_knob_' . $status->id) - || $cgi->param('resolution'); - } - else { - $resolution = $cgi->param('resolution_knob_change_resolution'); - } - - # Translate the knob values into new status and resolution values. - $b->process_knob($knob, $resolution, scalar $cgi->param('dup_id')); + if (should_set('bug_status')) { + $b->set_status( + scalar $cgi->param('bug_status'), + {resolution => scalar $cgi->param('resolution'), + dupe_of => scalar $cgi->param('dup_id')} + ); + } + elsif (should_set('resolution')) { + $b->set_resolution(scalar $cgi->param('resolution'), + {dupe_of => scalar $cgi->param('dup_id')}); + } + elsif (should_set('dup_id')) { + $b->set_dup_id(scalar $cgi->param('dup_id')); } } diff --git a/skins/contrib/Dusk/global.css b/skins/contrib/Dusk/global.css index e13743a19..179d8f790 100644 --- a/skins/contrib/Dusk/global.css +++ b/skins/contrib/Dusk/global.css @@ -123,18 +123,7 @@ hr { border-top: 1px solid #c8c8ba; } -/* knob */ - -#knob { - background-color: #e6e6d8; - border: 1px solid #c8c8ba; - padding: 5px; - text-align: left; -} - -#knob a { - color: #646456; -} +/* knob-buttons */ #knob-buttons { margin-top: 10px; diff --git a/skins/standard/buglist.css b/skins/standard/buglist.css index dc3db0e10..71206fcbd 100644 --- a/skins/standard/buglist.css +++ b/skins/standard/buglist.css @@ -60,3 +60,7 @@ tr.bz_secure_mode_implied td.first-child { tr.bz_secure_mode_manual td.first-child { } + +#commit, #action { + margin-top: .25em; +} diff --git a/skins/standard/show_bug.css b/skins/standard/show_bug.css index 624a22ee2..cba882cbc 100644 --- a/skins/standard/show_bug.css +++ b/skins/standard/show_bug.css @@ -36,8 +36,9 @@ height: 1em; } -#bz_field_status { +#duplicate_settings, #votes_container { white-space: nowrap; + } .bz_time_tracking_table { diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 8e4cc9e15..2b70b03a3 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -242,7 +242,13 @@ maxrows = 25 cols = constants.COMMENT_COLS %] - [% PROCESS bug/knob.html.tmpl %] +
+
+ + [% IF bug.user.canmove %] + + [% END %] +
[% ELSE %]
Note @@ -357,9 +363,9 @@ : + [% PROCESS select selname => "component" %] @@ -404,14 +410,7 @@ Status: - - [% get_status(bug.bug_status) FILTER html %]   - [% get_resolution(bug.resolution) FILTER html %] - - [% IF bug.resolution == "DUPLICATE" %] - of [% terms.bug %] [%+ "${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] - [% END %] - + [% PROCESS bug/knob.html.tmpl %] [%###############################################################%] @@ -422,24 +421,20 @@ : - - - [% PROCESS select selname => "priority" %] - [% PROCESS select selname = "bug_severity" %] - [% IF bug.use_votes %] - - [% END %] - -
- [% IF bug.votes %] - with - - [% bug.votes %] vote[%IF bug.votes > 1 %]s[% END %] - . - [% END %] - (vote) -
+ [% PROCESS select selname => "priority" no_td=>1 %] + [% PROCESS select selname = "bug_severity" no_td=>1 %] + [% IF bug.use_votes %] + + [% IF bug.votes %] + with + + [% bug.votes %] vote[%IF bug.votes > 1 %]s[% END %] + . + [% END %] + (vote) + + [% END %] diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl index 432e9b309..4cf6031e7 100644 --- a/template/en/default/bug/knob.html.tmpl +++ b/template/en/default/bug/knob.html.tmpl @@ -18,15 +18,16 @@ # Contributor(s): Gervase Markham # Vaskin Kissoyan # Frédéric Buclin + # Guy Pyrzak #%] [% PROCESS global/variables.none.tmpl %] - -
-
-
+
[% initial_action_shown = 0 %] + [% show_resolution = 0 %] + [% bug_status_select_displayed = 0 %] + [% 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 %] @@ -36,85 +37,114 @@ # 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 %] + - - [% IF bug.isopened && !bug_status.is_open %] - and set the resolution to [% PROCESS select_resolution field = "knob_${bug_status.id}" %] + + [% IF !bug_status.is_open %] + [% show_resolution = 1 %] + [% filtered_status = bug_status.name FILTER js %] + [% closed_status_array.push( filtered_status ) %] [% END %] -
[% END %] [%# These actions are special and are independent of the workflow. %] [% IF bug.user.canedit || bug.user.isreporter %] + [% IF NOT bug_status_select_displayed %] + - -
[% END %] - [% ELSE %] - [% IF bug.resolution != "MOVED" || bug.user.canmove %] + [% ELSIF bug.resolution != "MOVED" || bug.user.canmove %] [% PROCESS initial_action %] - - - [% PROCESS select_resolution field = "knob_change_resolution" %] -
- [% END %] + [% show_resolution = 1 %] [% END %] - - [% PROCESS duplicate %] + [% END %] + [% IF bug_status_select_displayed %] + + [% ELSE %] + [% get_status(bug.bug_status) FILTER html %] + [% IF bug.resolution %] + [%+ get_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.canmove %] - + [% IF bug.user.canedit || bug.user.isreporter %] + [% IF show_resolution %] + + [% PROCESS select_resolution %] [% END %] -
+ + + of + + [% "${terms.bug} ${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] + (edit) + + + + [% END %]
+ [%# Common actions %] [% BLOCK initial_action %] - [%# Only show 'Leave as' action in combination with another knob %] [% 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 %] - [% FOREACH r = bug.choices.resolution %] - + [% NEXT IF r == "MOVED" && bug.resolution != "MOVED" %] + [% END %] [% END %] - -[% BLOCK duplicate %] - - - -
-[% END %] diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 7e0e1cd70..80645a851 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -394,11 +394,7 @@ [% ELSIF error == "undefined_field" %] Form field [% field FILTER html %] was not defined. - [%# Useful message if browser did not select show_bug radio button %] - [% IF field == "knob" %] - Check that the "Leave as..." radio button was selected. - [% END %] - + [% ELSIF error == "unknown_action" %] [% IF action %] Unknown action [% action FILTER html %]! diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 5607371eb..fef4c0c99 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -18,6 +18,7 @@ # Contributor(s): Myk Melez # Max Kanat-Alexander # Frédéric Buclin + # Guy Pyrzak #%] [% PROCESS global/variables.none.tmpl %] @@ -130,7 +131,11 @@ [% END %] - + + + + [% PROCESS status_section %] + [% IF user.in_group(Param("timetrackinggroup")) %] @@ -309,49 +314,6 @@ [% END %] [% END %] - -[% all_open_bugs = !current_bug_statuses.containsany(closedstates) %] -[% all_closed_bugs = !current_bug_statuses.containsany(openstates) %] -[% display_warning = 0 %] - - -
- -[% FOREACH bug_status = new_bug_statuses %] - - - [%# Closed bugs cannot have their resolution changed this way. %] - [% IF !bug_status.is_open && !all_closed_bugs %] - and set the resolution to [% PROCESS select_resolution id = bug_status.id %] - [%+ "(*)" UNLESS all_open_bugs %] - [% display_warning = 1 UNLESS all_open_bugs %] - [% END %] -
-[% END %] - -[%# If all the bugs being changed are open, allow the user to clear their resolution. %] -[% IF all_open_bugs %] - -
-[% END %] - -[%# If all the bugs being changed are closed, allow the user to change their resolution. %] -[% IF all_closed_bugs %] - - - [%+ PROCESS select_resolution id = "change_resolution" %]
-[% END %] - -[% IF display_warning %] -

- (*) Note that the resolution will only be applied to open [% terms.bugs %]. - Already closed [% terms.bugs %] will keep their resolution unchanged. -

-[% END %] - [% IF Param('move-enabled') && user.is_mover %] @@ -374,12 +336,50 @@ [% END %] -[% BLOCK select_resolution %] - + + + [% FOREACH bug_status = new_bug_statuses %] + + [% IF !bug_status.is_open %] + [% filtered_status = bug_status.name FILTER js %] + [% closed_status_array.push( filtered_status ) %] + [% END %] + [% END %] + + [%# If all the bugs being changed are closed, allow the user to change their resolution. %] + [% IF all_closed_bugs %] + [% filtered_status = dontchange FILTER js %] + [% closed_status_array.push( filtered_status ) %] + [% END %] + + + + + + + + [% END %] -- cgit v1.2.1