Loading lib/Travelynx.pm +3 −1 Original line number Diff line number Diff line Loading @@ -3157,7 +3157,9 @@ sub startup { $authed_r->get('/journey/add')->to('traveling#add_journey_form'); $authed_r->get('/journey/comment')->to('traveling#comment_form'); $authed_r->get('/journey/visibility')->to('traveling#visibility_form'); $authed_r->get('/journey/:id')->to('traveling#journey_details'); $authed_r->get( '/journey/:id' => [ format => [ 'html', 'json' ] ] ) ->to( 'traveling#journey_details', format => undef ) ->name('journey'); $authed_r->get('/s/*station')->to('traveling#station'); $authed_r->get('/confirm_mail/:token')->to('account#confirm_mail'); $authed_r->post('/account/privacy')->to('account#privacy'); Loading lib/Travelynx/Controller/Traveling.pm +41 −25 Original line number Diff line number Diff line Loading @@ -2121,11 +2121,17 @@ sub journey_details { $self->param( journey_id => $journey_id ); if ( not( $journey_id and $journey_id =~ m{ ^ \d+ $ }x ) ) { $self->render( 'journey', $self->respond_to( json => { json => { error => 'not found' }, status => 404 }, any => { template => 'journey', status => 404, error => 'notfound', journey => {} } ); return; } Loading Loading @@ -2178,11 +2184,14 @@ sub journey_details { $delay, $journey->{rt_arrival}->strftime('%H:%M') ); } $self->render( 'journey', $self->respond_to( json => { json => $journey }, any => { template => 'journey', title => sprintf( 'travelynx: Fahrt %s %s %s am %s', $journey->{type}, $journey->{line} // '', $journey->{type}, $journey->{line} // '', $journey->{no}, $journey->{sched_departure}->strftime('%d.%m.%Y um %H:%M') ), Loading @@ -2193,14 +2202,21 @@ sub journey_details { with_share => $with_share, share_text => $share_text, %{$map_data}, } ); } else { $self->render( 'journey', $self->respond_to( json => { json => { error => 'not found' }, status => 404 }, any => { template => 'journey', status => 404, error => 'notfound', journey => {} } ); } Loading share/locales/de_DE.po +3 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,9 @@ msgstr "Route" msgid "journey.share" msgstr "Teilen" msgid "journey.export" msgstr "Exportieren" msgid "journey.edit" msgstr "Bearbeiten" Loading share/locales/en_GB.po +3 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,9 @@ msgstr "Route" msgid "journey.share" msgstr "Share" msgid "journey.export" msgstr "Export" msgid "journey.edit" msgstr "Edit" Loading templates/journey.html.ep +10 −0 Original line number Diff line number Diff line Loading @@ -335,6 +335,16 @@ </div> </div> % } <div class="row"> <div class="col s12 m6 l6"> </div> <div class="col s12 m6 l6 center-align"> <a class="btn waves-effect waves-light" href="<%= url_for('journey', id => $journey->{id}, format => 'json' ) %>"> <i class="material-icons left" aria-hidden="true">file_download</i> %= L('journey.export') </a> </div> </div> <div class="row hide-on-small-only"> <div class="col s12 m6 l6 center-align"> <a class="waves-effect waves-light red btn action-delete" Loading Loading
lib/Travelynx.pm +3 −1 Original line number Diff line number Diff line Loading @@ -3157,7 +3157,9 @@ sub startup { $authed_r->get('/journey/add')->to('traveling#add_journey_form'); $authed_r->get('/journey/comment')->to('traveling#comment_form'); $authed_r->get('/journey/visibility')->to('traveling#visibility_form'); $authed_r->get('/journey/:id')->to('traveling#journey_details'); $authed_r->get( '/journey/:id' => [ format => [ 'html', 'json' ] ] ) ->to( 'traveling#journey_details', format => undef ) ->name('journey'); $authed_r->get('/s/*station')->to('traveling#station'); $authed_r->get('/confirm_mail/:token')->to('account#confirm_mail'); $authed_r->post('/account/privacy')->to('account#privacy'); Loading
lib/Travelynx/Controller/Traveling.pm +41 −25 Original line number Diff line number Diff line Loading @@ -2121,11 +2121,17 @@ sub journey_details { $self->param( journey_id => $journey_id ); if ( not( $journey_id and $journey_id =~ m{ ^ \d+ $ }x ) ) { $self->render( 'journey', $self->respond_to( json => { json => { error => 'not found' }, status => 404 }, any => { template => 'journey', status => 404, error => 'notfound', journey => {} } ); return; } Loading Loading @@ -2178,11 +2184,14 @@ sub journey_details { $delay, $journey->{rt_arrival}->strftime('%H:%M') ); } $self->render( 'journey', $self->respond_to( json => { json => $journey }, any => { template => 'journey', title => sprintf( 'travelynx: Fahrt %s %s %s am %s', $journey->{type}, $journey->{line} // '', $journey->{type}, $journey->{line} // '', $journey->{no}, $journey->{sched_departure}->strftime('%d.%m.%Y um %H:%M') ), Loading @@ -2193,14 +2202,21 @@ sub journey_details { with_share => $with_share, share_text => $share_text, %{$map_data}, } ); } else { $self->render( 'journey', $self->respond_to( json => { json => { error => 'not found' }, status => 404 }, any => { template => 'journey', status => 404, error => 'notfound', journey => {} } ); } Loading
share/locales/de_DE.po +3 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,9 @@ msgstr "Route" msgid "journey.share" msgstr "Teilen" msgid "journey.export" msgstr "Exportieren" msgid "journey.edit" msgstr "Bearbeiten" Loading
share/locales/en_GB.po +3 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,9 @@ msgstr "Route" msgid "journey.share" msgstr "Share" msgid "journey.export" msgstr "Export" msgid "journey.edit" msgstr "Edit" Loading
templates/journey.html.ep +10 −0 Original line number Diff line number Diff line Loading @@ -335,6 +335,16 @@ </div> </div> % } <div class="row"> <div class="col s12 m6 l6"> </div> <div class="col s12 m6 l6 center-align"> <a class="btn waves-effect waves-light" href="<%= url_for('journey', id => $journey->{id}, format => 'json' ) %>"> <i class="material-icons left" aria-hidden="true">file_download</i> %= L('journey.export') </a> </div> </div> <div class="row hide-on-small-only"> <div class="col s12 m6 l6 center-align"> <a class="waves-effect waves-light red btn action-delete" Loading