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\SeriesSearchResults.ascx" />
<Content Include="Views\Series\SubMenu.ascx" />
<Content Include="Views\Settings\RootDir.ascx" />
<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\Settings\Index2.aspx" />
<Content Include="Views\Upcoming\Index.aspx" />
<Content Include="Web.config">
<SubType>Designer</SubType>
@ -665,6 +656,17 @@
<Content Include="Views\Settings\Indexers.cshtml" />
<Content Include="Views\Timers\index.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>
<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>
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
{
<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("Indexers").Action("Indexers", "Settings");

View File

@ -28,19 +28,19 @@
<script type="text/javascript">
$(function () {
$("#<%=sortable1%>, #<%=sortable2%>").sortable({
connectWith: ".<%=connectedSortable%>",
$("#@sortable1, #@sortable2").sortable({
connectWith: ".@connectedSortable",
placeholder: "ui-state-highlight",
dropOnEmpty: true,
create: function (event, ui) {
var order = $('#<%=sortable1%>').sortable("toArray");
$("#<%=allowedStringName%>").val(order);
var order = $('#@sortable1').sortable("toArray");
$("#@allowedStringName>").val(order);
},
update: function (event, ui) {
var order = $('#<%=sortable1%>').sortable("toArray");
$("#<%=allowedStringName%>").val(order);
var order = $('#@sortable1').sortable("toArray");
$("#@allowedStringName").val(order);
}
}).disableSelection();
@ -52,7 +52,7 @@
<fieldset style="width:285px; margin:5px; margin-top: 0px; border-color:#CCCCCD">
<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>
</div>
@ -65,12 +65,12 @@
<div id="sortablesDiv" style="margin: 0px;">
<div class="allowedQualities">
<h4 class="sortableHeader">Allowed</h4>
<ul id="<%=sortable1%>" class="<%=connectedSortable%> sortable1">
<ul id="@sortable1" class="@connectedSortable sortable1">
@if (Model.Allowed != null)
{
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.DisplayTextFor(c => c.Allowed[i])
</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.Label(qualitiesList[i].ToString())
</li>
@ -121,9 +121,9 @@
</div>
<script type="text/javascript">
$("#<%:nameBox%>").keyup(function () {
$("#@nameBox").keyup(function () {
var value = $(this).val();
$("#<%=title%>").text(value);
$("#@title").text(value);
}).keyup();
</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";
}