diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/departures.html.ep | 14 | ||||
-rw-r--r-- | templates/landingpage.html.ep | 27 | ||||
-rw-r--r-- | templates/layouts/default.html.ep | 2 |
3 files changed, 36 insertions, 7 deletions
diff --git a/templates/departures.html.ep b/templates/departures.html.ep index ee87496..47c4872 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -52,22 +52,24 @@ </thead> <tbody> % for my $result (@{$results}) { - % my $class = ""; + % my $td_class = ''; + % my $link_class = 'action-checkin'; % if ($result->departure_is_cancelled) { - % $class = "cancelled"; + % $td_class = "cancelled"; + % $link_class = 'action-cancelled-from'; % } <tr> <td> - <a class="action-checkin" data-station="<%= $ds100 %>" data-train="<%= $result->train_id %>"> + <a class="<%= $link_class %>" data-station="<%= $ds100 %>" data-train="<%= $result->train_id %>"> <%= $result->line %> </a> </td> - <td class="<%= $class %>"> - <a class="action-checkin" data-station="<%= $ds100 %>" data-train="<%= $result->train_id %>"> + <td class="<%= $td_class %>"> + <a class="<%= $link_class %>" data-station="<%= $ds100 %>" data-train="<%= $result->train_id %>"> <%= $result->destination %> </a> </td> - <td class="<%= $class %>"><%= $result->departure->strftime('%H:%M') %> + <td class="<%= $td_class %>"><%= $result->departure->strftime('%H:%M') %> % if ($result->departure_delay) { (+<%= $result->departure_delay %>) % } diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index dcc0083..83ad2a1 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -37,6 +37,33 @@ </div> </div> % } + % elsif ($status->{cancelled}) { + <div class="card yellow lighten-4"> + <div class="card-content"> + <span class="card-title">Zugausfall dokumentieren</span> + <p>Prinzipiell wärest du nun eingecheckt in + <%= $status->{train_type} %> <%= $status->{train_no} %> + ab <%= $status->{station_name} %>, doch dieser Zug fällt aus. + % if ($status->{timestamp_delta} < 3600) { + <a class="action-undo"><i class="material-icons">undo</i> Checkinversuch rückgängig</a> + % } + </p> + <p>Falls du den Zugausfall z.B. für ein Fahrgastrechteformular + dokumentieren möchtest, wähle bitte jetzt deine geplante + Zielstation aus. Achtung: Momentan wird dabei keine + Soll-Ankunftszeit gespeichert, das zu beheben steht auf + der Todoliste.</p> + <table> + <tbody> + % my $is_after = 0; + % for my $station (@{$status->{route_after}}) { + <tr><td><a class="action-cancelled-to" data-station="<%= $station %>"><%= $station %></a></td></tr> + % } + </tbody> + </table> + </div> + </div> + % } % else { <div class="card grey darken-4"> <div class="card-content white-text"> diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 8f5bdc2..2589788 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -5,7 +5,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="theme-color" content="#673ab7"> - % my $av = 'v3'; # asset version + % my $av = 'v4'; # asset version %= stylesheet "/static/${av}/css/materialize.min.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/local.css" |