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

show mising realtime data in departure overview as well

parent 9f8379ef
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1025,6 +1025,8 @@ sub handle_result {
	my $callback       = $self->param('callback');
	my $via            = $self->param('via');

	my $now = DateTime->now( time_zone => 'Europe/Berlin' );

	if ( $self->param('ajax') ) {
		delete $self->stash->{layout};
	}
@@ -1184,6 +1186,12 @@ sub handle_result {
								} $result->qos_messages
							],
						},
						missingRealtime => (
							(
								not $result->has_realtime
								  and $result->start < $now
							) ? \1 : \0
						),
						platform           => $result->platform,
						route              => \@json_route,
						scheduledPlatform  => $result->sched_platform,
@@ -1255,6 +1263,10 @@ sub handle_result {
					station          => $result->station,
					moreinfo         => $moreinfo,
					delay            => $delay,
					missing_realtime => (
						not $result->has_realtime
						  and $result->start < $now ? 1 : 0
					),
					route_pre        => [ $result->route_pre ],
					route_post       => [ $result->route_post ],
					additional_stops => [ $result->additional_stops ],
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+8 −0
Original line number Diff line number Diff line
@@ -380,6 +380,14 @@ div.app {
					background-color: transparent;
				}

				.no-realtime {
					background-color: transparent;
					padding-right: 1ex;
					i.material-icons {
						font-size: 12px;
					}
				}

				.delay {
					font-size:1em;
					color: $delay-color;
+3 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@
%         }
%       }
%     }
%     elsif ($departure->{missing_realtime}) {
        <span class="no-realtime" aria-label="Echtzeitdaten fehlen"><i class="material-icons" aria-hidden="true">gps_off</i></span>
%     }
%     if (param('detailed')) {
%       my $arrow = '→';
%       if (not $departure->{sched_arrival}) {