Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cd4e2d68

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID cd4e2d6885a7e3bb213bff610603455669306385
  • Vorgänger 9783a234
  • Nachfolger 28878455

EmailJournal: Report um Obsolete, Belegtype und Verknüpft erweitert

Unterschiede anzeigen:

SL/Controller/EmailJournal.pm
209 209
      ($_->{customervendor} eq $customer_vendor_type)
210 210
      && ($action eq 'workflow_record' ? $_->{can_workflow} : 1)
211 211
      && ($action eq 'create_new'      ? $_->{workflow_needed} : 1)
212
      && ($action eq 'linking_record'  ? $_->{record_type} !~ /_template$/ : 1)
213
      && ($action eq 'template_record' ? $_->{record_type} =~ /_template$/ : 1)
212
      && ($action eq 'linking_record'  ? !$_->{is_template} : 1)
213
      && ($action eq 'template_record' ? $_->{is_template} : 1)
214 214
    }
215 215
    $self->get_record_types_with_info()
216 216
  ];
......
224 224
  my ($self) = @_;
225 225

  
226 226
  $::auth->assert('email_journal');
227
  # default filter
228
  $::form->{filter} ||= {"obsolete:eq_ignore_empty" => 0};
227 229

  
228 230
  if ( $::instance_conf->get_email_journal == 0 ) {
229 231
    flash('info',  $::locale->text('Storing the emails in the journal is currently disabled in the client configuration.'));
230 232
  }
231 233
  $self->setup_list_action_bar;
234
  my @record_types_with_info = $self->get_record_types_with_info();
232 235
  $self->render('email_journal/list',
233 236
                title   => $::locale->text('Email journal'),
234 237
                ENTRIES => $self->models->get,
235
                MODELS  => $self->models);
238
                MODELS  => $self->models,
239
                RECORD_TYPES_WITH_INFO => \@record_types_with_info,
240
              );
236 241
}
237 242

  
238 243
sub action_show {
......
626 631
      sent_on         => t8('Sent on'),
627 632
      status          => t8('Status'),
628 633
      extended_status => t8('Extended status'),
634
      record_type     => t8('Record Type'),
635
      obsolete        => t8('Obsolete'),
629 636
      linked_to       => t8('Linked to'),
630 637
    },
631 638
  );
......
650 657
    send_failed     => $::locale->text('send failed'),
651 658
    sent            => $::locale->text('sent'),
652 659
    imported        => $::locale->text('imported'),
653
    record_imported => $::locale->text('record imported'),
654 660
  );
655 661
  push @filter_strings, $status{ $filter->{'status:eq_ignore_empty'} } if $filter->{'status:eq_ignore_empty'};
656 662

  
663

  
664
  my %record_type = map { $_->{record_type} => $_->{text} } $self->get_record_types_with_info();
665
  push @filter_strings, $record_type{ $filter->{'record_type:eq_ignore_empty'} } if $filter->{'record_type:eq_ignore_empty'};
666

  
667
  push @filter_strings, $::locale->text('Obsolete')     if $filter->{'obsolete:eq_ignore_empty'} eq '1';
668
  push @filter_strings, $::locale->text('Not obsolete') if $filter->{'obsolete:eq_ignore_empty'} eq '0';
669

  
670
  push @filter_strings, $::locale->text('Linked')       if $filter->{'linked_to:eq_ignore_empty'} eq '1';
671
  push @filter_strings, $::locale->text('Not linked')   if $filter->{'linked_to:eq_ignore_empty'} eq '0';
672

  
657 673
  return join ', ', @filter_strings;
658 674
}
659 675

  

Auch abrufbar als: Unified diff