Master page for RAZOR views created and will be auto inherited by pages.

Settings have been RAZORfied.
This commit is contained in:
Mark McDowall 2011-04-20 20:52:09 -07:00
parent b8a3b58c79
commit d3d138c2af
8 changed files with 100 additions and 42 deletions

View File

@ -624,16 +624,7 @@
<Content Include="Views\Series\index.aspx" /> <Content Include="Views\Series\index.aspx" />
<Content Include="Views\Series\SeriesSearchResults.ascx" /> <Content Include="Views\Series\SeriesSearchResults.ascx" />
<Content Include="Views\Series\SubMenu.ascx" /> <Content Include="Views\Series\SubMenu.ascx" />
<Content Include="Views\Settings\RootDir.ascx" /> <Content Include="Views\Settings\Index2.aspx" />
<Content Include="Views\Settings\Notifications.ascx" />
<Content Include="Views\Settings\Downloads2.ascx" />
<Content Include="Views\Settings\EpisodeSorting.ascx" />
<Content Include="Views\Settings\General.ascx" />
<Content Include="Views\Settings\Index.aspx" />
<Content Include="Views\Settings\Quality.ascx" />
<Content Include="Views\Settings\SubMenu.ascx" />
<Content Include="Views\Settings\UserProfileSection.ascx" />
<Content Include="Views\Shared\Footer.ascx" />
<Content Include="Views\Upcoming\Index.aspx" /> <Content Include="Views\Upcoming\Index.aspx" />
<Content Include="Web.config"> <Content Include="Web.config">
<SubType>Designer</SubType> <SubType>Designer</SubType>
@ -665,6 +656,17 @@
<Content Include="Views\Settings\Indexers.cshtml" /> <Content Include="Views\Settings\Indexers.cshtml" />
<Content Include="Views\Timers\index.cshtml" /> <Content Include="Views\Timers\index.cshtml" />
<Content Include="Views\Settings\Downloads.cshtml" /> <Content Include="Views\Settings\Downloads.cshtml" />
<Content Include="Views\Settings\EpisodeSorting.cshtml" />
<Content Include="Views\Settings\General.cshtml" />
<Content Include="Views\Settings\Notifications.cshtml" />
<Content Include="Views\Settings\Quality.cshtml" />
<Content Include="Views\Settings\RootDir.cshtml" />
<Content Include="Views\Settings\SubMenu.cshtml" />
<Content Include="Views\Settings\UserProfileSection.cshtml" />
<Content Include="Views\Shared\SiteLayout.cshtml" />
<Content Include="Views\Shared\Footer.cshtml" />
<Content Include="Views\Settings\Index.cshtml" />
<Content Include="Views\_ViewStart.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="App_Data\" /> <Folder Include="App_Data\" />

View File

@ -1,18 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Settings
</asp:Content>
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
<%
Html.RenderPartial("SubMenu");%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
<%
Html.RenderPartial(ViewData["viewName"].ToString());%>
</asp:Content>

View File

@ -0,0 +1,13 @@
@section TitleContent{
Settings
}
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@section MainContent{
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
@{Html.RenderPartial(ViewData["viewName"].ToString());}
}

View File

