diff --git a/Disco.Web/ClientSource/Style/Device.css b/Disco.Web/ClientSource/Style/Device.css index 809204d9..42852245 100644 --- a/Disco.Web/ClientSource/Style/Device.css +++ b/Disco.Web/ClientSource/Style/Device.css @@ -90,122 +90,6 @@ } #Device_Show #Device_Show_Subjects { table-layout: fixed; - /*#Device_Show_Job - { - #Device_Show_Device_Type - { - &>table - { - table-layout: fixed; - } - } - - #Device_Show_Device_SubTypes_1, #Device_Show_Device_SubTypes_2 - { - padding-left: 16px; - font-weight: bold; - } - - #Device_Show_Device_SubTypes_Update - { - margin-left: 16px; - font-size: 0.9em; - } - - #Device_Show_Device_SubTypes_Update_Dialog - { - display: none; - } - - #Device_Show_Device_Dates - { - padding-bottom: 6px; - - table - { - table-layout: fixed; - - &>tbody > tr > td - { - vertical-align: middle; - } - - &>tbody > tr > td:first-child - { - font-weight: bold; - width: 60px; - } - } - } - - #Device_Show_GenerateDocument_Container - { - padding-top: 4px; - - #Device_Show_GenerateDocument - { - padding: 0; - } - } - } - - #Device_Show_Device - { - &>div - { - padding-left: 102px; - min-height: 100px; - } - - #Device_Show_Device_Model_Image - { - position: absolute; - left: 0; - top: 0; - height: 96px; - width: 96px; - } - - #Device_Show_Device_Details - { - float: left; - } - - #Device_Show_Device_Details_HWar, #Device_Show_Device_Details_HNWar - { - float: right; - border-left: 1px dashed #ddd; - padding-left: 4px; - margin-right: 2px; - } - - #Device_Show_Device_Details_HWar_Details_Button, #Device_Show_Device_Details_HNWar_Details_Button - { - font-size: .9em; - } - - #Device_Show_Device_DeviceHeld - { - table - { - table-layout: fixed; - - &>tbody > tr > td:first-child - { - width: 62px; - } - } - } - } - - #Device_Show_User - { - #Device_Show_User_Type - { - font-style: italic; - } - }*/ - } #Device_Show #Device_Show_Subjects > tbody > tr > td { padding-top: 0; diff --git a/Disco.Web/ClientSource/Style/Device.less b/Disco.Web/ClientSource/Style/Device.less index 2136196f..d916178d 100644 --- a/Disco.Web/ClientSource/Style/Device.less +++ b/Disco.Web/ClientSource/Style/Device.less @@ -98,121 +98,7 @@ margin: 0 auto; } } - /*#Device_Show_Job - { - #Device_Show_Device_Type - { - &>table - { - table-layout: fixed; - } - } - #Device_Show_Device_SubTypes_1, #Device_Show_Device_SubTypes_2 - { - padding-left: 16px; - font-weight: bold; - } - - #Device_Show_Device_SubTypes_Update - { - margin-left: 16px; - font-size: 0.9em; - } - - #Device_Show_Device_SubTypes_Update_Dialog - { - display: none; - } - - #Device_Show_Device_Dates - { - padding-bottom: 6px; - - table - { - table-layout: fixed; - - &>tbody > tr > td - { - vertical-align: middle; - } - - &>tbody > tr > td:first-child - { - font-weight: bold; - width: 60px; - } - } - } - - #Device_Show_GenerateDocument_Container - { - padding-top: 4px; - - #Device_Show_GenerateDocument - { - padding: 0; - } - } - } - - #Device_Show_Device - { - &>div - { - padding-left: 102px; - min-height: 100px; - } - - #Device_Show_Device_Model_Image - { - position: absolute; - left: 0; - top: 0; - height: 96px; - width: 96px; - } - - #Device_Show_Device_Details - { - float: left; - } - - #Device_Show_Device_Details_HWar, #Device_Show_Device_Details_HNWar - { - float: right; - border-left: 1px dashed #ddd; - padding-left: 4px; - margin-right: 2px; - } - - #Device_Show_Device_Details_HWar_Details_Button, #Device_Show_Device_Details_HNWar_Details_Button - { - font-size: .9em; - } - - #Device_Show_Device_DeviceHeld - { - table - { - table-layout: fixed; - - &>tbody > tr > td:first-child - { - width: 62px; - } - } - } - } - - #Device_Show_User - { - #Device_Show_User_Type - { - font-style: italic; - } - }*/ #Device_Show_Subjects_Actions { & > td { padding-top: 4px; diff --git a/Disco.Web/Views/Device/ARCHIVE_CertificateTable.cshtml b/Disco.Web/Views/Device/ARCHIVE_CertificateTable.cshtml deleted file mode 100644 index 98ca5f2e..00000000 --- a/Disco.Web/Views/Device/ARCHIVE_CertificateTable.cshtml +++ /dev/null @@ -1,43 +0,0 @@ -@model IEnumerable -
- @if (Model.Count() > 0) - { - - - - - - - - @foreach (var item in Model) - { - - - - - - - } -
- Name - - Enabled - - Allocated - - Expires -
- @Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id)) - - @item.Enabled - - @CommonHelpers.FriendlyDate(item.AllocatedDate) - - @CommonHelpers.FriendlyDate(item.ExpirationDate) -
- } - else - { - No Certificates Allocated - } -
diff --git a/Disco.Web/Views/Device/ARCHIVE_DeviceActions.cshtml b/Disco.Web/Views/Device/ARCHIVE_DeviceActions.cshtml deleted file mode 100644 index a71d11f3..00000000 --- a/Disco.Web/Views/Device/ARCHIVE_DeviceActions.cshtml +++ /dev/null @@ -1,124 +0,0 @@ -@model Disco.Models.Repository.Device -
- @if (Model.CanDecommission()) - { - @Html.ActionLinkButton("Decommission", MVC.API.Device.Decommission(Model.SerialNumber, true), "buttonDeviceDecommission") -
-

- - Are you sure?

-
- - } - @if (Model.CanRecommission()) - { - @Html.ActionLinkButton("Recommission", MVC.API.Device.Recommission(Model.SerialNumber, true), "buttonDeviceRecommission") -
-

- - Are you sure?

-
- - } - @if (Model.CanDelete()) - { - @Html.ActionLinkButton("Delete Device", MVC.API.Device.Delete(Model.SerialNumber, true), "buttonDeviceDelete") -
-

- - This item will be permanently deleted and cannot be recovered.
- Jobs linked to this Device (but not to a User) will be deleted also.
- Are you sure?

-
- - } - @if (Model.CanCreateJob()) - { - Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob"); - @Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.SerialNumber, Model.AssignedUserId), "buttonCreateJob") - } -
\ No newline at end of file diff --git a/Disco.Web/Views/Device/ARCHIVE_DeviceUserAssignmentHistoryTable.cshtml b/Disco.Web/Views/Device/ARCHIVE_DeviceUserAssignmentHistoryTable.cshtml deleted file mode 100644 index f9846288..00000000 --- a/Disco.Web/Views/Device/ARCHIVE_DeviceUserAssignmentHistoryTable.cshtml +++ /dev/null @@ -1,35 +0,0 @@ -@model Disco.Models.Repository.Device -@if (Model.DeviceUserAssignments.Count > 0) -{ - - - - - - - @foreach (var dua in Model.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate)) - { - - - - - - } -
- User - - Assigned - - Unassigned -
- @Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId)) - - @CommonHelpers.FriendlyDate(dua.AssignedDate) - - @CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current") -
-} -else -{ - No Assignment History Available -} diff --git a/Disco.Web/Views/Device/ARCHIVE_Show.cshtml b/Disco.Web/Views/Device/ARCHIVE_Show.cshtml deleted file mode 100644 index 0506066b..00000000 --- a/Disco.Web/Views/Device/ARCHIVE_Show.cshtml +++ /dev/null @@ -1,478 +0,0 @@ -@model Disco.Web.Models.Device.ShowModel -@{ - ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), string.Format("{0} ({1})", Model.Device.ComputerName, Model.Device.SerialNumber)); - Html.BundleDeferred("~/ClientScripts/Modules/Silverlight"); -} - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @if (!Model.Device.DecommissionedDate.HasValue) - { - - - - - } - - - - - - - -
- Computer Name: - - @if (string.IsNullOrWhiteSpace(Model.Device.ComputerName)) - { - <Unknown/Not Allocated> - } - else - { - @Model.Device.ComputerName - } -
- Asset Number: - - @Html.TextBoxFor(m => m.Device.AssetNumber) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Location: - - @Html.TextBoxFor(m => m.Device.Location) - @AjaxHelpers.AjaxSave() - @AjaxHelpers.AjaxLoader() - -
- Batch: - - @Html.DropDownListFor(m => m.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems(Model.Device.DeviceBatchId)) - @AjaxHelpers.AjaxLoader() - -
- - - - - - - - - -
- Purchased: - - Supplier: -
- On: -
- Warranty: - - Valid Until: - - Insurance: - - Supplier: -
- Until: -
-
-
- Profile: - - @if (Model.Device.DecommissionedDate.HasValue) - { - @Model.Device.DeviceProfile.ToString() - } - else - { - @Html.DropDownListFor(m => m.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.Device.DeviceProfile)) - @AjaxHelpers.AjaxLoader() - - } -
- Created: - - @CommonHelpers.FriendlyDate(Model.Device.CreatedDate) -
- Enrolment: - - First: - @CommonHelpers.FriendlyDate(Model.Device.EnrolledDate) - @if (Model.Device.AllowUnauthenticatedEnrol) - { - -   - } - else - { - -   - } -
- Last: - @CommonHelpers.FriendlyDate(Model.Device.LastEnrolDate) -
- Decommissioned: - - @CommonHelpers.FriendlyDate(Model.Device.DecommissionedDate) -
- Last Network Logon: - - @CommonHelpers.FriendlyDate(Model.Device.LastNetworkLogonDate) - @if (!string.IsNullOrEmpty(Model.Device.ComputerName)) - { - - } -
- Assigned User: - - @Html.TextBoxFor(m => m.Device.AssignedUser, new { userId = Model.Device.AssignedUserId }) - @AjaxHelpers.AjaxRemove() - @AjaxHelpers.AjaxLoader() -
- Show Assignment - History () -
-

