Stadt (Pflichtfeld für EFA-Backends, sonst optional)
% if (stash('place_candidates') and @{ stash('place_candidates') } ) {
% my @candidates = map { [ $_, $_ ] } @{ stash('place_candidates') };
%= select_field city => \@candidates
% }
% else {
%= text_field 'city'
% }
Haltestelle
% if (stash('name_candidates') and @{ stash('name_candidates') } ) {
% my @candidates = map { [ $_, $_ ] } @{ stash('name_candidates') };
%= select_field stop => \@candidates
% }
% else {
%= text_field 'stop'
% }
%= submit_button 'Anzeigen'
optional:
Frontend
% if ($self->browser->mobile) {
%= select_field frontend => [['App / Infoscreen' => 'infoscreen'], ['LED-Tafel (PNG)' => 'png'], ['LED-Tafel (HTML)' => 'html'], ['JSON' => 'json']]
% }
% else {
%= select_field frontend => [['LED-Tafel (PNG)' => 'png'], ['LED-Tafel (HTML)' => 'html'], ['App / Infoscreen' => 'infoscreen'], ['JSON' => 'json']]
% }
Backend
% my @efa_backends = map { ["$_ (EFA)" => "efa.$_"] } efa_service_list();
% @efa_backends = map { $_->[1] } sort { $a->[0] cmp $b->[0] }
% map { [$_->[0], $_] } @efa_backends;
% my @hafas_backends = map { ["$_ (HAFAS)" => "hafas.$_"] } hafas_service_list();
% @hafas_backends = map { $_->[1] } sort { $a->[0] cmp $b->[0] }
% map { [$_->[0], $_] } @hafas_backends;
% my @ura_backends = map { ["$_ (URA)" => "ura.$_"] } ura_service_list();
% @ura_backends = map { $_->[1] } sort { $a->[0] cmp $b->[0] }
% map { [$_->[0], $_] } @ura_backends;
%= select_field backend => [['EFA / VRR' => 'vrr'], @efa_backends, @hafas_backends, @ura_backends]
Höhe der Abfahrtstafel in Zeilen
%= number_field 'no_lines', min => 1, max => 10
Mindestoffset der angezeigten Abfahrten in Minuten
%= number_field 'offset', min => 0
Linien/Typen¹
%= text_field 'line'
Bahnsteige¹
%= text_field 'platform'