diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-19 10:32:57 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-19 10:32:57 +0200 |
commit | d9d3aac79200ca7d896d753c897e1651517ecf36 (patch) | |
tree | 87194b7a8b67b7b09bd2dc357e5239099dd60430 /templates/_connections.html.ep | |
parent | 7960114f71720f2c2fa86e74be4b80812edaef36 (diff) |
allow checkin from connections view
Diffstat (limited to 'templates/_connections.html.ep')
-rw-r--r-- | templates/_connections.html.ep | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep new file mode 100644 index 0000000..1c7f003 --- /dev/null +++ b/templates/_connections.html.ep @@ -0,0 +1,60 @@ +<span class="card-title" style="margin-top: 2ex;">Verbindungen</span> +% if ($checkin_from) { + <p>Zug auswählen zum Einchecken mit Zielwahl.</p> +% } +<div class="hide-on-med-and-up"><table><tbody> + % for my $res (@{$connections}) { + % my ($train, $via) = @{$res}; + <tr> + <td> + % if ($checkin_from) { + <a class="action-checkin" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a> + % } + % else { + %= $train->line + % } + </td> + <td> + % if ($checkin_from) { + <a class="action-checkin" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a> + % } + % else { + %= $via + % } + </td> + <td><%= $train->departure->strftime('%H:%M') %> + % if ($train->departure_delay) { + %= sprintf('(%+d)', $train->departure_delay) + % } + <br/>Gleis <%= $train->platform %></td> + </tr> + % } +</tbody></table></div> +<div class="hide-on-small-only"><table><tbody> + % for my $res (@{$connections}) { + % my ($train, $via) = @{$res}; + <tr> + <td> + % if ($checkin_from) { + <a class="action-checkin" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a> + % } + % else { + %= $train->line + % } + </td> + <td> + % if ($checkin_from) { + <a class="action-checkin" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a> + % } + % else { + %= $via + % } + </td> + <td><%= $train->departure->strftime('%H:%M') %> + % if ($train->departure_delay) { + %= sprintf('(%+d)', $train->departure_delay) + % } + </td><td>Gleis <%= $train->platform %></td> + </tr> + % } +</tbody></table></div> |