diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index aa28433df..7941ec777 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -626,7 +626,7 @@ - + @@ -664,6 +664,7 @@ + diff --git a/NzbDrone.Web/Views/Settings/Downloads.ascx b/NzbDrone.Web/Views/Settings/Downloads.ascx deleted file mode 100644 index c3aa27bde..000000000 --- a/NzbDrone.Web/Views/Settings/Downloads.ascx +++ /dev/null @@ -1,189 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> - - - - <% - Html.EnableClientValidation();%> - -<% - using (Html.BeginForm("SaveDownloads", "Settings", FormMethod.Post, new {id = "form", name = "form"})) - {%> -<%--<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>--%> - -
- Download Settings - <%--//Sync Frequency - //Download Propers? - //Retention - //SAB Host/IP - //SAB Port - //SAB APIKey - //SAB Username - //SAB Password - //SAB Category - //SAB Priority--%> - -
- Usenet Variables - -
-
-
<%=Html.LabelFor(m => m.SyncFrequency)%>
-
<%=Html.TextBoxFor(m => m.SyncFrequency)%>
-
-
<%=Html.ValidationMessageFor(m => m.SyncFrequency)%>
-
- -
-
-
<%=Html.LabelFor(m => m.DownloadPropers)%>
-
<%=Html.CheckBoxFor(m => m.DownloadPropers)%>
- -
-
<%=Html.ValidationMessageFor(m => m.DownloadPropers)%>
-
- -
-
-
<%=Html.LabelFor(m => m.Retention)%>
-
<%=Html.TextBoxFor(m => m.Retention)%>
-
-
<%=Html.ValidationMessageFor(m => m.Retention)%>
-
-
- -
-
- <%=Html.LabelFor(m => m.UseBlackHole)%> -
-
- <%=Html.RadioButtonFor(m => m.UseBlackHole, true, new {@class = "blackhole_radio"})%>Blackhole -
-
- <%=Html.RadioButtonFor(m => m.UseBlackHole, false, new {@class = "blackhole_radio"})%>SABnzbd -
-
- - - - - - - - <% - }%> -
-
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Downloads.cshtml b/NzbDrone.Web/Views/Settings/Downloads.cshtml new file mode 100644 index 000000000..149233ff1 --- /dev/null +++ b/NzbDrone.Web/Views/Settings/Downloads.cshtml @@ -0,0 +1,175 @@ +@model NzbDrone.Web.Models.DownloadSettingsModel + + + +@using (Html.BeginForm("SaveDownloads", "Settings", FormMethod.Post, new { id = "form", name = "form" })) +{ + +
+ Download Settings + +
+ Usenet Variables + +
+
+
@Html.LabelFor(m => m.SyncFrequency)
+
@Html.TextBoxFor(m => m.SyncFrequency)
+
+
@Html.ValidationMessageFor(m => m.SyncFrequency)
+
+ +
+
+
@Html.LabelFor(m => m.DownloadPropers)
+
@Html.CheckBoxFor(m => m.DownloadPropers)
+ +
+
@Html.ValidationMessageFor(m => m.DownloadPropers)
+
+ +
+
+
@Html.LabelFor(m => m.Retention)
+
@Html.TextBoxFor(m => m.Retention)
+
+
@Html.ValidationMessageFor(m => m.Retention)
+
+
+ +
+
+ @Html.LabelFor(m => m.UseBlackHole) +
+
+ @Html.RadioButtonFor(m => m.UseBlackHole, true, new { @class = "blackhole_radio" })Blackhole +
+
+ @Html.RadioButtonFor(m => m.UseBlackHole, false, new { @class = "blackhole_radio" })SABnzbd +
+
+ + + + + + + + +
+} +
+ \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/EpisodeSorting.ascx b/NzbDrone.Web/Views/Settings/EpisodeSorting.ascx deleted file mode 100644 index 0f13d0d05..000000000 --- a/NzbDrone.Web/Views/Settings/EpisodeSorting.ascx +++ /dev/null @@ -1,129 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> - - - - <% - Html.EnableClientValidation();%> - -<% - using (Html.BeginForm("SaveEpisodeSorting", "Settings", FormMethod.Post, new {id = "form", name = "form"})) - {%> -<%--<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>--%> - -
- Episode Sorting - -
-
-
<%=Html.LabelFor(m => m.ShowName)%>
-
<%=Html.CheckBoxFor(m => m.ShowName)%>
- -
-
<%=Html.ValidationMessageFor(m => m.ShowName)%>
-
- -
-
-
<%=Html.LabelFor(m => m.EpisodeName)%>
-
<%=Html.CheckBoxFor(m => m.EpisodeName)%>
- -
-
<%=Html.ValidationMessageFor(m => m.EpisodeName)%>
-
- -
-
-
<%=Html.LabelFor(m => m.ReplaceSpaces)%>
-
<%=Html.CheckBoxFor(m => m.ReplaceSpaces)%>
- -
-
<%=Html.ValidationMessageFor(m => m.ReplaceSpaces)%>
-
- -
-
-
<%=Html.LabelFor(m => m.AppendQuality)%>
-
<%=Html.CheckBoxFor(m => m.AppendQuality)%>
- -
-
<%=Html.ValidationMessageFor(m => m.AppendQuality)%>
-
- -
-
-
<%=Html.LabelFor(m => m.UseAirByDate)%>
-
<%=Html.CheckBoxFor(m => m.UseAirByDate)%>
- -
-
<%=Html.ValidationMessageFor(m => m.UseAirByDate)%>
-
- -
-
-
<%=Html.LabelFor(m => m.SeasonFolders)%>
-
<%=Html.CheckBoxFor(m => m.SeasonFolders)%>
- -
-
<%=Html.ValidationMessageFor(m => m.SeasonFolders)%>
-
- -
-
-
<%=Html.LabelFor(m => m.SeasonFolderFormat)%>
-
<%=Html.TextBoxFor(m => m.SeasonFolderFormat)%>
-
-
<%=Html.ValidationMessageFor(m => m.SeasonFolderFormat)%>
-
- -
-
-
<%=Html.LabelFor(m => m.SeparatorStyle)%>
-
<%=Html.DropDownListFor(m => m.SeparatorStyle, Model.SeparatorStyles)%>
-
-
<%=Html.ValidationMessageFor(m => m.SeparatorStyle)%>
-
- -
-
-
<%=Html.LabelFor(m => m.NumberStyle)%>
-
<%=Html.DropDownListFor(m => m.NumberStyle, Model.NumberStyles)%>
-
-
<%=Html.ValidationMessageFor(m => m.NumberStyle)%>
-
- -
-
-
<%=Html.LabelFor(m => m.MultiEpisodeStyle)%>
-
<%=Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles)%>
-
-
<%=Html.ValidationMessageFor(m => m.MultiEpisodeStyle)%>
-
- - - - <% - }%> -
-
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml b/NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml new file mode 100644 index 000000000..16c03026e --- /dev/null +++ b/NzbDrone.Web/Views/Settings/EpisodeSorting.cshtml @@ -0,0 +1,124 @@ +@model NzbDrone.Web.Models.EpisodeSortingModel + + +@using (Html.BeginForm("SaveEpisodeSorting", "Settings", FormMethod.Post, new { id = "form", name = "form" })) +{ + @Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") + ; + +
+ Episode Sorting + +
+
+
@Html.LabelFor(m => m.ShowName)
+
@Html.CheckBoxFor(m => m.ShowName)
+ +
+
@Html.ValidationMessageFor(m => m.ShowName)
+
+ +
+
+
@Html.LabelFor(m => m.EpisodeName)
+
@Html.CheckBoxFor(m => m.EpisodeName)
+ +
+
@Html.ValidationMessageFor(m => m.EpisodeName)
+
+ +
+
+
@Html.LabelFor(m => m.ReplaceSpaces)
+
@Html.CheckBoxFor(m => m.ReplaceSpaces)
+ +
+
@Html.ValidationMessageFor(m => m.ReplaceSpaces)
+
+ +
+
+
@Html.LabelFor(m => m.AppendQuality)
+
@Html.CheckBoxFor(m => m.AppendQuality)
+ +
+
@Html.ValidationMessageFor(m => m.AppendQuality)
+
+ +
+
+
@Html.LabelFor(m => m.UseAirByDate)
+
@Html.CheckBoxFor(m => m.UseAirByDate)
+ +
+
@Html.ValidationMessageFor(m => m.UseAirByDate)
+
+ +
+
+
@Html.LabelFor(m => m.SeasonFolders)
+
@Html.CheckBoxFor(m => m.SeasonFolders)
+ +
+
@Html.ValidationMessageFor(m => m.SeasonFolders)
+
+ +
+
+
@Html.LabelFor(m => m.SeasonFolderFormat)
+
@Html.TextBoxFor(m => m.SeasonFolderFormat)
+
+
@Html.ValidationMessageFor(m => m.SeasonFolderFormat)
+
+ +
+
+
@Html.LabelFor(m => m.SeparatorStyle)
+
@Html.DropDownListFor(m => m.SeparatorStyle, Model.SeparatorStyles)
+
+
@Html.ValidationMessageFor(m => m.SeparatorStyle)
+
+ +
+
+
@Html.LabelFor(m => m.NumberStyle)
+
@Html.DropDownListFor(m => m.NumberStyle, Model.NumberStyles)
+
+
@Html.ValidationMessageFor(m => m.NumberStyle)
+
+ +
+
+
@Html.LabelFor(m => m.MultiEpisodeStyle)
+
@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles)
+
+
@Html.ValidationMessageFor(m => m.MultiEpisodeStyle)
+
+ + + +
+} +
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/General.ascx b/NzbDrone.Web/Views/Settings/General.ascx deleted file mode 100644 index 706ebd794..000000000 --- a/NzbDrone.Web/Views/Settings/General.ascx +++ /dev/null @@ -1,92 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> - - - -<% - using (Html.BeginForm("SaveGeneral", "Settings", FormMethod.Post, new {id = "form", name = "form"})) - {%> -<%:Html.ValidationSummary(true, - "Unable to save your settings. Please correct the errors and try again.")%> -
- General - -
- - -
- <% - foreach (var item in Model.Directories) - {%> - <% - Html.RenderPartial("RootDir", item);%> - <% - }%> -
-
- -

- -

-
-<% - } - Html.EndForm();%> -
- - \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/General.cshtml b/NzbDrone.Web/Views/Settings/General.cshtml new file mode 100644 index 000000000..9b49f1e2c --- /dev/null +++ b/NzbDrone.Web/Views/Settings/General.cshtml @@ -0,0 +1,85 @@ +@model NzbDrone.Web.Models.SettingsModel + + + +@using (Html.BeginForm("SaveGeneral", "Settings", FormMethod.Post, new {id = "form", name = "form"})) +{ +@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again."); +
+ General + +
+ + +
+ @foreach (var item in Model.Directories) + { + Html.RenderPartial("RootDir", item); + } +
+
+ +

+ +

+
+} +
+ + \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Notifications.ascx b/NzbDrone.Web/Views/Settings/Notifications.ascx deleted file mode 100644 index 3d6aa96b8..000000000 --- a/NzbDrone.Web/Views/Settings/Notifications.ascx +++ /dev/null @@ -1,168 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> - - - - <% - Html.EnableClientValidation();%> - -<% - using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new {id = "form", name = "form"})) - {%> -<%--<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>--%> - -
- Notification Settings - -
- XBMC -
-
-
<%=Html.LabelFor(m => m.XbmcEnabled)%>
-
<%=Html.CheckBoxFor(m => m.XbmcEnabled)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcEnabled)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcNotifyOnGrab)%>
-
<%=Html.CheckBoxFor(m => m.XbmcNotifyOnGrab)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcNotifyOnGrab)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcNotifyOnDownload)%>
-
<%=Html.CheckBoxFor(m => m.XbmcNotifyOnDownload)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcNotifyOnDownload)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcNotifyOnRename)%>
-
<%=Html.CheckBoxFor(m => m.XbmcNotifyOnRename)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcNotifyOnRename)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcNotificationImage)%>
-
<%=Html.CheckBoxFor(m => m.XbmcNotificationImage)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcNotificationImage)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcDisplayTime)%>
-
<%=Html.TextBoxFor(m => m.XbmcDisplayTime)%>
-
-
<%=Html.ValidationMessageFor(m => m.XbmcDisplayTime)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcUpdateOnDownload)%>
-
<%=Html.CheckBoxFor(m => m.XbmcUpdateOnDownload)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcUpdateOnDownload)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcUpdateOnRename)%>
-
<%=Html.CheckBoxFor(m => m.XbmcUpdateOnRename)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcUpdateOnRename)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcFullUpdate)%>
-
<%=Html.CheckBoxFor(m => m.XbmcFullUpdate)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcFullUpdate)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcCleanOnDownload)%>
-
<%=Html.CheckBoxFor(m => m.XbmcCleanOnDownload)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcCleanOnDownload)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcCleanOnRename)%>
-
<%=Html.CheckBoxFor(m => m.XbmcCleanOnRename)%>
- -
-
<%=Html.ValidationMessageFor(m => m.XbmcCleanOnRename)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcHosts)%>
-
<%=Html.TextBoxFor(m => m.XbmcHosts)%>
-
-
<%=Html.ValidationMessageFor(m => m.XbmcHosts)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcUsername)%>
-
<%=Html.TextBoxFor(m => m.XbmcUsername)%>
-
-
<%=Html.ValidationMessageFor(m => m.XbmcUsername)%>
-
- -
-
-
<%=Html.LabelFor(m => m.XbmcPassword)%>
-
<%=Html.TextBoxFor(m => m.XbmcPassword)%>
-
-
<%=Html.ValidationMessageFor(m => m.XbmcPassword)%>
-
-
- - - - <% - }%> -
-
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Notifications.cshtml b/NzbDrone.Web/Views/Settings/Notifications.cshtml new file mode 100644 index 000000000..6e86784f0 --- /dev/null +++ b/NzbDrone.Web/Views/Settings/Notifications.cshtml @@ -0,0 +1,161 @@ +@model NzbDrone.Web.Models.NotificationSettingsModel + + + +@using (Html.BeginForm("SaveNotifications", "Settings", FormMethod.Post, new {id = "form", name = "form"})) +{ +
+ Notification Settings + +
+ XBMC +
+
+
@Html.LabelFor(m => m.XbmcEnabled)
+
@Html.CheckBoxFor(m => m.XbmcEnabled)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcEnabled)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcNotifyOnGrab)
+
@Html.CheckBoxFor(m => m.XbmcNotifyOnGrab)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcNotifyOnGrab)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcNotifyOnDownload)
+
@Html.CheckBoxFor(m => m.XbmcNotifyOnDownload)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcNotifyOnDownload)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcNotifyOnRename)
+
@Html.CheckBoxFor(m => m.XbmcNotifyOnRename)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcNotifyOnRename)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcNotificationImage)
+
@Html.CheckBoxFor(m => m.XbmcNotificationImage)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcNotificationImage)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcDisplayTime)
+
@Html.TextBoxFor(m => m.XbmcDisplayTime)
+
+
@Html.ValidationMessageFor(m => m.XbmcDisplayTime)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcUpdateOnDownload)
+
@Html.CheckBoxFor(m => m.XbmcUpdateOnDownload)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcUpdateOnDownload)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcUpdateOnRename)
+
@Html.CheckBoxFor(m => m.XbmcUpdateOnRename)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcUpdateOnRename)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcFullUpdate)
+
@Html.CheckBoxFor(m => m.XbmcFullUpdate)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcFullUpdate)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcCleanOnDownload)
+
@Html.CheckBoxFor(m => m.XbmcCleanOnDownload)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcCleanOnDownload)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcCleanOnRename)
+
@Html.CheckBoxFor(m => m.XbmcCleanOnRename)
+ +
+
@Html.ValidationMessageFor(m => m.XbmcCleanOnRename)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcHosts)
+
@Html.TextBoxFor(m => m.XbmcHosts)
+
+
@Html.ValidationMessageFor(m => m.XbmcHosts)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcUsername)
+
@Html.TextBoxFor(m => m.XbmcUsername)
+
+
@Html.ValidationMessageFor(m => m.XbmcUsername)
+
+ +
+
+
@Html.LabelFor(m => m.XbmcPassword)
+
@Html.TextBoxFor(m => m.XbmcPassword)
+
+
@Html.ValidationMessageFor(m => m.XbmcPassword)
+
+
+ + + +
+} +
\ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Quality.ascx b/NzbDrone.Web/Views/Settings/Quality.cshtml similarity index 66% rename from NzbDrone.Web/Views/Settings/Quality.ascx rename to NzbDrone.Web/Views/Settings/Quality.cshtml index e98c4f3b9..2436ebe88 100644 --- a/NzbDrone.Web/Views/Settings/Quality.ascx +++ b/NzbDrone.Web/Views/Settings/Quality.cshtml @@ -1,4 +1,4 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> +@model NzbDrone.Web.Models.QualityModel - <% - Html.EnableClientValidation();%> - <% - using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"})) - {%> +@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"})) +{
- Quality - <%--<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>--%> + Quality
-
<%=Html.LabelFor(m => m.DefaultQualityProfileId)%>
-
<%:Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.SelectList)%>
-
<%=Html.ValidationMessageFor(m => m.DefaultQualityProfileId)%>
+
@Html.LabelFor(m => m.DefaultQualityProfileId)
+
@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.SelectList)
+
@Html.ValidationMessageFor(m => m.DefaultQualityProfileId)
@@ -49,19 +44,17 @@
- <% - foreach (var item in Model.UserProfiles) - {%> - <% - Html.RenderPartial("UserProfileSection", item);%> - <% - }%> + + @foreach (var item in Model.UserProfiles) + { + Html.RenderPartial("UserProfileSection", item); + }
@@ -71,9 +64,7 @@
- - <% - }%> +}
- -
- -
- -
-

