summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-12-19 20:16:10 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-12-19 20:16:10 +0100
commite0a2b9aa266e0e42d9224eff3839b1875b211218 (patch)
treefd5167034617270503a256da91a52b3cb7a5b96b /templates
parentb0ddada5d10d414788439d95865e145b231a1b4b (diff)
save all the wagon orders we can get
Diffstat (limited to 'templates')
-rw-r--r--templates/journey.html.ep20
1 files changed, 19 insertions, 1 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep
index 976dc4d..396bc4e 100644
--- a/templates/journey.html.ep
+++ b/templates/journey.html.ep
@@ -188,7 +188,25 @@
% }
</td>
</tr>
- % if ($journey->{user_data} and $journey->{user_data}{wagons}) {
+ % if ($journey->{user_data} and $journey->{user_data}{wagongroups} and not exists $journey->{user_data}{wagons}) {
+ <tr>
+ <th scope="row">Rollmaterial</th>
+ <td class="wagons">
+ % for my $wagongroup (@{$journey->{user_data}{wagongroups} // []}) {
+ Wagenverbund <%= $wagongroup->{name} %> von <%= $wagongroup->{from} %> nach <%= $wagongroup->{to} %> als <%= $journey->{type} %> <%= $wagongroup->{no} %><br/>
+ % for my $wagon (@{$wagongroup->{wagons}}) {
+ <span><%= substr($wagon->{id}, 0, 2) %></span><span><%= substr($wagon->{id}, 2, 2) %></span><span><%= substr($wagon->{id}, 4, 1) %></span><span class="wagonclass"><%= substr($wagon->{id}, 5, 3) %></span><span class="wagonnum"><%= substr($wagon->{id}, 8, 3) %></span><span class="checksum"><%= substr($wagon->{id}, 11) %></span>
+ %= $wagon->{type}
+ % if ($wagon->{number}) {
+ – Wagen <%= $wagon->{number} %>
+ % }
+ <br/>
+ % }
+ % }
+ </td>
+ </tr>
+ % }
+ % elsif ($journey->{user_data} and $journey->{user_data}{wagons}) {
<tr>
<th scope="row">Rollmaterial</th>
<td class="wagons">