diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-12-28 14:43:04 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-12-28 14:43:04 +0100 |
commit | e42a988a2738e4a079e9277c3bb5a3cbcbfa5395 (patch) | |
tree | 883661ce2914e034e46dd0d0f0548048ae200505 /lib/DBInfoscreen/Controller | |
parent | 2fd6fa502b0a0970614da3fdadf4b15516aab8f9 (diff) |
improve display of double decker wagons3.9.1
Diffstat (limited to 'lib/DBInfoscreen/Controller')
-rw-r--r-- | lib/DBInfoscreen/Controller/Wagenreihung.pm | 19 |
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, ); } |