summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller/Wagenreihung.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-28 14:43:04 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-28 14:43:04 +0100
commite42a988a2738e4a079e9277c3bb5a3cbcbfa5395 (patch)
tree883661ce2914e034e46dd0d0f0548048ae200505 /lib/DBInfoscreen/Controller/Wagenreihung.pm
parent2fd6fa502b0a0970614da3fdadf4b15516aab8f9 (diff)
improve display of double decker wagons3.9.1
Diffstat (limited to 'lib/DBInfoscreen/Controller/Wagenreihung.pm')
-rw-r--r--lib/DBInfoscreen/Controller/Wagenreihung.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm
index 9f56ce1..3cc8f39 100644
--- a/lib/DBInfoscreen/Controller/Wagenreihung.pm
+++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm
@@ -236,8 +236,15 @@ sub wagen {
$wref->{wn} = $wagon_no;
$wref->{ws} = $section;
- my $wagon_file
- = "https://lib.finalrewind.org/dbdb/db_wagen/${wagon_id}.png";
+ my @wagon_files
+ = ("https://lib.finalrewind.org/dbdb/db_wagen/${wagon_id}.png");
+
+ if ( $self->app->dbdb_wagon->{"${wagon_id}_u"} ) {
+ @wagon_files = (
+ "https://lib.finalrewind.org/dbdb/db_wagen/${wagon_id}_u.png",
+ "https://lib.finalrewind.org/dbdb/db_wagen/${wagon_id}_l.png"
+ );
+ }
my $title = "Wagen $wagon_id";
@@ -271,10 +278,10 @@ sub wagen {
$self->render(
'wagen',
- title => $title,
- wagon_file => $wagon_file,
- wref => $wref,
- hide_opts => 1,
+ title => $title,
+ wagon_files => [@wagon_files],
+ wref => $wref,
+ hide_opts => 1,
);
}