2019-04-07 18:20:37 +00:00
|
|
|
<h1>Zugfahrt eingeben</h1>
|
2020-10-17 14:27:53 +00:00
|
|
|
% if (not journeys->get_oldest_ts(uid => current_user->{id})) {
|
2019-04-26 17:53:01 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
2019-05-16 13:02:17 +00:00
|
|
|
<div class="card info-color">
|
2019-04-26 17:53:01 +00:00
|
|
|
<div class="card-content">
|
|
|
|
<span class="card-title">Hinweis</span>
|
|
|
|
<p>travelynx ist darauf ausgelegt, über die Hauptseite in
|
|
|
|
Echtzeit in Züge ein- und auszuchecken. Die manuelle
|
|
|
|
Eingabe von Zugfahrten ist nur als Notlösung vorgesehen.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
% }
|
2019-04-07 18:20:37 +00:00
|
|
|
% if ($error) {
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
2019-05-16 13:02:17 +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>
|
|
|
|
% }
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
|
|
|
<ul>
|
|
|
|
<li>Eingabe des Zugs als „Zug Typ Nummer“ oder „Zug Nummer“, z.B.
|
|
|
|
„ICE 100“, „S 1 31133“ oder „ABR RE11 26720“</li>
|
2019-12-28 14:02:03 +00:00
|
|
|
<li>Wenn Zugnummer nicht bekannt: einen beliebigen Integer eintragen, z.B. "S 5X 0"</li>
|
2019-04-07 18:20:37 +00:00
|
|
|
<li>Zeitangaben im Format DD.MM.YYYY HH:MM</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
%= form_for '/journey/add' => (method => 'POST') => begin
|
|
|
|
%= csrf_field
|
|
|
|
<div class="row">
|
2019-04-26 17:53:01 +00:00
|
|
|
<div class="input-field col s12 m6 l6">
|
2019-04-07 18:20:37 +00:00
|
|
|
%= text_field 'train', id => 'train', class => 'validate', required => undef, pattern => '[0-9a-zA-Z]+ +[0-9a-zA-Z]* *[0-9]+'
|
|
|
|
<label for="train">Zug (Typ Linie Nummer)</label>
|
|
|
|
</div>
|
2019-04-26 17:53:01 +00:00
|
|
|
<div class="input-field col s12 m6 l6">
|
|
|
|
<label>
|
|
|
|
%= check_box cancelled => 1
|
|
|
|
<span>Fahrt ist ausgefallen</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
2019-04-07 18:20:37 +00:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2019-04-13 08:43:05 +00:00
|
|
|
<div class="input-field col s12">
|
2020-10-17 12:18:39 +00:00
|
|
|
%= text_field 'dep_station', id => 'dep_station', class => 'autocomplete validate', autocomplete => 'off', required => undef
|
2019-04-26 17:53:01 +00:00
|
|
|
<label for="dep_station">Start (Name oder DS100)</label>
|
2019-04-13 08:43:05 +00:00
|
|
|
</div>
|
2019-04-07 18:20:37 +00:00
|
|
|
<div class="input-field col s12">
|
|
|
|
%= 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]'
|
|
|
|
<label for="sched_departure">Geplante Abfahrt</label>
|
|
|
|
</div>
|
|
|
|
<div class="input-field col s12">
|
2019-11-18 20:00:24 +00:00
|
|
|
%= text_field 'rt_departure', id => 'rt_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]'
|
|
|
|
<label for="rt_departure">Tatsächliche Abfahrt (wenn leer: pünktlich)</label>
|
2019-04-07 18:20:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2019-04-13 08:43:05 +00:00
|
|
|
<div class="input-field col s12">
|
2020-10-17 12:18:39 +00:00
|
|
|
%= text_field 'arr_station', id => 'arr_station', class => 'autocomplete validate', autocomplete => 'off', required => undef
|
2019-04-26 17:53:01 +00:00
|
|
|
<label for="arr_station">Ziel (Name oder DS100)</label>
|
2019-04-13 08:43:05 +00:00
|
|
|
</div>
|
2019-04-07 18:20:37 +00:00
|
|
|
<div class="input-field col s12">
|
|
|
|
%= 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]'
|
|
|
|
<label for="sched_arrival">Geplante Ankunft</label>
|
|
|
|
</div>
|
|
|
|
<div class="input-field col s12">
|
2019-11-18 20:00:24 +00:00
|
|
|
%= text_field 'rt_arrival', id => 'rt_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]'
|
|
|
|
<label for="rt_arrival">Tatsächliche Ankunft (wenn leer: pünktlich)</label>
|
2019-04-26 17:53:01 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-11-19 18:46:21 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s12">
|
|
|
|
%= text_area 'route', id => 'route', class => 'materialize-textarea'
|
|
|
|
<label for="route">Unterwegshalte (optional, eine Station pro Zeile, DS100 möglich)</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-04-26 17:53:01 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s12">
|
|
|
|
%= text_field 'comment'
|
|
|
|
<label for="comment">Kommentar</label>
|
2019-04-07 18:20:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s3 m3 l3">
|
|
|
|
</div>
|
|
|
|
<div class="col s6 m6 l6 center-align">
|
|
|
|
<button class="btn waves-effect waves-light" type="submit" name="action" value="save">
|
|
|
|
Hinzufügen
|
|
|
|
<i class="material-icons right">send</i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="col s3 m3 l3">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
%= end
|