diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/_wagon.html.ep | 11 | ||||
| -rw-r--r-- | templates/layouts/app.html.ep | 2 | ||||
| -rw-r--r-- | templates/layouts/legacy.html.ep | 2 | ||||
| -rw-r--r-- | templates/wagen.html.ep | 17 | ||||
| -rw-r--r-- | templates/wagenreihung.html.ep | 2 | ||||
| -rw-r--r-- | templates/zugbildung_db.html.ep | 2 | 
6 files changed, 29 insertions, 7 deletions
| diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep index 95b1c2e..a9221bd 100644 --- a/templates/_wagon.html.ep +++ b/templates/_wagon.html.ep @@ -50,9 +50,14 @@    </div>    <div class="details" style="    top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> -    <span class="type"> -%=    $wagon->type -    </span> +%   if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) { +      <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&s=<%= $wagon->section %>&r=<%= $wref %>"><%= $wagon->type %></a> +%   } +%   else { +      <span class="type"> +%=      $wagon->type +      </span> +%   }  %   my $uic_id = $wagon->uic_id;  %   if (length($uic_id) != 12) {        <span class="uicunknown"><%= $uic_id %></span> diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index e45a4dd..b776d21 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@  	<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>  % } -	% my $av = 'v42'; # asset version +	% my $av = 'v43'; # asset version  	% if (session('theme') and session('theme') eq 'dark' or param('dark')) {  		%= stylesheet "/static/${av}/css/dark.min.css", id => 'theme'  	% } diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index 1ea4b67..a861488 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@  	<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>  % } -	% my $av = 'v42'; # asset version +	% my $av = 'v43'; # asset version  	%= stylesheet "/static/${av}/css/default.css"  	%= stylesheet "/static/${av}/css/material-icons.css"  	%= stylesheet "/static/${av}/css/jquery-ui.min.css" diff --git a/templates/wagen.html.ep b/templates/wagen.html.ep new file mode 100644 index 0000000..49a7274 --- /dev/null +++ b/templates/wagen.html.ep @@ -0,0 +1,17 @@ +<div class="container"> +	<div> +		<a href="<%= $wagon_file %>"><img src="<%= $wagon_file %>" style="width: 100%;"></a> +	</div> +	<p> +		% if ($wref->{s} and $wref->{p} and $wref->{ws}) { +			Position in <%= $wref->{s} %>: Gleis <%= $wref->{p} %> Abschnitt <%= $wref->{ws} %> +		% } +		% elsif ($wref->{s} and $wref->{p}) { +			<%= $wref->{s} %> Gleis <%= $wref->{p} %> +		% } +	</p> +	<p class="copyright"> +		Abbildung © Seemanngrafik d.i.p. im Auftrag der Deutschen Bahn AG, +		lizensiert unter CC-BY-4.0 +	</p> +</div> diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index 512c30c..38987a9 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -60,7 +60,7 @@  %       }  %     }  %     for my $wagon ($wr->wagons) { -%=      include '_wagon', direction => $wr->direction, wagon => $wagon; +%=      include '_wagon', direction => $wr->direction, wagon => $wagon, type => $wr->train_subtype // 'IC', wref => $wref;  %     }        </div>  <!--  <div> diff --git a/templates/zugbildung_db.html.ep b/templates/zugbildung_db.html.ep index 0eb43e3..096ac0b 100644 --- a/templates/zugbildung_db.html.ep +++ b/templates/zugbildung_db.html.ep @@ -13,7 +13,7 @@  <div class="container">    <div class="wagonorder">  %   for my $wagon (@{$wagons // []}) { -%=    include '_wagon', direction => undef, wagon => $wagon; +%=    include '_wagon', direction => undef, wagon => $wagon, type => $zb->{type}, wref => '';  %   }      </div>      <div> | 
