diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-01-12 13:56:23 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-01-12 13:56:23 +0100 |
commit | 70d838bb0825cf5a7fa8dcc2eb4e712001da2c1d (patch) | |
tree | be501b2a011a164e8d99f06d89abc99b19127aea /templates/app.html.ep | |
parent | 7e4727af603cdd8bbb3746842a9603054ddca7cb (diff) |
support linking to individual trains1.15
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r-- | templates/app.html.ep | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep index 8c7d079..5c511ce 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -71,7 +71,8 @@ % } </div> % } - <div class="moreinfo collapsed-moreinfo"> + <div class="moreinfo collapsed-moreinfo" + data-train="<%= ($departure->{train_type} // 'none') . ($departure->{train_no} // 0) %>"> <div class="mheader"> <div> % if ($departure->{train_no} or $departure->{train_line}) { @@ -164,18 +165,20 @@ % if ($first++) { <span class="separator">–</span> % } + <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" % if ($stop->{isAdditional}) { - <span class="additional-stop"><%= $stop->{name} %></span> + additional-stop % } % elsif ($stop->{isCancelled}) { - <span class="cancelled-stop"><%= $stop->{name} %></span> + cancelled-stop % } % elsif ($self->is_important($stop->{name})) { - <span class="important-stop"><%= $stop->{name} %></span> + important-stop % } % else { - <span class="generic-stop"><%= $stop->{name} %></span> + generic-stop % } + "><%= $stop->{name} %></a> % } </div> <!-- mroute --> % } |