Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b2930e37

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

  • ID b2930e37cd4bfd276be6c785e1cd7fff0f503aef
  • Vorgänger 670ca35b
  • Nachfolger d001c791

Fehler korrekt weiterleiten

Unterschiede anzeigen:

SL/BackgroundJob/CsvImport.pm
89 89
  if ($c->errors) {
90 90
    $job->set_data(
91 91
      errors   => $c->errors,
92
      progress => -1,
93 92
    )->save;
94 93
  } else {
95 94

  
SL/Controller/CsvImport.pm
93 93
    flash('error', $::locale->text('There was an error parsing the csv file: #1 in line #2.', $first_error->[2], $first_error->[0]));
94 94
  }
95 95

  
96
  if (!$data->{progress}{finished}) {
97
    $self->render('csv_import/_deferred_results', { no_layout => 1 });
98
  } else {
96
  if ($data->{progress}{finished} || $data->{errors}) {
99 97
    $self->action_report(report_id => $data->{report_id}, no_layout => 1);
98
  } else {
99
    $self->render('csv_import/_deferred_results', { no_layout => 1 });
100 100
  }
101 101
}
102 102

  
templates/webpages/csv_import/_deferred_results.html
5 5
<h2>[% 'Import Status' | $T8 %]</h2>
6 6

  
7 7
[% PROCESS 'common/flash.html' %]
8
[% UNLESS SELF.background_job.data_as_hash.errors %]
8 9
<div id='progress_description'></div>
9 10
<div id='progressbar'></div>
11
[% END  %]
10 12
<script type='text/javascript'>
11 13
  function reload_results () {
12 14
    $.ajax({
......
20 22
      error: function(e) { alert(e) },
21 23
    });
22 24
  }
23
[%- UNLESS SELF.background_job.data_as_hash.progress < 0 %]
25
[%- UNLESS SELF.background_job.data_as_hash.errors %]
24 26
  $(document).ready(function(){
25 27
    $('#progress_description').html('[% SELF.background_job.data_as_hash.progress.plan.${SELF.background_job.data_as_hash.progress.phase} %] / [% SELF.background_job.data_as_hash.progress.num_phases %] [% SELF.background_job.data_as_hash.progress.phase | $T8 | html %]');
26 28
    $('#progressbar').progressbar({ value: [% SELF.background_job.data_as_hash.progress.progress * 1 %] });

Auch abrufbar als: Unified diff