2019-04-08 19:20:04 +00:00
|
|
|
<h1>Zugfahrt bearbeiten</h1>
|
2019-04-07 18:20:37 +00:00
|
|
|
% if ($error and $error eq 'notfound') {
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
2019-05-16 14:10:53 +00:00
|
|
|
<div class="card caution-color">
|
2019-04-07 18:20:37 +00:00
|
|
|
<div class="card-content white-text">
|
|
|
|
<span class="card-title">Fehler</span>
|
|
|
|
<p>Zugfahrt nicht gefunden.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
% }
|
|
|
|
% else {
|
|
|
|
% if ($error) {
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
2019-05-16 14:10:53 +00:00
|
|
|
<div class="card caution-color">
|
2019-04-07 18:20:37 +00:00
|
|
|
<div class="card-content white-text">
|
|
|
|
<span class="card-title">Ungültige Eingabe</span>
|
|
|
|
<p><%= $error %></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
% }
|
|
|
|
%= form_for '/journey/edit' => (method => 'POST') => begin
|
|
|
|
%= csrf_field
|
2019-04-08 19:20:04 +00:00
|
|
|
%= hidden_field 'journey_id' => param('journey_id')
|
2019-04-07 18:20:37 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
|
|
|
<p>
|
|
|
|
Fahrt von
|
|
|
|
<b><%= $journey->{from_name} %></b>
|
|
|
|
nach
|
|
|
|
<b><%= $journey->{to_name} %></b>
|
|
|
|
am
|
|
|
|
<b><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></b>
|
|
|
|
</p>
|
2019-04-08 19:20:04 +00:00
|
|
|
<p>
|
|
|
|
Nach einer Änderung können die ursprünglich eingetragenen
|
|
|
|
Zeiten nicht mehr wiederhergestellt werden.
|
|
|
|
</p>
|
2019-04-07 18:20:37 +00:00
|
|
|
<table class="striped">
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Zug</th>
|
|
|
|
<td>
|
|
|
|
<%= $journey->{type} %> <%= $journey->{no} %>
|
|
|
|
% if ($journey->{line}) {
|
|
|
|
(Linie <%= $journey->{line} %>)
|
|
|
|
% }
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Geplante Abfahrt</th>
|
|
|
|
<td>
|
|
|
|
%= text_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef, pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]'
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Tatsächliche Abfahrt</th>
|
|
|
|
<td>
|
|
|
|
%= text_field 'rt_departure', id => 'real_departure', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]'
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Geplante Ankunft</th>
|
|
|
|
<td>
|
|
|
|
%= text_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef, pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]'
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Tatsächliche Ankunft</th>
|
|
|
|
<td>
|
|
|
|
%= text_field 'rt_arrival', id => 'real_arrival', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]'
|
|
|
|
</td>
|
|
|
|
</tr>
|
2019-08-23 10:02:22 +00:00
|
|
|
<tr>
|
|
|
|
<th scope="row">Kommentar</th>
|
|
|
|
<td>
|
|
|
|
%= text_field 'comment'
|
|
|
|
</td>
|
|
|
|
</tr>
|
2019-04-07 18:20:37 +00:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2019-04-08 19:20:04 +00:00
|
|
|
<div class="col s6 m6 l6 center-align">
|
2019-04-23 16:08:07 +00:00
|
|
|
<a href="/journey/<%= param('journey_id') %>" class="waves-effect waves-light btn">
|
2019-04-08 19:20:04 +00:00
|
|
|
Abbrechen
|
2019-04-13 08:45:57 +00:00
|
|
|
</a>
|
2019-04-07 18:20:37 +00:00
|
|
|
</div>
|
|
|
|
<div class="col s6 m6 l6 center-align">
|
|
|
|
<button class="btn waves-effect waves-light" type="submit" name="action" value="save">
|
|
|
|
Speichern
|
|
|
|
<i class="material-icons right">send</i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
%= end
|
|
|
|
% }
|