@model NzbDrone.Core.Repository.Quality.QualityProfile @using System.Collections @using NzbDrone.Core.Repository.Quality @using NzbDrone.Web.Helpers @{ Layout = null; } @using (Html.BeginCollectionItem("Profiles")) { var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_'); var ugly = ViewData.TemplateInfo.HtmlFieldPrefix; string selectable = String.Format("{0}_selectable", idClean); string allowedStringName = String.Format("{0}_AllowedString", idClean); string title = String.Format("{0}_Title", idClean); string nameBox = String.Format("{0}_Name", idClean); string cutoff = String.Format("{0}_Cutoff", idClean);

@{Html.DisplayTextFor(m => m.Name);}

Delete
@Html.LabelFor(x => x.Name)
@Html.TextBoxFor(x => x.Name, new { maxlength = 16 })
@Html.ValidationMessageFor(x => x.Name)
@Html.LabelFor(x => x.Cutoff)
@Html.DropDownListFor(m => m.Cutoff, new SelectList(Model.Allowed, Model.Cutoff))
@Html.ValidationMessageFor(x => x.Cutoff)
@{var qualitiesList = (List)ViewData["Qualities"];} @for (int i = 0; i < qualitiesList.Count(); i++) { if (qualitiesList[i].ToString() == "Unknown") { continue; } if (Model.Allowed != null) { if (Model.Allowed.Contains(qualitiesList[i])) {
@qualitiesList[i].ToString()
continue; } }
@qualitiesList[i].ToString()
}
@Html.HiddenFor(x => x.QualityProfileId) @Html.HiddenFor(x => x.UserProfile) @Html.HiddenFor(m => m.AllowedString)
}