This commit is contained in:
ghendricks%novell.com 2007-06-13 20:36:58 +00:00
Родитель 4937ac9a24
Коммит f814535bb1
3 изменённых файлов: 7 добавлений и 80 удалений

Просмотреть файл

@ -1,78 +0,0 @@
[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Test Runner System.
#
# The Initial Developer of the Original Code is Maciej Maczynski.
# Portions created by Maciej Maczynski are Copyright (C) 2001
# Maciej Maczynski. All Rights Reserved.
#
# Contributor(s): Ed Fuentetaja <efuentetaja@acm.org>
# Greg Hendricks <ghendricks@novell.com>
#%]
[% PROCESS testopia/blocks.html.tmpl %]
[% IF table.list_count %]
[% IF dotweak %]
Select:
<a href="javascript:sall()">All</a>,
<a href="javascript:snone()">None</a>
[% END %]
[% link = "${table.get_order_url}&order=" %]
[% DECORATIVE_BORDER_100_BEGIN %]
<table class="resultsTable" width="100%">
<tr class="bz_row_header">
[% IF dotweak %]<th></th>[% END %]
<th><a href="[% link %]plan_id[% paren %]">ID[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th><a href="[% link %]name[% paren %]">Name[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th><a href="[% link %]author[% paren %]">Author[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th><a href="[% link %]created[% paren %]">Created[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th><a href="[% link %]product[% paren %]">Product[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th><a href="[% link %]plan_prodver[% paren %]">Product Version[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th><a href="[% link %]plan_type[% paren %]">Type[% table.arrow IF table.last_sort == 'alias' %]</a></th>
<th>Cases</th>
<th>Runs</th>
<th><a href="[% link %]isactive[% paren %]">Archived[% table.arrow IF table.last_sort == 'alias' %]</a></th>
</tr>
[% FOREACH plan = table.list %]
<tr class="[% loop.count % 2 == 1 ? "bz_row_odd" : "bz_row_even" %]">
[% IF dotweak %]<td align="center"><input type="checkbox" style="border: none" id="p_[% plan.id FILTER none %]" name="p_[% plan.id FILTER none %]"</td> [% END %]
<td><a href="tr_show_plan.cgi?plan_id=[% plan.plan_id FILTER none %]">[% plan.id FILTER html %]</a></td>
<td><a href="tr_show_plan.cgi?plan_id=[% plan.plan_id FILTER none %]">[% plan.name FILTER html %]</a></td>
<td>[% plan.author.login FILTER html %]</td>
<td>[% plan.creation_date FILTER time %]</td>
<td>[% plan.product.name FILTER html %]</td>
<td>[% plan.product_version FILTER html %]</td>
<td align="center">[% plan.plan_type FILTER html %]</td>
<td align="center">
<a href="tr_list_cases.cgi?plan_id=[% plan.plan_id FILTER none %]">[% plan.test_case_count FILTER html %]</a>
</td>
<td align="center">
<a href="tr_list_runs.cgi?plan_id=[% plan.plan_id FILTER none %]">[% plan.test_run_count FILTER html %]</a>
</td>
<td align="center">
[% plan.isactive ? 'No' : 'Yes' %]
</td>
</tr>
[% END %]
</tr>
</table>
[% PROCESS navigation %]
[% DECORATIVE_BORDER_END %]
[% END %]

Просмотреть файл

@ -181,7 +181,7 @@ if ($action eq 'Commit'){
detaint_natural($build);
detaint_natural($env);
validate_test_id($build, 'build');
validate_test_id($build, 'build') if $build;
validate_test_id($env, 'environment') if $env;
foreach my $runid (split(/[\s,]+/, $cgi->param('addruns'))){
@ -409,6 +409,11 @@ $vars->{'urlquerypart'} = $cgi->canonicalise_query('cmdtype');
if ($cgi->param('plan_id')){
my $plan_id = $cgi->param('plan_id');
my $plan = Bugzilla::Testopia::TestPlan->new($plan_id);
unless ($plan){
print $cgi->multipart_end if $serverpush;
ThrowUserError("invalid-test-id-non-existent",
{'id' => $cgi->param('plan_id'), 'type' => 'plan'});
}
$vars->{'dotweak'} = $plan->canedit;
$vars->{'candelete'} = $plan->candelete;
}

Просмотреть файл

@ -128,7 +128,7 @@ if ($action eq 'Commit'){
print $cgi->multipart_end;
print $cgi->multipart_start;
}
my $plan = Bugzilla::Testopia::TestPlan->new({ 'plan_id' => 0 });
my $plan = Bugzilla::Testopia::TestPlan->new({});
my $updated = $i - scalar @uneditable;
$vars->{'plan'} = $plan;