diff --git a/NzbDrone.Web/Views/History/Index.cshtml b/NzbDrone.Web/Views/History/Index.cshtml index 9a6069baa..0639db171 100644 --- a/NzbDrone.Web/Views/History/Index.cshtml +++ b/NzbDrone.Web/Views/History/Index.cshtml @@ -5,54 +5,50 @@ History } @section ActionMenu{ <ul class="sub-menu"> - <li>@Ajax.ActionLink("Trim History", "Trim", "History", new AjaxOptions{ OnSuccess = "reloadHistoryGrid" })</li> - <li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid"})</li> + <li>@Ajax.ActionLink("Trim History", "Trim", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li> + <li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li> </ul> } - <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" /> - -@section MainContent{ - <div class="grid-container"> - @{Html.Telerik().Grid<HistoryModel>().Name("history") - .TableHtmlAttributes(new { @class = "Grid" }) - .Columns(columns => - { - columns.Bound(c => c.Indexer) - .ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/Indexers/") + "<#= Indexer #>.png' /></center>") - .Title("") - .Width(20); - columns.Bound(c => c.SeriesTitle) - .ClientTemplate("<a href=" + - Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + - "><#= SeriesTitle #></a>") - .Title("Series Title"); - columns.Bound(c => c.SeasonNumber).Title("Season").Width(1); - columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1); - columns.Bound(c => c.EpisodeTitle).Title("Episode Title"); - columns.Bound(c => c.Quality).Title("Quality").Width(50); - columns.Bound(c => c.Date).Title("Grabbed on"); - columns.Bound(c => c.HistoryId) - .Title("Actions") - .ClientTemplate("<a href=\"../History/Delete?historyId=<#= HistoryId #>\" onclick=\"deleteHistoryRow(<#= HistoryId #>); return false;\"><img src='../../Content/Images/X.png' alt='Delete' title='Delete from History' class='searchImage' /></a>" + - "<a href=\"../History/Redownload?historyId=<#= HistoryId #>&episodeId=<#= EpisodeId #>\" onclick=\"redownload(<#= HistoryId #>, <#= EpisodeId #>); return false;\"><img src='../../Content/Images/Downloading.png' alt='Redownload' title='Redownload Episode' class='searchImage' /></a>") - .Width("40"); - }) - .DetailView(detailView => detailView.ClientTemplate( - "<fieldset>" + - "<div><b>Overview: </b><#= EpisodeOverview #></div>" + - "<div><b>NZB Title: </b><#= NzbTitle #></div>" + - "<div><b>Proper: </b><#= IsProper #></div>" + - "</fieldset>" - )) - .DataBinding(data => data.Ajax().Select("_AjaxBinding", "History")) - .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Date).Descending()).Enabled(true)) - .Pageable( - c => - c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) - .Render();} - </div> -} +<div class="grid-container"> + @{Html.Telerik().Grid<HistoryModel>().Name("history") + .TableHtmlAttributes(new { @class = "Grid" }) + .Columns(columns => + { + columns.Bound(c => c.Indexer) + .ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/Indexers/") + "<#= Indexer #>.png' /></center>") + .Title("") + .Width(20); + columns.Bound(c => c.SeriesTitle) + .ClientTemplate("<a href=" + + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + + "><#= SeriesTitle #></a>") + .Title("Series Title"); + columns.Bound(c => c.SeasonNumber).Title("Season").Width(1); + columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1); + columns.Bound(c => c.EpisodeTitle).Title("Episode Title"); + columns.Bound(c => c.Quality).Title("Quality").Width(50); + columns.Bound(c => c.Date).Title("Grabbed on"); + columns.Bound(c => c.HistoryId) + .Title("Actions") + .ClientTemplate("<a href=\"../History/Delete?historyId=<#= HistoryId #>\" onclick=\"deleteHistoryRow(<#= HistoryId #>); return false;\"><img src='../../Content/Images/X.png' alt='Delete' title='Delete from History' class='searchImage' /></a>" + + "<a href=\"../History/Redownload?historyId=<#= HistoryId #>&episodeId=<#= EpisodeId #>\" onclick=\"redownload(<#= HistoryId #>, <#= EpisodeId #>); return false;\"><img src='../../Content/Images/Downloading.png' alt='Redownload' title='Redownload Episode' class='searchImage' /></a>") + .Width("40"); + }) + .DetailView(detailView => detailView.ClientTemplate( + "<fieldset>" + + "<div><b>Overview: </b><#= EpisodeOverview #></div>" + + "<div><b>NZB Title: </b><#= NzbTitle #></div>" + + "<div><b>Proper: </b><#= IsProper #></div>" + + "</fieldset>" + )) + .DataBinding(data => data.Ajax().Select("_AjaxBinding", "History")) + .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Date).Descending()).Enabled(true)) + .Pageable( + c => + c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) + .Render();} +</div> <script type="text/javascript"> deleteHistoryRowUrl = '../History/Delete'; @@ -84,4 +80,4 @@ History } }); } -</script> \ No newline at end of file +</script> diff --git a/NzbDrone.Web/Views/Log/Index.cshtml b/NzbDrone.Web/Views/Log/Index.cshtml index c39c3bad6..001e5315c 100644 --- a/NzbDrone.Web/Views/Log/Index.cshtml +++ b/NzbDrone.Web/Views/Log/Index.cshtml @@ -30,10 +30,9 @@ Logs <div style="margin-bottom: 10px"> </div> } -@section MainContent{ - <div class="infoBox"> - Log entries older than 30 days are automatically deleted.</div> - @{Html.Telerik().Grid<Log>().Name("logsGrid") +<div class="infoBox"> + Log entries older than 30 days are automatically deleted.</div> +@{Html.Telerik().Grid<Log>().Name("logsGrid") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { @@ -52,9 +51,8 @@ Logs .Pageable(paging => paging.Style(GridPagerStyles.Status).PageOnScroll(true).PageSize(100)) .Filterable() .ClientEvents(c => c.OnRowDataBound("onRowDataBound")) - .Scrollable(c=>c.Height(500)) + .Scrollable(c => c.Height(500)) .Render();} -} <script type="text/javascript"> function reloadGrid() { var grid = $('#logsGrid').data('tGrid'); diff --git a/NzbDrone.Web/Views/Misnamed/Index.cshtml b/NzbDrone.Web/Views/Misnamed/Index.cshtml index af73d276b..a036c9bba 100644 --- a/NzbDrone.Web/Views/Misnamed/Index.cshtml +++ b/NzbDrone.Web/Views/Misnamed/Index.cshtml @@ -4,11 +4,10 @@ Misnamed } @section ActionMenu{ <ul class="sub-menu"> - <li>@Ajax.ActionLink("Trim History", "Trim", "History", new AjaxOptions{ OnSuccess = "reloadHistoryGrid" })</li> - <li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid"})</li> + <li>@Ajax.ActionLink("Trim History", "Trim", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li> + <li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions { OnSuccess = "reloadHistoryGrid" })</li> </ul> } - <style> .searchImage { @@ -26,10 +25,8 @@ Misnamed background-color: #065EFE; } </style> - -@section MainContent{ - <div class="grid-container"> - @{Html.Telerik().Grid<MisnamedEpisodeModel>().Name("misnamed") +<div class="grid-container"> + @{Html.Telerik().Grid<MisnamedEpisodeModel>().Name("misnamed") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { @@ -54,9 +51,7 @@ Misnamed clientEvents.OnDataBound("grid_dataBound"); }) .Render();} - </div> -} - +</div> <script type="text/javascript"> deleteHistoryRowUrl = '../History/Delete'; redownloadUrl = '../History/Redownload'; @@ -94,4 +89,4 @@ Misnamed var lastButton = $('#' + id + ' .t-arrow-last'); lastButton.hide(); } -</script> \ No newline at end of file +</script> diff --git a/NzbDrone.Web/Views/Missing/Index.cshtml b/NzbDrone.Web/Views/Missing/Index.cshtml index dc7925543..8bdd18da2 100644 --- a/NzbDrone.Web/Views/Missing/Index.cshtml +++ b/NzbDrone.Web/Views/Missing/Index.cshtml @@ -1,21 +1,16 @@ @model List<MissingEpisodeModel> @using NzbDrone.Web.Models; - @section TitleContent{ Missing } - <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" /> - @section ActionMenu{ <ul class="sub-menu"> <li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li> <li>@Ajax.ActionLink("Start Backlog Search", "BacklogSearch", "Command", null, null)</li> </ul> } - -@section MainContent{ - @{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing") +@{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { @@ -51,4 +46,3 @@ Missing c => c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) .Render();} -} \ No newline at end of file diff --git a/NzbDrone.Web/Views/Series/Details.cshtml b/NzbDrone.Web/Views/Series/Details.cshtml index bb01376e1..2d88ea812 100644 --- a/NzbDrone.Web/Views/Series/Details.cshtml +++ b/NzbDrone.Web/Views/Series/Details.cshtml @@ -71,7 +71,7 @@ <li>@Ajax.ActionLink("Rename Episodes", "RenameEpisodes", "Episode", new { seriesId = Model.SeriesId }, null)</li> </ul> } -@section MainContent{ + <div id="banner-container"> @{ var bannerUrl = "../../Content/Images/img03.jpg"; @@ -146,7 +146,7 @@ .Render();} </div> } -} + @section Scripts{ <script type="text/javascript"> seriesId = @Model.SeriesId; diff --git a/NzbDrone.Web/Views/Series/Index.cshtml b/NzbDrone.Web/Views/Series/Index.cshtml index 20f17f398..225f83a98 100644 --- a/NzbDrone.Web/Views/Series/Index.cshtml +++ b/NzbDrone.Web/Views/Series/Index.cshtml @@ -1,10 +1,8 @@ -@using NzbDrone.Core.Helpers; @using NzbDrone.Web.Models; @model IEnumerable<NzbDrone.Core.Repository.Series> @section TitleContent{ NzbDrone } - <style> /* progress bar container */ .progressbar @@ -47,16 +45,14 @@ NzbDrone background: #E5ECF9; } </style> - @section ActionMenu{ <ul class="sub-menu"> <li>@Html.ActionLink("Add Series", "Index", "AddSeries")</li> <li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null)</li> </ul> } -@section MainContent{ - <div class="grid-container"> - @{Html.Telerik().Grid<SeriesModel>().Name("Grid") +<div class="grid-container"> + @{Html.Telerik().Grid<SeriesModel>().Name("Grid") .TableHtmlAttributes(new { @class = "Grid" }) .DataKeys(keys => keys.Add(p => p.SeriesId)) .DataBinding(data => data.Ajax() @@ -89,7 +85,7 @@ NzbDrone }) .Editable(editor => editor.Mode(GridEditMode.PopUp)) - //.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(true)) + //.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(true)) .DetailView(detailView => detailView.ClientTemplate( "<b>Airs Day of Week:</b> " + "<#= AirsDayOfWeek #>" + "<br />" + @@ -103,8 +99,7 @@ NzbDrone clientEvents.OnRowDataBound("grid_rowBound"); }) .Render();} - </div> -} +</div> @section Scripts{ <script type="text/javascript"> var windowElement; @@ -128,7 +123,7 @@ NzbDrone $("#progressbar_" + seriesId).episodeProgress(episodeFileCount, episodeCount); } - + (function ($) { $.fn.episodeProgress = function (episodes, totalEpisodes) { return this.each( diff --git a/NzbDrone.Web/Views/Settings/Index.cshtml b/NzbDrone.Web/Views/Settings/Index.cshtml index a99d7fe44..b079661bf 100644 --- a/NzbDrone.Web/Views/Settings/Index.cshtml +++ b/NzbDrone.Web/Views/Settings/Index.cshtml @@ -10,15 +10,13 @@ Settings }); </script> } -@section MainContent{ - <div id="tabs222"> - <ul> - <li>@Html.ActionLink("Naming", "Naming", "Settings")</li> - <li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li> - <li>@Html.ActionLink("Quality", "Quality", "Settings")</li> - <li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li> - <li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li> - <li>@Html.ActionLink("System", "System", "Settings")</li> - </ul> - </div> -} +<div id="tabs222"> + <ul> + <li>@Html.ActionLink("Naming", "Naming", "Settings")</li> + <li>@Html.ActionLink("Indexers", "Indexers", "Settings")</li> + <li>@Html.ActionLink("Quality", "Quality", "Settings")</li> + <li>@Html.ActionLink("SABnzbd", "Sabnzbd", "Settings")</li> + <li>@Html.ActionLink("Notifications", "Notifications", "Settings")</li> + <li>@Html.ActionLink("System", "System", "Settings")</li> + </ul> +</div> diff --git a/NzbDrone.Web/Views/Shared/Error.cshtml b/NzbDrone.Web/Views/Shared/Error.cshtml index 388f25e37..208445879 100644 --- a/NzbDrone.Web/Views/Shared/Error.cshtml +++ b/NzbDrone.Web/Views/Shared/Error.cshtml @@ -1,15 +1,11 @@ @model HandleErrorInfo - @section TitleContent { - EPIC FAIL!!! +EPIC FAIL!!! } -@section MainContent -{ - <h2> - @Model.Exception.Message - </h2> - <br /> - @Model.Exception.ToString() -} \ No newline at end of file +<h2> + @Model.Exception.Message +</h2> +<br /> +@Model.Exception.ToString() diff --git a/NzbDrone.Web/Views/System/Config.cshtml b/NzbDrone.Web/Views/System/Config.cshtml index 79ebacdd0..88d2770de 100644 --- a/NzbDrone.Web/Views/System/Config.cshtml +++ b/NzbDrone.Web/Views/System/Config.cshtml @@ -2,8 +2,7 @@ @section TitleContent{ Configuration } -@section MainContent{ - @(Html.Telerik().Grid<NzbDrone.Core.Repository.Config>() +@(Html.Telerik().Grid<NzbDrone.Core.Repository.Config>() .Name("Grid") .TableHtmlAttributes(new { @class = "Grid" }) .DataKeys(keys => @@ -30,4 +29,3 @@ Configuration .Editable(editing => editing.Mode(GridEditMode.InLine)) .Sortable() ) -} diff --git a/NzbDrone.Web/Views/System/Indexers.cshtml b/NzbDrone.Web/Views/System/Indexers.cshtml index 03cd11007..3bc26ace9 100644 --- a/NzbDrone.Web/Views/System/Indexers.cshtml +++ b/NzbDrone.Web/Views/System/Indexers.cshtml @@ -2,8 +2,6 @@ @section TitleContent{ Indexers } -@section MainContent{ - @{Html.Telerik().Grid(Model).Name("Grid") +@{Html.Telerik().Grid(Model).Name("Grid") .TableHtmlAttributes(new { @class = "Grid" }) .Render();} -} diff --git a/NzbDrone.Web/Views/System/Jobs.cshtml b/NzbDrone.Web/Views/System/Jobs.cshtml index 61194f6bd..36b33a308 100644 --- a/NzbDrone.Web/Views/System/Jobs.cshtml +++ b/NzbDrone.Web/Views/System/Jobs.cshtml @@ -1,10 +1,9 @@ -@using System.Collections -@using NzbDrone.Web.Models +@using NzbDrone.Web.Models @model IEnumerable<NzbDrone.Core.Repository.JobDefinition> @section TitleContent{ Jobs } -@section MainContent{ + @{Html.Telerik().Grid(Model).Name("Grid") .Render();} @@ -15,4 +14,4 @@ Jobs .Columns(c => c.Bound(g => g.TargetId).Title("Target")) .Columns(c => c.Bound(g => g.SecondaryTargetId).Title("Secondary Target")) .Render();} -} + diff --git a/NzbDrone.Web/Views/System/PendingProcessing.cshtml b/NzbDrone.Web/Views/System/PendingProcessing.cshtml index ae3836c78..95d0f59b5 100644 --- a/NzbDrone.Web/Views/System/PendingProcessing.cshtml +++ b/NzbDrone.Web/Views/System/PendingProcessing.cshtml @@ -10,9 +10,8 @@ Pending Processing items.Add().Text("Purge History").Action("Purge", "History"); }).Render();} } -@section MainContent{ - <div class="grid-container"> - @{Html.Telerik().Grid<PendingProcessingModel>().Name("PendingProcessingGrid") +<div class="grid-container"> + @{Html.Telerik().Grid<PendingProcessingModel>().Name("PendingProcessingGrid") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { @@ -30,8 +29,7 @@ Pending Processing c => c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious)) .Render();} - </div> -} +</div> <script type="text/javascript"> var renamePendingUrl = '@Url.Action("RenamePendingProcessing", "System")'; @@ -51,4 +49,4 @@ Pending Processing } }); } -</script> \ No newline at end of file +</script> diff --git a/NzbDrone.Web/Views/Upcoming/Index.cshtml b/NzbDrone.Web/Views/Upcoming/Index.cshtml index 6b5b85e0d..3ce90519f 100644 --- a/NzbDrone.Web/Views/Upcoming/Index.cshtml +++ b/NzbDrone.Web/Views/Upcoming/Index.cshtml @@ -3,19 +3,17 @@ @section TitleContent{ Upcoming } - <link href="../../Content/Grid.css" rel="stylesheet" type="text/css" /> - @section ActionMenu{ - <ul class="sub-menu"> + <ul class="sub-menu"> <li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li> </ul> } -@section MainContent{ - <div id="yesterday"> - <h2>Yesterday</h2> - <div class="grid-container"> - @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate( +<div id="yesterday"> + <h2> + Yesterday</h2> + <div class="grid-container"> + @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate( "No watched shows aired yesterday") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => @@ -43,17 +41,18 @@ Upcoming )) .DataBinding(data => data.Ajax().Select("_AjaxBindingYesterday", "Upcoming")) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true)) - //.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric)) - //.Filterable() - //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) + //.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric)) + //.Filterable() + //.ClientEvents(c => c.OnRowDataBound("onRowDataBound")) .Render();} - </div> </div> - <br /> - <div id="today"> - <h2>Today</h2> - <div class="grid-container"> - @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.") +</div> +<br /> +<div id="today"> + <h2> + Today</h2> + <div class="grid-container"> + @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { @@ -81,13 +80,14 @@ Upcoming .DataBinding(data => data.Ajax().Select("_AjaxBindingToday", "Upcoming")) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true)) .Render();} - </div> </div> - <br /> - <div id="tomorrow"> - <h2>Tomorrow</h2> - <div class="grid-container"> - @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Tomorrow").NoRecordsTemplate( +</div> +<br /> +<div id="tomorrow"> + <h2> + Tomorrow</h2> + <div class="grid-container"> + @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Tomorrow").NoRecordsTemplate( "No watched shows airing tomorrow") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => @@ -117,13 +117,14 @@ Upcoming .DataBinding(data => data.Ajax().Select("_AjaxBindingTomorrow", "Upcoming")) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true)) .Render();} - </div> </div> - <br /> - <div id="week"> - <h2>Future Forecast</h2> - <div class="grid-container"> - @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate( +</div> +<br /> +<div id="week"> + <h2> + Future Forecast</h2> + <div class="grid-container"> + @{Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate( "No watched shows airing in the next week...") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => @@ -152,6 +153,5 @@ Upcoming .DataBinding(data => data.Ajax().Select("_AjaxBindingWeek", "Upcoming")) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDateTime).Ascending()).Enabled(true)) .Render();} - </div> </div> -} +</div>