diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/add_intransit.html.ep | 12 | ||||
-rw-r--r-- | templates/add_journey.html.ep | 18 | ||||
-rw-r--r-- | templates/edit_journey.html.ep | 8 | ||||
-rw-r--r-- | templates/history_by_month.html.ep | 2 | ||||
-rw-r--r-- | templates/history_by_year.html.ep | 4 | ||||
-rw-r--r-- | templates/history_map.html.ep | 8 |
6 files changed, 26 insertions, 26 deletions
diff --git a/templates/add_intransit.html.ep b/templates/add_intransit.html.ep index 9d711c9..a044917 100644 --- a/templates/add_intransit.html.ep +++ b/templates/add_intransit.html.ep @@ -21,7 +21,7 @@ <li>Eingabe der Fahrt als „Typ Linie Nummer“ oder „Typ Nummer“, z.B. „ICE 100“, „S 1 31133“ oder „ABR RE11 26720“</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 DD.MM.YYYY HH:MM</li> + <li>Zeitangaben im Format YYYY-MM-DDTHH:MM. Bei den Zwischenhalten kann auch nur HH:MM angegeben werden</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> @@ -50,8 +50,8 @@ <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> <div class="row"> @@ -60,8 +60,8 @@ <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> <div class="row"> @@ -69,7 +69,7 @@ %= text_area 'route', id => 'route', class => 'materialize-textarea' <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) + Format: <i>Name</i> oder <i>Name</i> @ <i>Zeitpunkt</i> (Format siehe oben, ein ggf. ausgelassenes Datum wird ergänzt) </div> </div> <div class="row"> diff --git a/templates/add_journey.html.ep b/templates/add_journey.html.ep index cade37e..94f9270 100644 --- a/templates/add_journey.html.ep +++ b/templates/add_journey.html.ep @@ -33,7 +33,7 @@ <li>Eingabe der Fahrt als „Typ Linie Nummer“ oder „Typ Nummer“, z.B. „ICE 100“, „S 1 31133“ oder „ABR RE11 26720“</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 DD.MM.YYYY HH:MM</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> @@ -69,12 +69,12 @@ <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"> @@ -83,12 +83,12 @@ <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"> diff --git a/templates/edit_journey.html.ep b/templates/edit_journey.html.ep index cb867e5..6316731 100644 --- a/templates/edit_journey.html.ep +++ b/templates/edit_journey.html.ep @@ -69,13 +69,13 @@ <tr> <th scope="row">Geplante Abfahrt</th> <td class="input-field"> - %= 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]' + %= datetime_field 'sched_departure', id => 'sched_departure', class => 'validate', required => undef </td> </tr> <tr> <th scope="row">Tatsächliche Abfahrt</th> <td class="input-field"> - %= 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]' + %= datetime_field 'rt_departure', id => 'real_departure', class => 'validate' </td> </tr> <tr> @@ -87,13 +87,13 @@ <tr> <th scope="row">Geplante Ankunft</th> <td class="input-field"> - %= 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]' + %= datetime_field 'sched_arrival', id => 'sched_arrival', class => 'validate', required => undef </td> </tr> <tr> <th scope="row">Tatsächliche Ankunft</th> <td class="input-field"> - %= 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]' + %= datetime_field 'rt_arrival', id => 'real_arrival', class => 'validate' </td> </tr> <tr> diff --git a/templates/history_by_month.html.ep b/templates/history_by_month.html.ep index c3b1004..dec4c8b 100644 --- a/templates/history_by_month.html.ep +++ b/templates/history_by_month.html.ep @@ -6,7 +6,7 @@ <div class="row"> <div class="col s12 m12 l12 center-align"> - <a href="/history/map?filter_from=<%= $filter_from->strftime('%d.%m.%Y') %>&filter_to=<%= $filter_to->strftime('%d.%m.%Y') %>" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> + <a href="/history/map?filter_from=<%= $filter_from->strftime('%F') %>&filter_to=<%= $filter_to->strftime('%F') %>" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> </div> </div> diff --git a/templates/history_by_year.html.ep b/templates/history_by_year.html.ep index 6aa0c2d..1557b77 100644 --- a/templates/history_by_year.html.ep +++ b/templates/history_by_year.html.ep @@ -7,7 +7,7 @@ <div class="row"> % if (stash('have_review')) { <div class="col s12 m12 l5 center-align"> - <a href="/history/map?filter_from=1.1.<%= $year %>&filter_to=31.12.<%= $year %>" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> + <a href="/history/map?filter_from=<%= $year %>-01-01&filter_to=<%= $year %>-12-31" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> </div> <div class="col s12 m12 l2"> </div> <div class="col s12 m12 l5 center-align"> @@ -16,7 +16,7 @@ % } % else { <div class="col s12 m12 l12 center-align"> - <a href="/history/map?filter_from=1.1.<%= $year %>&filter_to=31.12.<%= $year %>" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> + <a href="/history/map?filter_from=<%= $year %>-01-01&filter_to=<%= $year %>-12-31" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a> </div> % } </div> diff --git a/templates/history_map.html.ep b/templates/history_map.html.ep index c2ff9ed..6620cb2 100644 --- a/templates/history_map.html.ep +++ b/templates/history_map.html.ep @@ -88,14 +88,14 @@ </p> <div class="row"> <div class="input-field col s12"> - %= text_field 'filter_from', id => 'filter_from', 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="filter_from">Abfahrt ab (DD.MM.YYYY)</label> + %= date_field 'filter_from', id => 'filter_from', class => 'validate' + <label for="filter_from" class="active">Abfahrt ab</label> </div> </div> <div class="row"> <div class="input-field col s12"> - %= text_field 'filter_to', id => 'filter_to', 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="filter_to">Abfahrt bis (DD.MM.YYYY)</label> + %= date_field 'filter_to', id => 'filter_to', class => 'validate' + <label for="filter_to" class="active">Abfahrt bis</label> </div> </div> <div class="row"> |