diff --git a/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm b/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm index 36be78c8634..ba0bf299fbd 100644 --- a/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm +++ b/mozilla/webtools/testopia/Bugzilla/Testopia/Table.pm @@ -108,6 +108,7 @@ sub init { my $debug = $cgi->param('debug') if $cgi; my @list; if ($query){ + my $serverpush = support_server_push($cgi); print "$query" if $debug; # For paging we need to know the total number of items # but Search.pm returns a query with a subset @@ -122,7 +123,23 @@ sub init { my @ids; my $list = $dbh->selectcol_arrayref($query); $dbh = Bugzilla->switch_to_main_db(); + + my $vars; + my $progress_interval = 1000; + my $i = 0; + my $total = scalar @$list; + foreach my $id (@$list){ + $i++; + if ($serverpush && $i % $progress_interval == 0){ + print $cgi->multipart_end; + print $cgi->multipart_start; + $vars->{'complete'} = $i; + $vars->{'total'} = $total; + + Bugzilla->template->process("testopia/progress.html.tmpl", $vars) + || ThrowTemplateError(Bugzilla->template->error()); + } my $o; if ($type eq 'case'){ $o = Bugzilla::Testopia::TestCase->new($id); diff --git a/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl index e21d581a230..9e23a2dd1a9 100644 --- a/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl +++ b/mozilla/webtools/testopia/template/en/default/testopia/blocks.html.tmpl @@ -47,6 +47,11 @@ [% url = "$table.get_page_url&page="%] [%# url = "$table.url_loc?direction=$direction&getlist=1&page="%] [% END %] +[% pagesizelist = [{name => 25, id => 25}, + {name => 50, id => 50}, + {name => 100, id => 100}, + {name => 500, id => 500}]%] +
| << First | < Previous | @@ -72,7 +80,7 @@<< First | < Previous | [% END %] -+ | [% SET framewidth = 10 %] [% IF (table.page_count - 1) < framewidth %] [% SET p = 0 %] @@ -103,19 +111,6 @@ [% END %] [% end_mark %] - - - Out of [% table.page_count %] - - [% IF ajax %] - All - [% ELSE %] - [% IF table.list_count < MAX_LIMIT %] - All - [% ELSE %] - All - [% END %] - [% END %] | [% IF table.page < table.page_count - 1 %]Next > | @@ -124,6 +119,30 @@Next > | Last >> | [% END %] ++ + + Out of [% table.page_count %] pages + + View [% PROCESS select sel = {list => pagesizelist, + default => table.page_size, + events => 'onchange="adjustPageSize(this.value)"' }%] + records at a time + + [% IF ajax %] + View All + [% ELSE %] + [% IF table.list_count < MAX_LIMIT %] + View All + [% ELSE %] + View All + [% END %] + [% END %] + | + + +
| [% table.list_count %] records found | ||||||||
|---|---|---|---|---|---|---|---|---|