Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 945a4716

Von Tamino Steinert vor 12 Monaten hinzugefügt

  • ID 945a4716857696b8abeedb71f1affe9ada64c145
  • Vorgänger 535904da
  • Nachfolger 6c9e2179

EmailJournal: Obsolete anzeigen und umschalten können

Unterschiede anzeigen:

SL/Controller/EmailJournal.pm
498 498
  $self->js->render();
499 499
}
500 500

  
501
sub action_toggle_obsolete {
502
  my ($self) = @_;
503

  
504
  $::auth->assert('email_journal');
505

  
506
  my $back_to = $::form->{back_to} || $self->url_for(action => 'list');
507

  
508
  $self->entry(SL::DB::EmailJournal->new(id => $::form->{id})->load);
509

  
510
  if (!$self->can_view_all && ($self->entry->sender_id != SL::DB::Manager::Employee->current->id)) {
511
    $::form->error(t8('You do not have permission to access this entry.'));
512
  }
513

  
514
  $self->entry->obsolete(!$self->entry->obsolete);
515
  $self->entry->save;
516

  
517
  $self->js
518
  ->val('#obsolete', $self->entry->obsolete_as_bool_yn)
519
  ->flash('info',
520
    $self->entry->obsolete ?
521
      $::locale->text('Email marked as obsolete.')
522
    : $::locale->text('Email marked as not obsolete.')
523
  )->render();
524

  
525
  return;
526
}
527

  
501 528
#
502 529
# filters
503 530
#

Auch abrufbar als: Unified diff