summaryrefslogtreecommitdiff
path: root/templates/add_journey.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/add_journey.html.ep')
-rw-r--r--templates/add_journey.html.ep57
1 files changed, 37 insertions, 20 deletions
diff --git a/templates/add_journey.html.ep b/templates/add_journey.html.ep
index c3bc01c..94f9270 100644
--- a/templates/add_journey.html.ep
+++ b/templates/add_journey.html.ep
@@ -1,13 +1,15 @@
-<h1>Zugfahrt eingeben</h1>
-% if (not get_oldest_journey_ts()) {
+<h1>Fahrt eingeben</h1>
+% if (not journeys->get_oldest_ts(uid => current_user->{id})) {
<div class="row">
<div class="col s12">
<div class="card info-color">
<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>
+ Echtzeit in Verkehrsmittel ein- und auszuchecken. Die manuelle
+ Eingabe von Fahrten ist nur als Notlösung vorgesehen.
+ Hier werden derzeit nur Zugfahrten im DB-Netz
+ (IRIS-Backend) unterstützt.</p>
</div>
</div>
</div>
@@ -28,18 +30,31 @@
<div class="row">
<div class="col s12">
<ul>
- <li>Eingabe des Zugs als „Zug Typ Nummer“ oder „Zug Nummer“, z.B.
+ <li>Eingabe der Fahrt als „Typ Linie Nummer“ oder „Typ Nummer“, z.B.
„ICE 100“, „S 1 31133“ oder „ABR RE11 26720“</li>
- <li>Zeitangaben im Format DD.MM.YYYY HH:MM</li>
+ <li>Wenn Nummer nicht bekannt oder vorhanden: einen beliebigen Integer eintragen, z.B. „S 5X 0“ oder „U 11 0“</li>
+ <li>Zeitangaben im Format YYYY-MM-DDTHH:MM</li>
+ <li>Das ausgewählte Backend bestimmt die verfügbaren Halte für Start, Ziel und Route. Siehe auch <a href="/static/stops.csv">stops.csv</a></li>
</ul>
</div>
</div>
+<div class="row">
+ <div class="col s12 center-align">
+ % my $self_link = url_for('add_journey');
+ % if (current_user->{backend_id}) {
+ <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= current_user->{backend_name} %></a>
+ % }
+ % else {
+ <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">train</i>IRIS</a>
+ % }
+ </div>
+</div>
%= form_for '/journey/add' => (method => 'POST') => begin
%= csrf_field
<div class="row">
<div class="input-field col s12 m6 l6">
%= 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>
+ <label for="train">Fahrt (Typ Linie Nummer)</label>
</div>
<div class="input-field col s12 m6 l6">
<label>
@@ -50,36 +65,38 @@
</div>
<div class="row">
<div class="input-field col s12">
- %= text_field 'dep_station', id => 'dep_station', class => 'autocomplete validate', required => undef
- <label for="dep_station">Start (Name oder DS100)</label>
+ %= text_field 'dep_station', id => 'dep_station', class => 'autocomplete validate', autocomplete => 'off', required => undef
+ <label for="dep_station">Start (Name oder ID)</label>
</div>
<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>
+ %= datetime_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef
+ <label for="sched_departure" class="active">Geplante Abfahrt</label>
</div>
<div class="input-field col s12">
- %= 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>
+ %= datetime_field 'rt_departure', id => 'rt_departure', class => 'validate'
+ <label for="rt_departure" class="active">Tatsächliche Abfahrt (wenn leer: pünktlich)</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
- %= text_field 'arr_station', id => 'arr_station', class => 'autocomplete validate', required => undef
- <label for="arr_station">Ziel (Name oder DS100)</label>
+ %= text_field 'arr_station', id => 'arr_station', class => 'autocomplete validate', autocomplete => 'off', required => undef
+ <label for="arr_station">Ziel (Name oder ID)</label>
</div>
<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>
+ %= datetime_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef
+ <label for="sched_arrival" class="active">Geplante Ankunft</label>
</div>
<div class="input-field col s12">
- %= 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>
+ %= datetime_field 'rt_arrival', id => 'rt_arrival', class => 'validate'
+ <label for="rt_arrival" class="active">Tatsächliche Ankunft (wenn leer: pünktlich)</label>
</div>
</div>
<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>
+ <label for="route">Halte (optional)</label><br/>
+ Eine Station pro Zeile, wahlweise Unterwegshalte oder komplette Route<br/>
+ Format: <i>Name</i> oder <i>Name</i> @ <i>Zeitpunkt</i> (inkl. Datum, siehe oben)
</div>
</div>
<div class="row">