plaintext view now shows comments

This commit is contained in:
Laura Hausmann 2020-06-12 11:38:59 +02:00
parent 684419a856
commit 70d93299cd
Signed by: zotan
GPG key ID: 5EC1D38FFC321311

View file

@ -40,7 +40,7 @@
@foreach (var leg in Model.Legs) { @foreach (var leg in Model.Legs) {
if (leg.TrainType == "placeholder") { if (leg.TrainType == "placeholder") {
<div> <div>
... &nbsp;&nbsp; ..:.. ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - &nbsp; ... ... &nbsp; - ..:.. ... ... &nbsp;&nbsp; ..:.. ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - &nbsp; ... ... &nbsp; - ..:.. ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...
</div> </div>
continue; continue;
} }
@ -52,8 +52,9 @@
var arrt = arrtime.ToString("HH:mm"); var arrt = arrtime.ToString("HH:mm");
var arrst = leg.ArrStation.PadRight(20, ' ').Substring(0, 20).Replace(" ", "&nbsp;"); var arrst = leg.ArrStation.PadRight(20, ' ').Substring(0, 20).Replace(" ", "&nbsp;");
var line = leg.TrainType.PadLeft(5).Replace(" ", "&nbsp;") + "&nbsp;" + leg.TrainNr.ToString().PadRight(5).Replace(" ", "&nbsp;"); var line = leg.TrainType.PadLeft(5).Replace(" ", "&nbsp;") + "&nbsp;" + leg.TrainNr.ToString().PadRight(5).Replace(" ", "&nbsp;");
var comment = leg.Comment;
<div> <div>
@dept @Html.Raw(depst) - @Html.Raw(line) - @arrt @Html.Raw(arrst) @dept @Html.Raw(depst) - @Html.Raw(line) - @arrt @Html.Raw(arrst) @(string.IsNullOrWhiteSpace(comment) ? "..." : comment)
</div> </div>
} }
</code> </code>
@ -113,7 +114,7 @@
</td> </td>
<td>@leg.TrainType @leg.TrainNr</td> <td>@leg.TrainType @leg.TrainNr</td>
@if (!Request.Query.ContainsKey("edit")) { @if (!Request.Query.ContainsKey("edit")) {
<td class="text-center"> <td>
@if (!string.IsNullOrWhiteSpace(leg.Comment)) { @if (!string.IsNullOrWhiteSpace(leg.Comment)) {
@Html.Raw(leg.Comment) @Html.Raw(leg.Comment)
} }