Add log buttons on details pages for Vehicle and User

This commit is contained in:
2014-05-18 19:49:04 -04:00
parent fe0bc4e9ff
commit ef88c52658
4 changed files with 34 additions and 28 deletions
-2
View File
@@ -45,8 +45,6 @@ namespace MileageTraker.Web.Controllers
orderby log.Created descending orderby log.Created descending
select log).ToList(); select log).ToList();
if (!filteredLogs.Any())
return View("Empty");
var viewModel = new LogResultsViewModel(filteredLogs, query, CustomExtensions.YearMonthList(validLogYearMonths)); var viewModel = new LogResultsViewModel(filteredLogs, query, CustomExtensions.YearMonthList(validLogYearMonths));
+6
View File
@@ -89,3 +89,9 @@
numericLinksCount: 20 numericLinksCount: 20
) )
</div> </div>
@if (!Model.Logs.Any())
{
<div>
No results.
</div>
}
+1
View File
@@ -113,4 +113,5 @@
{ {
@Html.ActionLink("Unlock", "UnlockUser", new {id = Model.UserId}, new {@class = "btn"}) @Html.ActionLink("Unlock", "UnlockUser", new {id = Model.UserId}, new {@class = "btn"})
} }
@Html.ActionLink("Logs", "Index", "Log", new { EmployeeName = Model.FullName}, new { @class = "btn" })
</div> </div>
+1
View File
@@ -20,4 +20,5 @@
<div class="center-content btn-toolbar"> <div class="center-content btn-toolbar">
@Html.ActionLink("Edit", "Edit", new { id = Model.VehicleId }, new { @class = "btn" }) @Html.ActionLink("Edit", "Edit", new { id = Model.VehicleId }, new { @class = "btn" })
@Html.ActionLink("Logs", "Index", "Log", new { Model.VehicleId}, new { @class = "btn" })
</div> </div>