Added upcoming and history links to main menu.
Made Upcoming look a bit better, still needs work. Wrapped Details in Upcoming/History in fieldset
This commit is contained in:
parent
6c818bd8d8
commit
7a57ab98dc
|
@ -488,7 +488,7 @@ div.t-window-content {
|
||||||
border-width: 0 1px 1px 0;
|
border-width: 0 1px 1px 0;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0.3em 0.3em;
|
padding: 0.3em 0.6em;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.t-grid-header .t-last-header {
|
.t-grid-header .t-last-header {
|
||||||
|
@ -500,7 +500,7 @@ div.t-window-content {
|
||||||
height: 18px;
|
height: 18px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
margin: -0.3em -0.6em;
|
margin: -0.3em -0.6em;
|
||||||
padding: 0.3em 0.3em 0.3em 0.6em;
|
padding: 0.3em 2.4em 0.3em 0.6em;
|
||||||
}
|
}
|
||||||
.t-grid-header .t-header .t-icon {
|
.t-grid-header .t-header .t-icon {
|
||||||
position: static;
|
position: static;
|
||||||
|
|
|
@ -30,14 +30,15 @@ namespace NzbDrone.Web.Controllers
|
||||||
public ActionResult _AjaxBindingYesterday()
|
public ActionResult _AjaxBindingYesterday()
|
||||||
{
|
{
|
||||||
var upcoming = _upcomingEpisodesProvider.Yesterday().Select(e => new UpcomingEpisodeModel
|
var upcoming = _upcomingEpisodesProvider.Yesterday().Select(e => new UpcomingEpisodeModel
|
||||||
{
|
{
|
||||||
SeriesName = e.Series.Title,
|
SeriesId = e.Series.SeriesId,
|
||||||
SeasonNumber = e.SeasonNumber,
|
SeriesName = e.Series.Title,
|
||||||
EpisodeNumber = e.EpisodeNumber,
|
SeasonNumber = e.SeasonNumber,
|
||||||
Title = e.Title,
|
EpisodeNumber = e.EpisodeNumber,
|
||||||
Overview = e.Overview,
|
Title = e.Title,
|
||||||
AirDate = e.AirDate
|
Overview = e.Overview,
|
||||||
});
|
AirDate = e.AirDate
|
||||||
|
});
|
||||||
|
|
||||||
return View(new GridModel(upcoming));
|
return View(new GridModel(upcoming));
|
||||||
}
|
}
|
||||||
|
@ -47,6 +48,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
{
|
{
|
||||||
var upcoming = _upcomingEpisodesProvider.Today().Select(e => new UpcomingEpisodeModel
|
var upcoming = _upcomingEpisodesProvider.Today().Select(e => new UpcomingEpisodeModel
|
||||||
{
|
{
|
||||||
|
SeriesId = e.Series.SeriesId,
|
||||||
SeriesName = e.Series.Title,
|
SeriesName = e.Series.Title,
|
||||||
SeasonNumber = e.SeasonNumber,
|
SeasonNumber = e.SeasonNumber,
|
||||||
EpisodeNumber = e.EpisodeNumber,
|
EpisodeNumber = e.EpisodeNumber,
|
||||||
|
@ -63,6 +65,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
{
|
{
|
||||||
var upcoming = _upcomingEpisodesProvider.Week().Select(e => new UpcomingEpisodeModel
|
var upcoming = _upcomingEpisodesProvider.Week().Select(e => new UpcomingEpisodeModel
|
||||||
{
|
{
|
||||||
|
SeriesId = e.Series.SeriesId,
|
||||||
SeriesName = e.Series.Title,
|
SeriesName = e.Series.Title,
|
||||||
SeasonNumber = e.SeasonNumber,
|
SeasonNumber = e.SeasonNumber,
|
||||||
EpisodeNumber = e.EpisodeNumber,
|
EpisodeNumber = e.EpisodeNumber,
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace NzbDrone.Web.Models
|
||||||
{
|
{
|
||||||
public class UpcomingEpisodeModel
|
public class UpcomingEpisodeModel
|
||||||
{
|
{
|
||||||
|
public int SeriesId { get; set; }
|
||||||
public string SeriesName { get; set; }
|
public string SeriesName { get; set; }
|
||||||
public int SeasonNumber { get; set; }
|
public int SeasonNumber { get; set; }
|
||||||
public int EpisodeNumber { get; set; }
|
public int EpisodeNumber { get; set; }
|
||||||
|
|
|
@ -47,9 +47,11 @@
|
||||||
columns.Bound(c => c.Date).Title("Date Grabbed").Width(60);
|
columns.Bound(c => c.Date).Title("Date Grabbed").Width(60);
|
||||||
})
|
})
|
||||||
.DetailView(detailView => detailView.ClientTemplate(
|
.DetailView(detailView => detailView.ClientTemplate(
|
||||||
|
"<fieldset>" +
|
||||||
"<div><b>Overview: </b><#= EpisodeOverview #></div>" +
|
"<div><b>Overview: </b><#= EpisodeOverview #></div>" +
|
||||||
"<div><b>NZB Title: </b><#= NzbTitle #></div>" +
|
"<div><b>NZB Title: </b><#= NzbTitle #></div>" +
|
||||||
"<div><b>Proper: </b><#= IsProper #></div>"
|
"<div><b>Proper: </b><#= IsProper #></div>" +
|
||||||
|
"</fieldset>"
|
||||||
|
|
||||||
))
|
))
|
||||||
.DataBinding(data => data.Ajax().Select("_AjaxBinding", "History"))
|
.DataBinding(data => data.Ajax().Select("_AjaxBinding", "History"))
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
<ul>
|
<ul>
|
||||||
<%: MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series")) %>
|
<%: 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("Settings", "Index", "Settings"))%>
|
||||||
<%: MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))%>
|
<%: MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))%>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -31,69 +31,94 @@
|
||||||
<%
|
<%
|
||||||
Html.Telerik().Menu().Name("historyMenu").Items(items =>
|
Html.Telerik().Menu().Name("historyMenu").Items(items =>
|
||||||
{
|
{
|
||||||
items.Add().Text("Trim History").Action("Trim", "History");
|
items.Add().Text("Start RSS Sync").Action("RssSync", "Series");
|
||||||
items.Add().Text("Purge History").Action("Purge", "History");
|
|
||||||
}).Render();
|
}).Render();
|
||||||
%>
|
%>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||||
<%Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate("No watched shows aired yesterday")
|
|
||||||
.Columns(columns =>
|
|
||||||
{
|
|
||||||
columns.Bound(c => c.SeriesName).Title("Series Name").Width(110);
|
|
||||||
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
|
|
||||||
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
|
|
||||||
columns.Bound(c => c.Title).Title("Episode Title").Width(120);
|
|
||||||
columns.Bound(c => c.AirDate).Title("Air Date").Width(0);
|
|
||||||
})
|
|
||||||
.DetailView(detailView => detailView.ClientTemplate(
|
|
||||||
"<div><b>Overview: </b><#= Overview #></div>"
|
|
||||||
))
|
|
||||||
.DataBinding(data => data.Ajax().Select("_AjaxBindingYesterday", "Upcoming"))
|
|
||||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Ascending()).Enabled(true))
|
|
||||||
//.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric))
|
|
||||||
//.Filterable()
|
|
||||||
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
|
||||||
.Render();
|
|
||||||
%>
|
|
||||||
|
|
||||||
<%Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.")
|
<div id="yesterday">
|
||||||
.Columns(columns =>
|
<h2>Yesterday</h2>
|
||||||
{
|
<%Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Yesterday").NoRecordsTemplate("No watched shows aired yesterday")
|
||||||
columns.Bound(c => c.SeriesName).Title("Series Name").Width(110);
|
.Columns(columns =>
|
||||||
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
|
{
|
||||||
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
|
columns.Bound(c => c.SeriesName)
|
||||||
columns.Bound(c => c.Title).Title("Episode Title").Width(120);
|
.ClientTemplate("<a href=" + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + "><#= SeriesName #></a>")
|
||||||
columns.Bound(c => c.AirDate).Title("Air Date").Width(0);
|
.Title("Series Name").Width(110);
|
||||||
})
|
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
|
||||||
.DetailView(detailView => detailView.ClientTemplate(
|
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
|
||||||
"<div><b>Overview: </b><#= Overview #></div>"
|
columns.Bound(c => c.Title).Title("Episode Title").Width(120);
|
||||||
))
|
columns.Bound(c => c.AirDate).Title("Air Date").Width(0);
|
||||||
.DataBinding(data => data.Ajax().Select("_AjaxBindingToday", "Upcoming"))
|
})
|
||||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Ascending()).Enabled(true))
|
.DetailView(detailView => detailView.ClientTemplate(
|
||||||
//.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric))
|
"<fieldset>" +
|
||||||
//.Filterable()
|
"<div><b>Overview: </b><#= Overview #></div>" +
|
||||||
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
"</fieldset>"
|
||||||
.Render();
|
))
|
||||||
%>
|
.DataBinding(data => data.Ajax().Select("_AjaxBindingYesterday", "Upcoming"))
|
||||||
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Ascending()).Enabled(true))
|
||||||
|
//.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric))
|
||||||
|
//.Filterable()
|
||||||
|
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
||||||
|
.Render();
|
||||||
|
%>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate("No watched shows airing in the next week...")
|
<br />
|
||||||
.Columns(columns =>
|
|
||||||
{
|
<div id="today">
|
||||||
columns.Bound(c => c.SeriesName).Title("Series Name").Width(110);
|
<h2>Today</h2>
|
||||||
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
|
<%Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Today").NoRecordsTemplate("No watched shows airing today.")
|
||||||
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
|
.Columns(columns =>
|
||||||
columns.Bound(c => c.Title).Title("Episode Title").Width(120);
|
{
|
||||||
columns.Bound(c => c.AirDate).Title("Air Date").Width(0);
|
columns.Bound(c => c.SeriesName)
|
||||||
})
|
.ClientTemplate("<a href=" + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + "><#= SeriesName #></a>")
|
||||||
.DetailView(detailView => detailView.ClientTemplate(
|
.Title("Series Name").Width(110);
|
||||||
"<div><b>Overview: </b><#= Overview #></div>"
|
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
|
||||||
))
|
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
|
||||||
.DataBinding(data => data.Ajax().Select("_AjaxBindingWeek", "Upcoming"))
|
columns.Bound(c => c.Title).Title("Episode Title").Width(120);
|
||||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Ascending()).Enabled(true))
|
columns.Bound(c => c.AirDate).Title("Air Date").Width(0);
|
||||||
//.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric))
|
})
|
||||||
//.Filterable()
|
.DetailView(detailView => detailView.ClientTemplate(
|
||||||
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
"<fieldset>" +
|
||||||
.Render();
|
"<div><b>Overview: </b><#= Overview #></div>" +
|
||||||
%>
|
"</fieldset>"
|
||||||
|
))
|
||||||
|
.DataBinding(data => data.Ajax().Select("_AjaxBindingToday", "Upcoming"))
|
||||||
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Ascending()).Enabled(true))
|
||||||
|
//.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric))
|
||||||
|
//.Filterable()
|
||||||
|
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
||||||
|
.Render();
|
||||||
|
%>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div id="week">
|
||||||
|
<h2>7-Day Forecast</h2>
|
||||||
|
<%Html.Telerik().Grid<UpcomingEpisodeModel>().Name("Week").NoRecordsTemplate("No watched shows airing in the next week...")
|
||||||
|
.Columns(columns =>
|
||||||
|
{
|
||||||
|
columns.Bound(c => c.SeriesName)
|
||||||
|
.ClientTemplate("<a href=" + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + "><#= SeriesName #></a>")
|
||||||
|
.Title("Series Name").Width(110);
|
||||||
|
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
|
||||||
|
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
|
||||||
|
columns.Bound(c => c.Title).Title("Episode Title").Width(120);
|
||||||
|
columns.Bound(c => c.AirDate).Title("Air Date").Width(0);
|
||||||
|
})
|
||||||
|
.DetailView(detailView => detailView.ClientTemplate(
|
||||||
|
"<fieldset>" +
|
||||||
|
"<div><b>Overview: </b><#= Overview #></div>" +
|
||||||
|
"</fieldset>"
|
||||||
|
))
|
||||||
|
.DataBinding(data => data.Ajax().Select("_AjaxBindingWeek", "Upcoming"))
|
||||||
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Ascending()).Enabled(true))
|
||||||
|
//.Pageable(c => c.PageSize(20).Position(GridPagerPosition.Both).Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric))
|
||||||
|
//.Filterable()
|
||||||
|
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
||||||
|
.Render();
|
||||||
|
%>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
Loading…
Reference in New Issue