Unverified Commit d854bdd7 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

wagenreihung: only show trai no / direction if it has changed

parent 11aa875f
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -87,6 +87,17 @@
%     }
%   }
%   if ($multi and defined $wagon->group_index and (not defined $prev_gi or $wagon->group_index != $prev_gi)) {
      <br/><span class="groupno"><%= $wr->train_type %> <%= ($wr->groups)[$wagon->group_index]->train_no %> → <%= $wr->{data}{istformation}{allFahrzeuggruppe}[$wagon->group_index]{zielbetriebsstellename} %></span> <span class="grouptype"><%= ($wr->train_descriptions)[$wagon->group_index]{short} %></span>
      <br/>
      <span class="groupno">
%       if (scalar $wr->train_nos > 1) {
          <%= $wr->train_type %> <%= ($wr->groups)[$wagon->group_index]->train_no %>
%       }
%       if (scalar $wr->destinations > 1) {
          → <%= $wr->{data}{istformation}{allFahrzeuggruppe}[$wagon->group_index]{zielbetriebsstellename} %>
%       }
      </span>
      % if (scalar $wr->train_descriptions > 1 and ($wr->train_descriptions)[$wagon->group_index]{short}) {
        <span class="grouptype"><%= ($wr->train_descriptions)[$wagon->group_index]{short} %></span>
%     }
%   }
  </div>
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@
%     }
%     my $gi;
%     for my $wagon ($wr->wagons) {
%=      include '_wagon', wr => $wr, wagon => $wagon, prev_gi => $gi, multi => $has_multi_desc + $has_multi_dest, wref => $wref, exit_dir => stash('exit_dir');
%=      include '_wagon', wr => $wr, wagon => $wagon, prev_gi => $gi, multi => $has_multi_desc + (scalar $wr->destinations) - 1 + (scalar $wr->train_nos) - 1, wref => $wref, exit_dir => stash('exit_dir');
%       $gi = $wagon->group_index;
%     }
      </div>