summaryrefslogtreecommitdiff
path: root/templates/departures.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-09-02 21:41:33 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-09-02 21:41:33 +0200
commit21643b053d8d4097f7bb51463a1562738b82892d (patch)
tree11e14803406243805d27119f32dae596713e0068 /templates/departures.html.ep
Initial commit
Diffstat (limited to 'templates/departures.html.ep')
-rw-r--r--templates/departures.html.ep49
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/departures.html.ep b/templates/departures.html.ep
new file mode 100644
index 0000000..bbe0149
--- /dev/null
+++ b/templates/departures.html.ep
@@ -0,0 +1,49 @@
+<div class="row">
+ <div class="col s12">
+ % my $status = $self->get_user_status;
+ % if ($status->{checked_in}) {
+ <div class="card grey darken-4">
+ <div class="card-content white-text">
+ <span class="card-title">Aktuell eingecheckt</span>
+ <p>In <%= $status->{train_type} %> <%= $status->{train_no} %>
+ ab <%= $status->{station_name} %></p>
+ </div>
+ <div class="card-action">
+ <a href="/a/checkout?station=<%= $ds100 %>">Hier auschecken</a>
+ </div>
+ </div>
+ % }
+ </div>
+</div>
+<div class="row">
+ <table class="striped">
+ <thead>
+ <tr>
+ <th>Zug</th>
+ <th></th>
+ <th>Abfahrt</th>
+ </tr>
+ </thead>
+ <tbody>
+ % for my $result (@{$results}) {
+ <tr>
+ <td>
+ <a href="/a/checkin?station=<%= $ds100 %>&amp;train=<%= $result->train_id %>" title="Check In">
+ <%= $result->line %>
+ </a>
+ </td>
+ <td>
+ <a href="/a/checkin?station=<%= $ds100 %>&amp;train=<%= $result->train_id %>" title="Check In">
+ <%= $result->destination %>
+ </a>
+ </td>
+ <td><%= $result->departure->strftime('%H:%M') %>
+ % if ($result->departure_delay) {
+ (+<%= $result->departure_delay %>)
+ % }
+ </td>
+ </tr>
+ % }
+ </tbody>
+ </table>
+</div>