Add log buttons on details pages for Vehicle and User
This commit is contained in:
@@ -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));
|
||||||
|
|
||||||
|
|||||||
@@ -89,3 +89,9 @@
|
|||||||
numericLinksCount: 20
|
numericLinksCount: 20
|
||||||
)
|
)
|
||||||
</div>
|
</div>
|
||||||
|
@if (!Model.Logs.Any())
|
||||||
|
{
|
||||||
|
<div>
|
||||||
|
No results.
|
||||||
|
</div>
|
||||||
|
}
|
||||||
@@ -87,30 +87,31 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-toolbar center-content">
|
<div class="btn-toolbar center-content">
|
||||||
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
@Html.ActionLink("Edit", "Edit", new { id = Model.UserId }, new { @class = "btn" })
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
Password <span class="caret"></span>
|
Password <span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
@Html.ActionLink("Send Password Reset Email", "SendResetPassword", new { userId = Model.UserId })
|
@Html.ActionLink("Send Password Reset Email", "SendResetPassword", new { userId = Model.UserId })
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId })
|
@Html.ActionLink("Set Password", "SetPassword", new { id = Model.UserId })
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@if (Model.IsApproved)
|
@if (Model.IsApproved)
|
||||||
{
|
{
|
||||||
@Html.ActionLink("Disable Account", "DisableUser", new {id = Model.UserId}, new {@class = "btn"})
|
@Html.ActionLink("Disable Account", "DisableUser", new {id = Model.UserId}, new {@class = "btn"})
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@Html.ActionLink("Enable Account", "EnableUser", new {id = Model.UserId}, new {@class = "btn"})
|
@Html.ActionLink("Enable Account", "EnableUser", new {id = Model.UserId}, new {@class = "btn"})
|
||||||
}
|
}
|
||||||
@if (Model.IsLockedOut)
|
@if (Model.IsLockedOut)
|
||||||
{
|
{
|
||||||
@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>
|
||||||
|
|||||||
@@ -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>
|
||||||
Reference in New Issue
Block a user