From da87e97a0b954860e0a53b8a0f475580d44ad73d Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 21 Jun 2025 20:48:53 +0200 Subject: Add bare-bones support for manual checkins (still bound to a specific backend) Extension opportunities (maybe, eventually) * provide datetimes of intermediate stops * provide an API for real-time data updates * look up stops that travelynx does not yet know about rather than rejecting them outright --- templates/add_intransit.html.ep | 87 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 templates/add_intransit.html.ep (limited to 'templates/add_intransit.html.ep') diff --git a/templates/add_intransit.html.ep b/templates/add_intransit.html.ep new file mode 100644 index 0000000..1f3d80d --- /dev/null +++ b/templates/add_intransit.html.ep @@ -0,0 +1,87 @@ +

Manuell einchecken

+% if ($error) { +
+
+
+
+ Ungültige Eingabe +

<%= $error %>

+
+
+
+
+% } +
+
+
    +
  • Eingabe der Fahrt als „Typ Linie Nummer“ oder „Typ Nummer“, z.B. + „ICE 100“, „S 1 31133“ oder „ABR RE11 26720“
  • +
  • Wenn Nummer nicht bekannt oder vorhanden: einen beliebigen Integer eintragen, z.B. „S 5X 0“ oder „U 11 0“
  • +
  • Zeitangaben im Format DD.MM.YYYY HH:MM
  • +
  • Das ausgewählte Backend bestimmt die verfügbaren Halte für Start, Ziel und Route. Siehe auch stops.csv
  • +
+
+
+
+
+ % if (current_user->{backend_id}) { + <%= current_user->{backend_name} %> + % } + % else { + IRIS + % } +
+
+%= form_for '/checkin/add' => (method => 'POST') => begin + %= csrf_field +
+
+ %= text_field 'train', id => 'train', class => 'validate', required => undef, pattern => '[0-9a-zA-Z]+ +[0-9a-zA-Z]* *[0-9]+' + +
+
+
+
+ %= text_field 'dep_station', id => 'dep_station', class => 'autocomplete validate', autocomplete => 'off', required => undef + +
+
+ %= 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]' + +
+
+
+
+ %= text_field 'arr_station', id => 'arr_station', class => 'autocomplete validate', autocomplete => 'off', required => undef + +
+
+ %= 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]' + +
+
+
+
+ %= text_area 'route', id => 'route', class => 'materialize-textarea' + +
+
+
+
+ %= text_field 'comment' + +
+
+
+
+
+
+ +
+
+
+
+%= end -- cgit v1.2.3