Files
Gary Sharp a099d68915 Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
2013-10-10 19:13:16 +11:00

37 lines
874 B
Plaintext

@model Disco.Web.Models.Search.QueryModel
@{
ViewBag.Title = "Search Results";
}
<h2>
Query: '<span style="font-weight: bold;">@(Model.FriendlyTerm != null ? Model.FriendlyTerm : Model.Term)</span>'</h2>
@if (Model.Success)
{
if (Model.Jobs != null && Authorization.Has(Claims.Job.Search))
{
<h2>
Jobs</h2>
<div>
@Html.Partial(MVC.Shared.Views._JobTable, @Model.Jobs)
</div>
}
if (Model.Devices != null && Authorization.Has(Claims.Device.Search))
{
<h2>
Devices</h2>
<div>
@Html.Partial(MVC.Device.Views._DeviceTable, @Model.Devices)
</div>
}
if (Model.Users != null && Authorization.Has(Claims.User.Search))
{
<h2>
Users</h2>
<div>
@Html.Partial(MVC.User.Views._UserTable, @Model.Users)
</div>
}
}
else
{
<h2>@Model.ErrorMessage</h2>
}