@ -24,7 +24,6 @@
} }
</script> </script>
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"})) @using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
{ {
<fieldset> <fieldset>

View File

@ -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("General").Action("General", "Settings");
items.Add().Text("Indexers").Action("Indexers", "Settings"); items.Add().Text("Indexers").Action("Indexers", "Settings");

View File

@ -28,19 +28,19 @@
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
$("#<%=sortable1%>, #<%=sortable2%>").sortable({ $("#@sortable1, #@sortable2").sortable({
connectWith: ".<%=connectedSortable%>", connectWith: ".@connectedSortable",
placeholder: "ui-state-highlight", placeholder: "ui-state-highlight",
dropOnEmpty: true, dropOnEmpty: true,
create: function (event, ui) { create: function (event, ui) {
var order = $('#<%=sortable1%>').sortable("toArray"); var order = $('#@sortable1').sortable("toArray");
$("#<%=allowedStringName%>").val(order); $("#@allowedStringName>").val(order);
}, },
update: function (event, ui) { update: function (event, ui) {
var order = $('#<%=sortable1%>').sortable("toArray"); var order = $('#@sortable1').sortable("toArray");
$("#<%=allowedStringName%>").val(order); $("#@allowedStringName").val(order);
} }
}).disableSelection(); }).disableSelection();
@ -52,7 +52,7 @@
<fieldset style="width:285px; margin:5px; margin-top: 0px; border-color:#CCCCCD"> <fieldset style="width:285px; margin:5px; margin-top: 0px; border-color:#CCCCCD">
<div id="qualityHeader" style="padding-bottom: 5px; margin: 0px;"> <div id="qualityHeader" style="padding-bottom: 5px; margin: 0px;">
<h2 style="display:inline; padding-right: 4px; margin-left: 4px;" id="<%=title%>"><@Html.DisplayTextFor(m => m.Name)</h2> <h2 style="display:inline; padding-right: 4px; margin-left: 4px;" id="@title"><@Html.DisplayTextFor(m => m.Name)</h2>
<a href="#" class="deleteRow"><img src="../../Content/Images/X.png" alt="Delete" /></a> <a href="#" class="deleteRow"><img src="../../Content/Images/X.png" alt="Delete" /></a>
</div> </div>
@ -65,12 +65,12 @@
<div id="sortablesDiv" style="margin: 0px;"> <div id="sortablesDiv" style="margin: 0px;">
<div class="allowedQualities"> <div class="allowedQualities">
<h4 class="sortableHeader">Allowed</h4> <h4 class="sortableHeader">Allowed</h4>
<ul id="<%=sortable1%>" class="<%=connectedSortable%> sortable1"> <ul id="@sortable1" class="@connectedSortable sortable1">
@if (Model.Allowed != null) @if (Model.Allowed != null)
{ {
for (int i = 0; i < Model.Allowed.Count(); i++) for (int i = 0; i < Model.Allowed.Count(); i++)
{ {
<li class="ui-state-default" id="<%=Model.Allowed[i].ToString()%>"> <li class="ui-state-default" id="@Model.Allowed[i].ToString()">
@Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i]) @Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i])
@Html.DisplayTextFor(c => c.Allowed[i]) @Html.DisplayTextFor(c => c.Allowed[i])
</li> </li>
@ -101,7 +101,7 @@
} }
} }
<li class="ui-state-default" id="<%=qualitiesList[i].ToString()%>"> <li class="ui-state-default" id="@qualitiesList[i].ToString()">
@Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i]) @Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i])
@Html.Label(qualitiesList[i].ToString()) @Html.Label(qualitiesList[i].ToString())
</li> </li>
@ -121,9 +121,9 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#<%:nameBox%>").keyup(function () { $("#@nameBox").keyup(function () {
var value = $(this).val(); var value = $(this).val();
$("#<%=title%>").text(value); $("#@title").text(value);
}).keyup(); }).keyup();
</script> </script>
} }

View File

@ -0,0 +1,59 @@
@using Helpers;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head runat="server">
<link rel="SHORTCUT ICON" href="../../favicon.ico"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>NZBDrone</title>
@{Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css")
.Add("telerik.sitefinity.css")
.Add("notibar.css"))
.Render();}
<link href="../../Content/style.css" rel="stylesheet" type="text/css" />
<link href="../../Content/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="../../Content/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
@*<link href="../../Content/jquery-simpledropdown.css" rel="stylesheet" type="text/css" />*@
@*<script type="text/javascript" src="../../Scripts/jquery-1.5.2.min.js"></script>*@
@*<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.8.min.js"></script>*@
@RenderSection("HeaderContent", required: false)
</head>
<body>
<div id="centered">
<div id="menu">
<ul>
@MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series"))
@MvcHtmlString.Create(Html.CurrentActionLink("Upcoming", "Index", "Upcoming"))
@MvcHtmlString.Create(Html.CurrentActionLink("History", "Index", "History"))
@MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings"))
@MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))
</ul>
</div>
<div id="logo">
@RenderSection("TitleContent", required: false)
</div>
<div id="page">
@RenderSection("ActionMenu", required: false)
@RenderSection("MainContent", required: false)
@RenderBody()
</div>
<div id="footer">
@{Html.RenderAction("Footer", "Shared");}
</div>
<div id="msgBox">
<span id="msgText">Scanning Series Folder...</span>
</div>
</div>
</body>
@{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();}
</html>

View File

@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/SiteLayout.cshtml";
}