<%=Html.DisplayTextFor(m => m.Name)%>

- Delete -
- -
-
<%=Html.LabelFor(x => x.Name)%>
-
<%=Html.TextBoxFor(x => x.Name)%>
-
<%=Html.ValidationMessageFor(x => x.Name)%>
-
- -
-
-

Allowed

-
    - <% - if (Model.Allowed != null) - {%> - <% - for (int i = 0; i < Model.Allowed.Count(); i++) - {%> -
  • - <%=Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i])%> - <%=Html.DisplayTextFor(c => c.Allowed[i])%> -
  • - <% - }%> - <% - }%> -
-
- -
-

Not-Allowed

-
    - <% - var qualitiesList = (List) ViewData["Qualities"];%> - - <% - for (int i = 0; i < qualitiesList.Count(); i++) - {%> - <% - //Skip Unknown and any item that is in the allowed list - if (qualitiesList[i].ToString() == "Unknown") - continue; - - if (Model.Allowed != null) - { - if (Model.Allowed.Contains(qualitiesList[i])) - continue; - } -%> - -
  • - <%=Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i])%> - <%=Html.Label(qualitiesList[i].ToString())%> -
  • - - <% - }%> -
-
-
- - <%=Html.ValidationMessageFor(x => x.Cutoff)%> - -
- <%=Html.TextBoxFor(x => x.QualityProfileId, new {@style = "display:none"})%> - <%=Html.CheckBoxFor(x => x.UserProfile, new {@style = "display:none"})%> - <%=Html.TextBoxFor(m => m.AllowedString, new {@style = "display:none"})%> -
-
-
- - - -<% - }%> \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml b/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml new file mode 100644 index 000000000..a730e3e45 --- /dev/null +++ b/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml @@ -0,0 +1,129 @@ +@model NzbDrone.Core.Repository.Quality.QualityProfile +@using NzbDrone.Core.Repository.Quality +@using NzbDrone.Web.Helpers + +@using (Html.BeginCollectionItem("UserProfiles")) +{ + + var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_'); + + string sortable1 = String.Format("{0}_sortable1", idClean); + string sortable2 = String.Format("{0}_sortable2", idClean); + string allowedStringName = String.Format("{0}_AllowedString", idClean); + string connectedSortable = String.Format("connected{0}", idClean); + string title = String.Format("{0}_Title", idClean); + string nameBox = String.Format("{0}_Name", idClean); + + + + + +
+ +
+ +
+

<@Html.DisplayTextFor(m => m.Name)

+ Delete +
+ +
+
@Html.LabelFor(x => x.Name)
+
@Html.TextBoxFor(x => x.Name)
+
@Html.ValidationMessageFor(x => x.Name)
+
+ +
+
+

Allowed

+
    + @if (Model.Allowed != null) + { + for (int i = 0; i < Model.Allowed.Count(); i++) + { +
  • + @Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i]) + @Html.DisplayTextFor(c => c.Allowed[i]) +
  • + } + } +
+
+ +
+

Not-Allowed

+
    + + @{var qualitiesList = (List)ViewData["Qualities"];} + + @for (int i = 0; i < qualitiesList.Count(); i++) + { + //Skip Unknown and any item that is in the allowed list + if (qualitiesList[i].ToString() == "Unknown") + { + continue; + } + + if (Model.Allowed != null) + { + if (Model.Allowed.Contains(qualitiesList[i])) + { + continue; + } + } + +
  • + @Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i]) + @Html.Label(qualitiesList[i].ToString()) +
  • + } +
+
+
+ + @Html.ValidationMessageFor(x => x.Cutoff) + +
+ @Html.TextBoxFor(x => x.QualityProfileId, new { @style = "display:none" }) + @Html.CheckBoxFor(x => x.UserProfile, new { @style = "display:none" }) + @Html.TextBoxFor(m => m.AllowedString, new { @style = "display:none" }) +
+
+
+ + +} \ No newline at end of file