From b593bc765672acb222137093fa233a9e0077a3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 23 May 2016 14:38:37 +0200 Subject: [PATCH] Csv-Import: Anzahl der Fehler beim Ergebnis anzeigen. --- SL/Controller/CsvImport.pm | 2 ++ templates/webpages/csv_import/report.html | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index a177401..20cdc9e 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -204,6 +204,8 @@ sub action_report { my $rows = SL::DB::Manager::CsvImportReportRow->get_all(query => \@query); my $status = SL::DB::Manager::CsvImportReportStatus->get_all(query => \@query); + $self->{num_errors} = SL::DB::Manager::CsvImportReportStatus->get_all_count(query => [ and => [csv_import_report_id => $report_id, + type => 'errors'] ]); $self->{report_rows} = $self->{report}->folded_rows(rows => $rows); $self->{report_status} = $self->{report}->folded_status(status => $status); diff --git a/templates/webpages/csv_import/report.html b/templates/webpages/csv_import/report.html index 539ce5a..ec8a4ba 100644 --- a/templates/webpages/csv_import/report.html +++ b/templates/webpages/csv_import/report.html @@ -1,7 +1,12 @@ [% USE HTML %] [% USE LxERP %] [% USE L %] -

[%- LxERP.t8('Import result') %]

+

+ [%- LxERP.t8('Import result') %] + [%- IF SELF.num_errors -%] + ([%- SELF.num_errors -%] [%- LxERP.t8('Errors') -%]) + [%- END -%] +

[%- PROCESS 'common/paginate.html' pages=SELF.pages, base_url = SELF.base_url %] -- 1.9.1