Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 25ad1535

Von Sven Schöling vor fast 12 Jahren hinzugefügt

  • ID 25ad1535122a8cd3bab24b0b71bd9bf887c40641
  • Vorgänger f64be46d
  • Nachfolger 82c3b7eb

Report in der richtigen Reihenfolge speichern und anzeigen.

Unterschiede anzeigen:

SL/Controller/CsvImport.pm
282 282
  my $sth = $dbh->prepare($query);
283 283
  my $sth2 = $dbh->prepare($query2);
284 284

  
285
#  $::lxdebug->dump(0,  "self", $self->info_headers);
286
#  $::lxdebug->dump(0,  "self", $self->headers);
287
#  $::lxdebug->dump(0,  "self", $self->raw_data_headers);
288

  
285 289
  # save headers
286 290
  my @headers = (
287
    @{ $self->info_headers->{headers} || [] },
288
    @{ $self->headers->{headers} || [] },
289
    @{ $self->raw_data_headers->{headers} || [] },
291
    grep({ $self->info_headers->{used}->{$_}     } @{ $self->info_headers->{headers} }),
292
    grep({ $self->headers->{used}->{$_}          } @{ $self->headers->{headers} }),
293
    grep({ $self->raw_data_headers->{used}->{$_} } @{ $self->raw_data_headers->{headers} }),
290 294
  );
291
  my @info_methods = keys %{ $self->info_headers->{methods} || {} };
292
  my @methods      = @{ $self->headers->{methods} || [] };
293
  my @raw_methods  = keys %{ $self->raw_data_headers->{used} || {} };
295
  my @info_methods = grep { $self->info_headers->{used}->{$_}     } @{ $self->info_headers->{headers} };
296
  my @methods      = grep { $self->headers->{used}->{$_}          } @{ $self->headers->{methods} };
297
  my @raw_methods  = grep { $self->raw_data_headers->{used}->{$_} } @{ $self->raw_data_headers->{headers} };
294 298

  
295 299
  $sth->execute($report->id, $_, 0, $headers[$_]) for 0 .. $#headers;
296 300

  
templates/webpages/csv_import/report.html
15 15
  </tr>
16 16
 [%- ELSE %]
17 17
  [% csv_import_report_errors = SELF.report.folded_status.${loop.index}.errors %]
18
  <tr class="[% IF csv_import_report_errors.size %]redrow[% ELSE %]listrow[% END %][% loop.count % 2 %]">
18
  <tr class="[% IF csv_import_report_errors.size %]redrow[% ELSE %]listrow[% END %][% 1 - loop.count % 2 %]">
19 19
  [%- FOREACH value = row %]
20 20
   <td>[%- value | html  %]</td>
21 21
  [%- END %]

Auch abrufbar als: Unified diff