From d3d138c2af689c3ed3256a788e758699b3fcf6a1 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 20 Apr 2011 20:52:09 -0700 Subject: [PATCH] Master page for RAZOR views created and will be auto inherited by pages. Settings have been RAZORfied. --- NzbDrone.Web/NzbDrone.Web.csproj | 22 +++---- NzbDrone.Web/Views/Settings/Index.aspx | 18 ------ NzbDrone.Web/Views/Settings/Index.cshtml | 13 ++++ NzbDrone.Web/Views/Settings/Quality.cshtml | 1 - NzbDrone.Web/Views/Settings/SubMenu.cshtml | 2 +- .../Views/Settings/UserProfileSection.cshtml | 24 ++++---- NzbDrone.Web/Views/Shared/SiteLayout.cshtml | 59 +++++++++++++++++++ NzbDrone.Web/Views/_ViewStart.cshtml | 3 + 8 files changed, 100 insertions(+), 42 deletions(-) delete mode 100644 NzbDrone.Web/Views/Settings/Index.aspx create mode 100644 NzbDrone.Web/Views/Settings/Index.cshtml create mode 100644 NzbDrone.Web/Views/Shared/SiteLayout.cshtml create mode 100644 NzbDrone.Web/Views/_ViewStart.cshtml diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 7941ec777..af29bd968 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -624,16 +624,7 @@ - - - - - - - - - - + Designer @@ -665,6 +656,17 @@ + + + + + + + + + + + diff --git a/NzbDrone.Web/Views/Settings/Index.aspx b/NzbDrone.Web/Views/Settings/Index.aspx deleted file mode 100644 index 94128dffa..000000000 --- a/NzbDrone.Web/Views/Settings/Index.aspx +++ /dev/null @@ -1,18 +0,0 @@ -<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> - - - Settings - - - - - <% - Html.RenderPartial("SubMenu");%> - - - - - - <% - Html.RenderPartial(ViewData["viewName"].ToString());%> - diff --git a/NzbDrone.Web/Views/Settings/Index.cshtml b/NzbDrone.Web/Views/Settings/Index.cshtml new file mode 100644 index 000000000..7da7aa1ba --- /dev/null +++ b/NzbDrone.Web/Views/Settings/Index.cshtml @@ -0,0 +1,13 @@ +@section TitleContent{ + Settings +} + +@section ActionMenu{ + @{Html.RenderPartial("SubMenu");} +} + +@section MainContent{ + + + @{Html.RenderPartial(ViewData["viewName"].ToString());} +} diff --git a/NzbDrone.Web/Views/Settings/Quality.cshtml b/NzbDrone.Web/Views/Settings/Quality.cshtml index 2436ebe88..c65215dc9 100644 --- a/NzbDrone.Web/Views/Settings/Quality.cshtml +++ b/NzbDrone.Web/Views/Settings/Quality.cshtml @@ -24,7 +24,6 @@ } - @using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"})) {
diff --git a/NzbDrone.Web/Views/Settings/SubMenu.cshtml b/NzbDrone.Web/Views/Settings/SubMenu.cshtml index 3f675ed33..e796bb556 100644 --- a/NzbDrone.Web/Views/Settings/SubMenu.cshtml +++ b/NzbDrone.Web/Views/Settings/SubMenu.cshtml @@ -1,4 +1,4 @@ -@{Html.Telerik().Menu().Name("Menu").Items(items => +@{Html.Telerik().Menu().Name("SubMenu").Items(items => { items.Add().Text("General").Action("General", "Settings"); items.Add().Text("Indexers").Action("Indexers", "Settings"); diff --git a/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml b/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml index a730e3e45..04701f15f 100644 --- a/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml +++ b/NzbDrone.Web/Views/Settings/UserProfileSection.cshtml @@ -28,19 +28,19 @@ } \ No newline at end of file diff --git a/NzbDrone.Web/Views/Shared/SiteLayout.cshtml b/NzbDrone.Web/Views/Shared/SiteLayout.cshtml new file mode 100644 index 000000000..fed6c00c5 --- /dev/null +++ b/NzbDrone.Web/Views/Shared/SiteLayout.cshtml @@ -0,0 +1,59 @@ +@using Helpers; + + + + + + + NZBDrone + @{Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css") + .Add("telerik.sitefinity.css") + .Add("notibar.css")) + .Render();} + + + + + @**@ + @**@ + @**@ + + @RenderSection("HeaderContent", required: false) + + +
+ + +
+ @RenderSection("ActionMenu", required: false) + @RenderSection("MainContent", required: false) + @RenderBody() +
+ +
+ Scanning Series Folder... +
+
+ + @{Html.Telerik().ScriptRegistrar().Scripts( + c => c.Add("jquery-ui-1.8.8.min.js") + .Add("jquery.form.js") + .Add("jquery.jgrowl.js") + .Add("Notification.js") + .Add("jquery-tgc-countdown-1.0.js") + .Add("MicrosoftAjax.js") + .Add("MicrosoftMvcValidation.js")) + .Render();} + diff --git a/NzbDrone.Web/Views/_ViewStart.cshtml b/NzbDrone.Web/Views/_ViewStart.cshtml new file mode 100644 index 000000000..bf880d908 --- /dev/null +++ b/NzbDrone.Web/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "~/Views/Shared/SiteLayout.cshtml"; +}