From 873f5c2e57b16c19de0d07e93eaee5fa8ca47ae6 Mon Sep 17 00:00:00 2001 From: "ghendricks%novell.com" Date: Fri, 1 Dec 2006 23:40:07 +0000 Subject: [PATCH] Move to the lists of builds and categories after adding and updating instead of show_plan git-svn-id: svn://10.0.0.236/trunk@216309 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/testopia/tr_builds.cgi | 28 +++------------------ mozilla/webtools/testopia/tr_categories.cgi | 27 +++----------------- 2 files changed, 6 insertions(+), 49 deletions(-) diff --git a/mozilla/webtools/testopia/tr_builds.cgi b/mozilla/webtools/testopia/tr_builds.cgi index 144377fad58..6b2895473cb 100755 --- a/mozilla/webtools/testopia/tr_builds.cgi +++ b/mozilla/webtools/testopia/tr_builds.cgi @@ -171,10 +171,7 @@ elsif ($action eq 'do_delete'){ ### View plan Builds ### ######################## else { - - $vars->{'plan'} = $plan; - $template->process("testopia/build/list.html.tmpl", $vars) - || ThrowTemplateError($template->error()); + display($plan); } ################### @@ -197,25 +194,6 @@ sub get_builds_xml { sub display{ my $plan = shift; $vars->{'plan'} = $plan; - $vars->{'action'} = "update"; - $vars->{'form_action'} = "tr_show_plan.cgi"; - - $cgi->delete_all; - $cgi->param('plan_id', $plan->id); - my $casequery = new Bugzilla::CGI($cgi); - my $runquery = new Bugzilla::CGI($cgi); - - $casequery->param('current_tab', 'case'); - my $search = Bugzilla::Testopia::Search->new($casequery); - my $table = Bugzilla::Testopia::Table->new('case', 'tr_show_plan.cgi', $casequery, undef, $search->query); - $vars->{'case_table'} = $table; - - $runquery->param('current_tab', 'run'); - $search = Bugzilla::Testopia::Search->new($runquery); - $table = Bugzilla::Testopia::Table->new('run', 'tr_show_plan.cgi', $runquery, undef, $search->query); - $vars->{'run_table'} = $table; - $template->process("testopia/plan/show.html.tmpl", $vars) - || ThrowTemplateError($template->error()); - + $template->process("testopia/build/list.html.tmpl", $vars) + || ThrowTemplateError($template->error()); } - diff --git a/mozilla/webtools/testopia/tr_categories.cgi b/mozilla/webtools/testopia/tr_categories.cgi index a44a77a3a7b..f5d054c041b 100755 --- a/mozilla/webtools/testopia/tr_categories.cgi +++ b/mozilla/webtools/testopia/tr_categories.cgi @@ -162,10 +162,7 @@ elsif ($action eq 'do_delete'){ ### View plan Categories ### ############################ else { - $vars->{'canmanage'} = $plan->canedit; - $vars->{'plan'} = $plan; - $template->process("testopia/category/list.html.tmpl", $vars) - || ThrowTemplateError($template->error()); + display($plan); } sub get_categories_xml { @@ -185,24 +182,6 @@ sub get_categories_xml { sub display{ my $plan = shift; $vars->{'plan'} = $plan; - $vars->{'action'} = "update"; - $vars->{'form_action'} = "tr_show_plan.cgi"; - - $cgi->delete_all; - $cgi->param('plan_id', $plan->id); - my $casequery = new Bugzilla::CGI($cgi); - my $runquery = new Bugzilla::CGI($cgi); - - $casequery->param('current_tab', 'case'); - my $search = Bugzilla::Testopia::Search->new($casequery); - my $table = Bugzilla::Testopia::Table->new('case', 'tr_show_plan.cgi', $casequery, undef, $search->query); - $vars->{'case_table'} = $table; - - $runquery->param('current_tab', 'run'); - $search = Bugzilla::Testopia::Search->new($runquery); - $table = Bugzilla::Testopia::Table->new('run', 'tr_show_plan.cgi', $runquery, undef, $search->query); - $vars->{'run_table'} = $table; - $template->process("testopia/plan/show.html.tmpl", $vars) - || ThrowTemplateError($template->error()); - + $template->process("testopia/category/list.html.tmpl", $vars) + || ThrowTemplateError($template->error()); }