summaryrefslogtreecommitdiff
path: root/templates/_connections.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/_connections.html.ep')
-rw-r--r--templates/_connections.html.ep60
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>