diff --git a/index.pl b/index.pl index fe5bcb6d8bef5ca655589c8c6d35a96d1582d56d..2bce4eb9b72beec170085ad26ae4b4c4db79ea4f 100755 --- a/index.pl +++ b/index.pl @@ -303,6 +303,10 @@ helper 'undo' => sub { return 'Nested undo (undoing an undo) is not supported'; } + if ( @{$rows} > 1 and $rows->[1][0] == $action_type{undo}) { + return 'Repeated undo is not supported'; + } + my $success = $self->app->undo_query->execute( $self->get_user_id, DateTime->now( time_zone => 'Europe/Berlin' )->epoch, diff --git a/templates/departures.html.ep b/templates/departures.html.ep index bd11d15bc1d50308c1461f1935efc700df82990b..be2c7cd6acc5b138a148f84676d774accfcc8779 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -15,6 +15,20 @@ % } + % elsif ($status->{timestamp_delta} < 600) { +
+
+ Ausgecheckt +

Aus <%= $status->{train_type} %> <%= $status->{train_no} %> + bis <%= $status->{station_name} %>

+
+
+ + undo Rückgängig? + +
+
+ % }