Commit eeec5faa authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Include requested station in train route

parent 5f789e9e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(/static/v27/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: url(/static/v28/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: local('Material Icons'),
       local('MaterialIcons-Regular'),
       url(/static/v27/fonts/MaterialIcons-Regular.woff2) format('woff2'),
       url(/static/v27/fonts/MaterialIcons-Regular.woff) format('woff'),
       url(/static/v27/fonts/MaterialIcons-Regular.ttf) format('truetype');
       url(/static/v28/fonts/MaterialIcons-Regular.woff2) format('woff2'),
       url(/static/v28/fonts/MaterialIcons-Regular.woff) format('woff'),
       url(/static/v28/fonts/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
+3 −4
Original line number Diff line number Diff line
@@ -47,20 +47,19 @@ function dbf_reg_handlers() {
				}
				$('.moreinfo .mfooter').append('Meldungen: <ul>' + ibuf + '</ul>');
			}
			if (trainElem.data('routeprev') != '') {
			var routebuf = '';
			if (trainElem.data('routeprev') != '') {
				for (var key in routeprev) {
					routebuf += '<li>' + routeprev[key] + '</li>';
				}
				$('.moreinfo .mfooter').append('Von: <ul class="mroute">' + routebuf + '</ul>');
			}
			routebuf += '<li><strong>' + document.title + '</strong></li>';
			if (trainElem.data('routenext') != '') {
				var routebuf = '';
				for (var key in routenext) {
					routebuf += '<li>' + routenext[key] + '</li>';
				}
				$('.moreinfo .mfooter').append('Nach: <ul class="mroute">' + routebuf + '</ul>');
			}
			$('.moreinfo .mfooter').append('Fahrtverlauf: <ul class="mroute">' + routebuf + '</ul>');
			$.get(window.location.href, {train: trainElem.data('train'), ajax: 1}, function(data) {
				$('.moreinfo').html(data);
			}).fail(function() {
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+0 −0

File moved.

+66 −67
Original line number Diff line number Diff line
@@ -50,21 +50,26 @@
      (Gleiswechsel)
%   }
    </div> <!-- platforminfo -->
%   if (not $departure->{is_cancelled}) {
      <div class="timeinfo">
%   my ($arr_time, $dep_time);
%   if ($departure->{sched_arrival}) {
        Ankunft: <%= $departure->{sched_arrival} %>
%     $arr_time = $departure->{sched_arrival};
%     if ($departure->{arrival} and $departure->{arrival} ne $departure->{sched_arrival}) {
          (heute <%= $departure->{arrival} %>)
%       $arr_time .= ' (heute ' . $departure->{arrival} . ')';
%     }
        <br/>
%   }
%   if ($departure->{sched_departure}) {
        Abfahrt: <%= $departure->{sched_departure} %>
%     $dep_time = $departure->{sched_departure};
%     if ($departure->{departure} and $departure->{departure} ne $departure->{sched_departure}) {
          (heute <%= $departure->{departure} %>)
%       $dep_time .= ' (heute ' . $departure->{departure} . ')';
%     }
%   }
%   if (not $departure->{is_cancelled}) {
      <div class="timeinfo">
%     if ($departure->{sched_arrival}) {
        Ankunft: <%= $arr_time %><br/>
%     }
        <br/>
%     if ($departure->{sched_departure}) {
        Abfahrt: <%= $dep_time %><br/>
%     }
%     if (not ($departure->{sched_arrival} or $departure->{sched_departure})) {
        Abfahrt: <%= $departure->{time} %>
@@ -73,7 +78,7 @@
%       }
%     }
      </div> <!-- timeinfo -->
%     if ($departure->{wr_link} or ($icetype and $icetype->[1])) {
%     if ($departure->{wr_link} or ($icetype and $icetype->[1] and $departure->{train_type} ne 'Bus')) {
        <div class="verbose">
%         if ($departure->{wr_link}) {
            <a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>">Wagenreihung</a>
@@ -118,8 +123,7 @@
      </ul>
%   }
%   if ($departure->{route_pre_diff} and $departure->{route_post_diff}) {
%     if (@{$departure->{route_pre_diff}}) {
        Von:
      Fahrtverlauf:
      <ul class="mroute">
%       for my $stop (@{$departure->{route_pre_diff}}) {
          <li>
@@ -144,11 +148,7 @@
%         }
          </li>
%       }
        </ul> <!-- mroute -->
%     }
%     if (@{$departure->{route_post_diff}}) {
        Nach:
        <ul class="mroute">
        <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %>"><%= $dep_time // $arr_time // q{} %> <strong><%= $station_name %></strong></li>
%       for my $stop (@{$departure->{route_post_diff}}) {
          <li>
          <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class="
@@ -173,6 +173,5 @@
          </li>
%       }
      </ul> <!-- mroute -->
%     }
%   }
    </div> <!-- mfooter -->
Loading