Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a06b7def

Von Thomas Heck vor fast 11 Jahren hinzugefügt

  • ID a06b7defe96cfbdcfd2fb557678e820205639785
  • Vorgänger 71d1fccd
  • Nachfolger 2bc376b9

CSV-Import: Blättern gefixt

fixt #2176

Unterschiede anzeigen:

SL/Controller/CsvImport.pm
165 165
  my $pages = {};
166 166
  $pages->{per_page}        = $::form->{per_page} || 20;
167 167
  $pages->{max}             = SL::DB::Helper::Paginated::ceil($num_rows, $pages->{per_page}) || 1;
168
  $pages->{cur}             = $page < 1 ? 1
168
  $pages->{page}             = $page < 1 ? 1
169 169
                            : $page > $pages->{max} ? $pages->{max}
170 170
                            : $page;
171
  $pages->{common}          = [ grep { $_->{visible} } @{ SL::DB::Helper::Paginated::make_common_pages($pages->{cur}, $pages->{max}) } ];
171
  $pages->{common}          = [ grep { $_->{visible} } @{ SL::DB::Helper::Paginated::make_common_pages($pages->{page}, $pages->{max}) } ];
172 172

  
173 173
  $self->{report_numheaders} = $self->{report}->numheaders;
174 174
  my $first_row_header = 0;
175 175
  my $last_row_header  = $self->{report_numheaders} - 1;
176
  my $first_row_data   = $pages->{per_page} * ($pages->{cur}-1) + $self->{report_numheaders};
177
  my $last_row_data    = min($pages->{per_page} * $pages->{cur}, $num_rows) + $self->{report_numheaders} - 1;
176
  my $first_row_data   = $pages->{per_page} * ($pages->{page}-1) + $self->{report_numheaders};
177
  my $last_row_data    = min($pages->{per_page} * $pages->{page}, $num_rows) + $self->{report_numheaders} - 1;
178 178
  $self->{display_rows} = [
179 179
    $first_row_header
180 180
      ..

Auch abrufbar als: Unified diff