From fb960c660357f9cd4dca57be1325e4ecbb50f649 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 29 Nov 2022 16:38:21 +0100 Subject: controlroom: show tripShortName instead of tripId since the ids really should be internal to the gtfs, and not needed in "normal" contexts. --- lib/Server/ControlRoom.hs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'lib/Server/ControlRoom.hs') diff --git a/lib/Server/ControlRoom.hs b/lib/Server/ControlRoom.hs index b1948f2..f291d82 100644 --- a/lib/Server/ControlRoom.hs +++ b/lib/Server/ControlRoom.hs @@ -162,8 +162,8 @@ getTrainsR = do [whamlet|
_{MsgLastPing}: @@ -246,8 +246,8 @@ getTripsViewR = do [whamlet|
_{MsgtripId}: #{tripTripID} +
_{MsgtripHeadsign}: #{mightbe tripHeadsign} +
_{MsgtripShortname}: #{mightbe tripShortName}
Stops
@@ -339,7 +344,9 @@ announceForm day tripId = renderDivs $ Announcement
<*> aopt urlField (fieldSettingsLabel MsgMaybeWeblink) Nothing
<*> lift (liftIO getCurrentTime <&> Just)
-
+mightbe :: Maybe Text -> Text
+mightbe (Just a) = a
+mightbe Nothing = ""
--- some orphans to make hamlet easier to deal with
instance ToMarkup Time where
--
cgit v1.2.3