Loading lib/Travelynx.pm +13 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ sub startup { sched_departure => 0x0001, real_departure => 0x0002, route => 0x0010, is_cancelled => 0x0020, sched_arrival => 0x0100, real_arrival => 0x0200, }; Loading Loading @@ -896,6 +897,18 @@ sub startup { } )->rows; } elsif ( $key eq 'cancelled' ) { $rows = $db->update( 'journeys', { cancelled => $value, edited => $journey->{edited} | 0x0020, }, { id => $journey_id, } )->rows; } elsif ( $key eq 'comment' ) { $journey->{user_data}{comment} = $value; $rows = $db->update( Loading lib/Travelynx/Controller/Traveling.pm +12 −0 Original line number Diff line number Diff line Loading @@ -752,6 +752,7 @@ sub edit_journey { my $journey = $self->get_journey( uid => $uid, journey_id => $journey_id, verbose => 1, with_datetime => 1, ); Loading Loading @@ -811,6 +812,15 @@ sub edit_journey { [@route_new] ); } } { my $cancelled_old = $journey->{cancelled}; my $cancelled_new = $self->param('cancelled') // 0; if ( $cancelled_old != $cancelled_new ) { $error = $self->update_journey_part( $db, $journey->{id}, 'cancelled', $cancelled_new ); } } if ( not $error ) { $journey = $self->get_journey( Loading Loading @@ -839,6 +849,8 @@ sub edit_journey { $self->param( route => join( "\n", map { $_->[0] } @{ $journey->{route} } ) ); $self->param( cancelled => $journey->{cancelled} ); for my $key (qw(comment)) { if ( $journey->{user_data} and $journey->{user_data}{$key} ) { $self->param( $key => $journey->{user_data}{$key} ); Loading templates/edit_journey.html.ep +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ % } </td> </tr> <tr> <th scope="row"></th> <td> <label> %= check_box cancelled => 1 <span>Fahrt ist ausgefallen</span> </label> </td> </tr> <tr> <th scope="row">Geplante Abfahrt</th> <td> Loading templates/journey.html.ep +6 −2 Original line number Diff line number Diff line Loading @@ -15,11 +15,15 @@ <div class="col s12"> <p> % if ($journey->{cancelled}) { Ausgefallene Fahrt von Ausgefallene Fahrt % } % else { Fahrt von Fahrt % } % if ($journey->{edited} & 0x0020) { ∗ % } von <b><%= $journey->{from_name} %></b> nach <b><%= $journey->{to_name} %></b> Loading Loading
lib/Travelynx.pm +13 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ sub startup { sched_departure => 0x0001, real_departure => 0x0002, route => 0x0010, is_cancelled => 0x0020, sched_arrival => 0x0100, real_arrival => 0x0200, }; Loading Loading @@ -896,6 +897,18 @@ sub startup { } )->rows; } elsif ( $key eq 'cancelled' ) { $rows = $db->update( 'journeys', { cancelled => $value, edited => $journey->{edited} | 0x0020, }, { id => $journey_id, } )->rows; } elsif ( $key eq 'comment' ) { $journey->{user_data}{comment} = $value; $rows = $db->update( Loading
lib/Travelynx/Controller/Traveling.pm +12 −0 Original line number Diff line number Diff line Loading @@ -752,6 +752,7 @@ sub edit_journey { my $journey = $self->get_journey( uid => $uid, journey_id => $journey_id, verbose => 1, with_datetime => 1, ); Loading Loading @@ -811,6 +812,15 @@ sub edit_journey { [@route_new] ); } } { my $cancelled_old = $journey->{cancelled}; my $cancelled_new = $self->param('cancelled') // 0; if ( $cancelled_old != $cancelled_new ) { $error = $self->update_journey_part( $db, $journey->{id}, 'cancelled', $cancelled_new ); } } if ( not $error ) { $journey = $self->get_journey( Loading Loading @@ -839,6 +849,8 @@ sub edit_journey { $self->param( route => join( "\n", map { $_->[0] } @{ $journey->{route} } ) ); $self->param( cancelled => $journey->{cancelled} ); for my $key (qw(comment)) { if ( $journey->{user_data} and $journey->{user_data}{$key} ) { $self->param( $key => $journey->{user_data}{$key} ); Loading
templates/edit_journey.html.ep +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ % } </td> </tr> <tr> <th scope="row"></th> <td> <label> %= check_box cancelled => 1 <span>Fahrt ist ausgefallen</span> </label> </td> </tr> <tr> <th scope="row">Geplante Abfahrt</th> <td> Loading
templates/journey.html.ep +6 −2 Original line number Diff line number Diff line Loading @@ -15,11 +15,15 @@ <div class="col s12"> <p> % if ($journey->{cancelled}) { Ausgefallene Fahrt von Ausgefallene Fahrt % } % else { Fahrt von Fahrt % } % if ($journey->{edited} & 0x0020) { ∗ % } von <b><%= $journey->{from_name} %></b> nach <b><%= $journey->{to_name} %></b> Loading