- allow pager to appear on single testcase display
This commit is contained in:
ccooper%deadsquid.com 2007-09-07 02:00:30 +00:00
Родитель 50d99032a4
Коммит 8eb2823f42
2 изменённых файлов: 7 добавлений и 2 удалений

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

@ -87,6 +87,7 @@ if (! $c->param) {
if ($c->param("id")) {
my $testcase_id = $c->param("id");
my $page = $c->param("page") || 1;
# Process changes to testcases:
# Only users with canedit can edit testcases.
@ -165,7 +166,10 @@ if ($c->param("id")) {
push @where, { field => 'testcase', value => $testcase_id };
my @order_by;
push @order_by, { field => 'created', direction => 'DESC' };
my $test_results = Litmus::DB::Testresult->getTestResults(\@where,\@order_by);
my ($test_results,$pager) = Litmus::DB::Testresult->getTestResults(\@where,
\@order_by,
undef,
$page);
my ($status, $message);
if ($c->param('resultSubmission')) {
@ -182,6 +186,7 @@ if ($c->param("id")) {
$vars->{'result_statuses'} = \@result_statuses;
$vars->{'showallresults'} = $showallresults;
$vars->{'test_results'} = $test_results;
$vars->{'pager'} = $pager;
if ($status and $message) {
$vars->{'onload'} = "toggleMessage('$status','$message');";

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

@ -39,7 +39,7 @@
[% title="Testcase disabled" %]
[% END %]
[% INCLUDE global/html_header.tmpl js_files=['js/prototype.lite.js','js/moo.fx.js','js/moo.fx.pack.js','js/FormValidation.js','js/SelectBoxes.js','js/ManageTestcases.js','js/Help.js','js/RunTests.js'] %]
[% INCLUDE global/html_header.tmpl js_files=['js/prototype.lite.js','js/moo.fx.js','js/moo.fx.pack.js','js/FormValidation.js','js/SelectBoxes.js','js/ManageTestcases.js','js/Help.js','js/RunTests.js','js/Search.js'] %]
[% INCLUDE global/litmus_header.tmpl %]
<script type="text/javascript">