- - Are you sure?

-
- -
-
-

- Assigned User History

- @Html.Partial(MVC.Device.Views._DeviceUserAssignmentHistoryTable, Model.Device) -
-
- Generate Documents: - - @Html.DropDownList("DocumentTemplates", Model.DocumentTemplatesSelectListItems) - -
-
- - - - -
- Model Image -

- @Model.Device.DeviceModel.ToString()

-
-
-

- Certificates

-@Html.Partial(MVC.Device.Views._CertificateTable, Model.Certificates) -

- Attachments

-@Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model) -

- Jobs

-@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs) -@Html.Partial(MVC.Device.Views._DeviceActions, Model.Device) diff --git a/Disco.Web/Views/Device/DeviceParts/AssignmentHistory.cshtml b/Disco.Web/Views/Device/DeviceParts/_AssignmentHistory.cshtml similarity index 100% rename from Disco.Web/Views/Device/DeviceParts/AssignmentHistory.cshtml rename to Disco.Web/Views/Device/DeviceParts/_AssignmentHistory.cshtml diff --git a/Disco.Web/Views/Device/DeviceParts/AssignmentHistory.generated.cs b/Disco.Web/Views/Device/DeviceParts/_AssignmentHistory.generated.cs similarity index 82% rename from Disco.Web/Views/Device/DeviceParts/AssignmentHistory.generated.cs rename to Disco.Web/Views/Device/DeviceParts/_AssignmentHistory.generated.cs index fac5f734..06ca4b6a 100644 --- a/Disco.Web/Views/Device/DeviceParts/AssignmentHistory.generated.cs +++ b/Disco.Web/Views/Device/DeviceParts/_AssignmentHistory.generated.cs @@ -32,7 +32,7 @@ namespace Disco.Web.Views.Device.DeviceParts using Disco.Web.Extensions; [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] - [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/AssignmentHistory.cshtml")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/_AssignmentHistory.cshtml")] public partial class AssignmentHistory : System.Web.Mvc.WebViewPage { public AssignmentHistory() @@ -49,13 +49,13 @@ WriteLiteral(" class=\"DevicePart\""); WriteLiteral(">\r\n"); - #line 3 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 3 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" #line default #line hidden - #line 3 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 3 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" if (Model.Device.DeviceUserAssignments.Count > 0) { @@ -71,13 +71,13 @@ WriteLiteral(">\r\n \r\n User\r\n " \r\n \r\n"); - #line 14 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 14 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" #line default #line hidden - #line 14 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 14 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" foreach (var dua in Model.Device.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate)) { @@ -89,7 +89,7 @@ WriteLiteral(" \r\n \r\n"); WriteLiteral(" "); - #line 18 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 18 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" Write(Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId))); @@ -100,7 +100,7 @@ WriteLiteral("\r\n \r\n \r\n"); WriteLiteral(" "); - #line 21 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 21 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" Write(CommonHelpers.FriendlyDate(dua.AssignedDate)); @@ -111,7 +111,7 @@ WriteLiteral("\r\n \r\n \r\n"); WriteLiteral(" "); - #line 24 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 24 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current")); @@ -120,7 +120,7 @@ WriteLiteral(" "); WriteLiteral("\r\n \r\n \r\n"); - #line 27 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 27 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" } @@ -129,7 +129,7 @@ WriteLiteral("\r\n \r\n \r\n"); WriteLiteral(" \r\n"); - #line 29 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 29 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" } else { @@ -144,7 +144,7 @@ WriteLiteral(" class=\"smallMessage\""); WriteLiteral(">No Assignment History Available\r\n"); - #line 33 "..\..\Views\Device\DeviceParts\AssignmentHistory.cshtml" + #line 33 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml" } @@ -154,7 +154,7 @@ WriteLiteral("
    - @Html.Partial(MVC.Device.Views.DeviceParts.Jobs, Model) - @Html.Partial(MVC.Device.Views.DeviceParts.AssignmentHistory, Model) - @Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model) - @Html.Partial(MVC.Device.Views.DeviceParts.Certificates, Model) + @Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model) + @Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model) + @Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model) + @Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model)
    diff --git a/Disco.Web/Views/Device/Show.generated.cs b/Disco.Web/Views/Device/Show.generated.cs index bce10954..0bdd337f 100644 --- a/Disco.Web/Views/Device/Show.generated.cs +++ b/Disco.Web/Views/Device/Show.generated.cs @@ -144,7 +144,7 @@ WriteLiteral(" "); #line 48 "..\..\Views\Device\Show.cshtml" - Write(Html.Partial(MVC.Device.Views.DeviceParts.Jobs, Model)); + Write(Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model)); #line default @@ -155,7 +155,7 @@ WriteLiteral(" "); #line 49 "..\..\Views\Device\Show.cshtml" - Write(Html.Partial(MVC.Device.Views.DeviceParts.AssignmentHistory, Model)); + Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model)); #line default @@ -166,7 +166,7 @@ WriteLiteral(" "); #line 50 "..\..\Views\Device\Show.cshtml" - Write(Html.Partial(MVC.Device.Views.DeviceParts.Resources, Model)); + Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model)); #line default @@ -177,7 +177,7 @@ WriteLiteral(" "); #line 51 "..\..\Views\Device\Show.cshtml" - Write(Html.Partial(MVC.Device.Views.DeviceParts.Certificates, Model)); + Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model)); #line default