From 13af6663fef0e8e655bb63bbb13d344ed20a865a Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 20 Apr 2011 23:18:28 -0700 Subject: [PATCH] RAZOR'd Log & Upcoming. Added CSS for setting Grid font size. --- NzbDrone.Web/Content/style.css | 6 +++ .../Views/Log/{Index.aspx => Index.cshtml} | 36 +++++++------ NzbDrone.Web/Views/Shared/SiteLayout.cshtml | 3 -- .../Upcoming/{Index.aspx => Index.cshtml} | 53 +++++++++---------- 4 files changed, 50 insertions(+), 48 deletions(-) rename NzbDrone.Web/Views/Log/{Index.aspx => Index.cshtml} (68%) rename NzbDrone.Web/Views/Upcoming/{Index.aspx => Index.cshtml} (83%) diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index 1e0e80e92..7f44c4fa0 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -268,3 +268,9 @@ button, input[type="button"], input[type="submit"], input[type="reset"] { width: 400px; } + +/* Set the font size for Grids */ +.Grid +{ + font-size: 13px; +} \ No newline at end of file diff --git a/NzbDrone.Web/Views/Log/Index.aspx b/NzbDrone.Web/Views/Log/Index.cshtml similarity index 68% rename from NzbDrone.Web/Views/Log/Index.aspx rename to NzbDrone.Web/Views/Log/Index.cshtml index 748108407..927c11cd3 100644 --- a/NzbDrone.Web/Views/Log/Index.aspx +++ b/NzbDrone.Web/Views/Log/Index.cshtml @@ -1,5 +1,6 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %> - +@model IEnumerable + +@section Scripts{ - - +} + +@section TitleContent{ Logs - - - <% - Html.Telerik().Menu().Name("logMenu").Items(items => items.Add().Text("Clear Logs").Action("Clear", "Log")). - Render(); -%> - - - <% - Html.Telerik().Grid(Model).Name("logs") +} + +@section ActionMenu{ + @{Html.Telerik().Menu().Name("logMenu").Items(items => items.Add().Text("Clear Logs").Action("Clear", "Log")) + .Render();} +} + +@section MainContent{ + @{Html.Telerik().Grid(Model).Name("logsGrid") + .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.Time).Title("Time").Width(190); @@ -49,6 +51,6 @@ c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) .Filterable() .ClientEvents(c => c.OnRowDataBound("onRowDataBound")) - .Render(); -%> - + .Render();} +} + diff --git a/NzbDrone.Web/Views/Shared/SiteLayout.cshtml b/NzbDrone.Web/Views/Shared/SiteLayout.cshtml index 9f877b17a..a3a846299 100644 --- a/NzbDrone.Web/Views/Shared/SiteLayout.cshtml +++ b/NzbDrone.Web/Views/Shared/SiteLayout.cshtml @@ -14,9 +14,6 @@ - @**@ - @**@ - @**@ @RenderSection("HeaderContent", required: false) diff --git a/NzbDrone.Web/Views/Upcoming/Index.aspx b/NzbDrone.Web/Views/Upcoming/Index.cshtml similarity index 83% rename from NzbDrone.Web/Views/Upcoming/Index.aspx rename to NzbDrone.Web/Views/Upcoming/Index.cshtml index 1e87c184b..0f32918b4 100644 --- a/NzbDrone.Web/Views/Upcoming/Index.aspx +++ b/NzbDrone.Web/Views/Upcoming/Index.cshtml @@ -1,10 +1,10 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %> -<%@ Import Namespace="NzbDrone.Web.Models" %> +@model List +@using NzbDrone.Web.Models + +@section Scripts{ - - - - Upcoming - - - <% - Html.Telerik().Menu().Name("historyMenu").Items( - items => { items.Add().Text("Start RSS Sync").Action("RssSync", "Series"); }).Render(); -%> - - +} +@section TitleContent{ + Upcoming +} + +@section ActionMenu{ + @{Html.Telerik().Menu().Name("historyMenu").Items( + items => { items.Add().Text("Start RSS Sync").Action("RssSync", "Series"); }).Render();} +} + +@section MainContent{

Yesterday

- <% - Html.Telerik().Grid().Name("Yesterday").NoRecordsTemplate( + @{Html.Telerik().Grid().Name("Yesterday").NoRecordsTemplate( "No watched shows aired yesterday") + .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.SeriesName) @@ -59,16 +59,15 @@ //.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric)) //.Filterable() //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) - .Render(); -%> + .Render();}

Today

- <% - Html.Telerik().Grid().Name("Today").NoRecordsTemplate("No watched shows airing today.") + @{Html.Telerik().Grid().Name("Today").NoRecordsTemplate("No watched shows airing today.") + .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.SeriesName) @@ -91,17 +90,16 @@ //.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric)) //.Filterable() //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) - .Render(); -%> + .Render();}

7-Day Forecast

- <% - Html.Telerik().Grid().Name("Week").NoRecordsTemplate( + @{Html.Telerik().Grid().Name("Week").NoRecordsTemplate( "No watched shows airing in the next week...") + .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.SeriesName) @@ -124,7 +122,6 @@ //.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric)) //.Filterable() //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) - .Render(); -%> + .Render();}
-
+} \ No newline at end of file