2011-04-21 01:43:09 +00:00
|
|
|
@model NzbDrone.Core.Repository.Quality.QualityProfile
|
2011-05-29 08:59:25 +00:00
|
|
|
@using System.Collections
|
2011-04-21 01:43:09 +00:00
|
|
|
@using NzbDrone.Core.Repository.Quality
|
|
|
|
@using NzbDrone.Web.Helpers
|
2011-04-22 00:30:19 +00:00
|
|
|
@{
|
|
|
|
Layout = null;
|
|
|
|
}
|
2011-07-01 09:10:42 +00:00
|
|
|
|
2011-05-29 04:07:11 +00:00
|
|
|
@using (Html.BeginCollectionItem("Profiles"))
|
2011-04-21 01:43:09 +00:00
|
|
|
{
|
|
|
|
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
|
|
|
|
2011-07-01 09:10:42 +00:00
|
|
|
<div class="profileSection" id="profile_@(Model.QualityProfileId)">
|
|
|
|
<div class="qualityHeader">
|
|
|
|
<span class="titleText" id="title_@(Model.QualityProfileId)">
|
|
|
|
@Model.Name
|
|
|
|
</span>
|
|
|
|
<a href="#" id="@Model.QualityProfileId" class="deleteProfile" onclick=" deleteProfile('@(Model.QualityProfileId)'); return false;">
|
|
|
|
<img src="../../Content/Images/X.png" alt="Delete" width="22px" height="22px" /></a>
|
|
|
|
</div>
|
|
|
|
<div class="profileOptions">
|
|
|
|
@Html.LabelFor(x => x.Name)
|
|
|
|
@Html.TextBoxFor(x => x.Name, new {@class = "profileName_textbox"})
|
|
|
|
|
|
|
|
@Html.LabelFor(x => x.Cutoff)
|
|
|
|
@Html.DropDownListFor(m => m.Cutoff, new SelectList(Model.Allowed, Model.Cutoff))
|
|
|
|
</div>
|
|
|
|
<div id = "selectable_@(Model.QualityProfileId)" class="qualitySelector">
|
|
|
|
@{ var qualitiesList = (List<QualityTypes>) 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]))
|
2011-05-29 08:59:25 +00:00
|
|
|
{
|
2011-07-01 09:10:42 +00:00
|
|
|
<div class="quality-selectee quality-selected">@qualitiesList[i].ToString()</div>
|
|
|
|
continue;
|
2011-05-29 08:59:25 +00:00
|
|
|
}
|
2011-07-01 09:10:42 +00:00
|
|
|
}
|
2011-05-30 04:49:56 +00:00
|
|
|
|
2011-07-01 09:10:42 +00:00
|
|
|
<div class="quality-selectee">@qualitiesList[i].ToString()</div>
|
2011-05-29 21:25:00 +00:00
|
|
|
}
|
2011-07-01 09:10:42 +00:00
|
|
|
</div>
|
|
|
|
@Html.HiddenFor(x => x.QualityProfileId, new {@class = "qualityProfileId"})
|
|
|
|
@Html.HiddenFor(m => m.AllowedString)
|
|
|
|
@Html.Hidden("cleanId", idClean, new {@class = "cleanId"})
|
|
|
|
</div>
|
2011-04-21 01:43:09 +00:00
|
|
|
}
|