From 3e28862e14e3172d639a977adf17d5a43a1012be Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 20 Apr 2011 21:10:08 -0700 Subject: [PATCH] AddSeries views updated to RAZOR. --- NzbDrone.Web/Views/AddSeries/AddExisting.aspx | 44 ------------- .../Views/AddSeries/AddExisting.cshtml | 35 +++++++++++ .../AddSeries/{AddNew.aspx => AddNew.cshtml} | 61 ++++++++----------- 3 files changed, 61 insertions(+), 79 deletions(-) delete mode 100644 NzbDrone.Web/Views/AddSeries/AddExisting.aspx create mode 100644 NzbDrone.Web/Views/AddSeries/AddExisting.cshtml rename NzbDrone.Web/Views/AddSeries/{AddNew.aspx => AddNew.cshtml} (62%) diff --git a/NzbDrone.Web/Views/AddSeries/AddExisting.aspx b/NzbDrone.Web/Views/AddSeries/AddExisting.aspx deleted file mode 100644 index eabe101b0..000000000 --- a/NzbDrone.Web/Views/AddSeries/AddExisting.aspx +++ /dev/null @@ -1,44 +0,0 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %> - - Add Existing Series - - - <% - if (Model.Count() == 0) - Html.DisplayText("No Series to Add"); -%> - - <%:Html.DropDownList("masterDropbox", (SelectList) ViewData["qualities"], - new {style = "width: 100px;", id = "masterDropboxId"})%> - - <%: - @Html.Telerik().DropDownList().Name("tester").BindTo((SelectList) ViewData["qualities"]).HtmlAttributes( - new {style = "width: 100px", @class = "qualityDropbox"})%> - - - - <% - foreach (var path in Model) - { - Html.RenderAction("RenderPartial", "AddSeries", new {path}); - } - -%> - - - - \ No newline at end of file diff --git a/NzbDrone.Web/Views/AddSeries/AddExisting.cshtml b/NzbDrone.Web/Views/AddSeries/AddExisting.cshtml new file mode 100644 index 000000000..3c6e98df7 --- /dev/null +++ b/NzbDrone.Web/Views/AddSeries/AddExisting.cshtml @@ -0,0 +1,35 @@ +@model IEnumerable + +@section TitleContent{ + Add Existing Series +} + +@section MainContent{ + + @if (Model.Count() == 0) + { + @Html.DisplayText("No Series to Add"); + } + + @Html.DropDownList("masterDropbox", (SelectList) ViewData["qualities"], + new {style = "width: 100px;", id = "masterDropboxId"}) + + @Html.Telerik().DropDownList().Name("tester").BindTo((SelectList) ViewData["qualities"]).HtmlAttributes( + new {style = "width: 100px", @class = "qualityDropbox"}) + + @foreach (var path in Model) + { + Html.RenderAction("RenderPartial", "AddSeries", new {path}); + } + + +} \ No newline at end of file diff --git a/NzbDrone.Web/Views/AddSeries/AddNew.aspx b/NzbDrone.Web/Views/AddSeries/AddNew.cshtml similarity index 62% rename from NzbDrone.Web/Views/AddSeries/AddNew.aspx rename to NzbDrone.Web/Views/AddSeries/AddNew.cshtml index 995b545c8..c1c5ba653 100644 --- a/NzbDrone.Web/Views/AddSeries/AddNew.aspx +++ b/NzbDrone.Web/Views/AddSeries/AddNew.cshtml @@ -1,48 +1,50 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> - +@model NzbDrone.Web.Models.AddNewSeriesModel + +@section TitleContent{ Add New Series + - - +} + +@section MainContent{
- <%=Html.Label("Enter a Series Name")%> - <%=Html.TextBox("new_series_name", String.Empty, new {id = "new_series_id"})%> + @Html.Label("Enter a Series Name") + @Html.TextBox("new_series_name", String.Empty, new {id = "new_series_id"})
- <%=Html.LabelFor(m => m.QualityProfileId)%> - <%:Html.DropDownListFor(m => m.QualityProfileId, Model.QualitySelectList)%> + @Html.LabelFor(m => m.QualityProfileId) + @Html.DropDownListFor(m => m.QualityProfileId, Model.QualitySelectList)
-
-
+ +
+ -
-
+ +
+ -
-
-
+} \ No newline at end of file