2011-04-21 04:43:09 +03:00
|
|
|
@model NzbDrone.Core.Repository.Quality.QualityProfile
|
2011-05-29 11:59:25 +03:00
|
|
|
@using System.Collections
|
2011-04-21 04:43:09 +03:00
|
|
|
@using NzbDrone.Core.Repository.Quality
|
|
|
|
@using NzbDrone.Web.Helpers
|
2011-04-22 03:30:19 +03:00
|
|
|
@{
|
|
|
|
Layout = null;
|
|
|
|
}
|
2011-07-01 12:10:42 +03:00
|
|
|
|
2011-05-29 07:07:11 +03:00
|
|
|
@using (Html.BeginCollectionItem("Profiles"))
|
2011-04-21 04:43:09 +03:00
|
|
|
{
|
|
|
|
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
|
|
|
|
2011-07-01 12:10:42 +03: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 11:59:25 +03:00
|
|
|
{
|
2011-07-01 12:10:42 +03:00
|
|
|
<div class="quality-selectee quality-selected">@qualitiesList[i].ToString()</div>
|
|
|
|
continue;
|
2011-05-29 11:59:25 +03:00
|
|
|
}
|
2011-07-01 12:10:42 +03:00
|
|
|
}
|
2011-05-30 07:49:56 +03:00
|
|
|
|
2011-07-01 12:10:42 +03:00
|
|
|
<div class="quality-selectee">@qualitiesList[i].ToString()</div>
|
2011-05-30 00:25:00 +03:00
|
|
|
}
|
2011-07-01 12:10:42 +03: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 04:43:09 +03:00
|
|
|
}
|