diff --git a/TrainDelayed/Scripts/viewmodels.js b/TrainDelayed/Scripts/viewmodels.js index 16a00ca..205be6c 100644 --- a/TrainDelayed/Scripts/viewmodels.js +++ b/TrainDelayed/Scripts/viewmodels.js @@ -16,6 +16,7 @@ function TrainViewModel(json, from, callingAt) { self.tocName = json.AtocCode ? json.AtocCode.Name : ""; self.from = json.Origin.Description.toLowerCase(); + self.newFrom = json.ChangeOfOrigin !== null ? json.ChangeOfOrigin.NewOrigin.Description.toLowerCase() : null; self.to = json.Destination.Description.toLowerCase(); self.fromStation = from.toLowerCase(); @@ -36,6 +37,8 @@ function TrainViewModel(json, from, callingAt) { self.cancelled = json.Cancellation !== null; + self.changeOfOrigin = json.ChangeOfOrigin !== null; + self.title = json.Cancellation ? "Cancelled " + json.Cancellation.Type + (json.Cancellation.CancelledAt ? " at " + json.Cancellation.CancelledAt.Description : "") : ""; } \ No newline at end of file diff --git a/TrainDelayed/search-results.cshtml b/TrainDelayed/search-results.cshtml index 6162fe2..74dd00d 100644 --- a/TrainDelayed/search-results.cshtml +++ b/TrainDelayed/search-results.cshtml @@ -77,7 +77,7 @@ - + @{ if (string.IsNullOrEmpty(@ConfigurationManager.AppSettings["trainLink"])) { @@ -89,7 +89,16 @@ } } - + + + +
+ Starts from + + + + +