@using Disco.Web.Models.Device; @using Disco.Models.Services.Devices; @model ExportModel @{ Authorization.RequireAny(Claims.Device.Actions.Export); ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Export Devices"); var optionsMetadata = ModelMetadata.FromLambdaExpression(m => m.Options, ViewData); var optionGroups = optionsMetadata.Properties.Where(p => p.ShortDisplayName != null && p.ModelType == typeof(bool)) .GroupBy(m => m.ShortDisplayName); }
| Type: |
@Html.DropDownListFor(m => m.Options.ExportType, Enum.GetNames(typeof(Disco.Models.Services.Devices.Exporting.DeviceExportTypes)).Select(t => new SelectListItem() { Text = t, Value = t }))
@Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceBatches.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value }))
@Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceModels.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value }))
@Html.DropDownListFor(m => m.Options.ExportTypeTargetId, Model.DeviceProfiles.Select(i => new SelectListItem() { Value = i.Key.ToString(), Text = i.Value }))
|
|---|---|
| @Html.CheckBoxFor(m => m.Options.ExcelFormat) |
| @optionGroup.Key @if (optionFields.Count > 2) { ALL | NONE } |
|
|---|