().Name("seasons_" + season.SeasonNumber)
+ .TableHtmlAttributes(new { @class = "Grid" })
+ .Columns(columns =>
+ {
+ columns.Bound(o => o.EpisodeId)
+ .ClientTemplate(
+ "")
+ .Title("")
+ .Width(1)
+ .HtmlAttributes(new { style = "text-align:center" });
- columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
- columns.Bound(c => c.Title).Title("Title").Width(300);
- columns.Bound(c => c.AirDate).Format("{0:d}").Width(10);
- columns.Bound(c => c.Quality).Width(10);
- columns.Bound(c => c.Path);
- })
- //.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
- .DetailView(detailView => detailView.ClientTemplate("<#= Overview #> <#= Path #>
"))
- .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
- .Footer(false)
- .DataBinding(
- d =>
- d.Ajax().Select("_AjaxSeasonGrid", "Series",
- new RouteValueDictionary {{"seasonId", season1.SeasonId.ToString()}}))
- //.EnableCustomBinding(true)
- //.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
- .ToolBar(
- c =>
- c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new {seasonId = season1.SeasonId})
- .ButtonType(GridButtonType.Text))
- .Render();
- }
-
- //Specials
- @{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
-
- @if (specialSeasons != null)
- {
-
-
-
- Specials
- Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
- .TableHtmlAttributes(new { @class = "Grid" })
- .Columns(columns =>
- {
- columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
- columns.Bound(c => c.Title);
- columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
- })
- .DetailView(detailView => detailView.ClientTemplate("<#= Overview #>
"))
- .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
- .Footer(false)
- .Render();
- }
+ columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
+ columns.Bound(c => c.Title).Title("Title").Width(300);
+ columns.Bound(c => c.AirDate).Format("{0:d}").Width(10);
+ columns.Bound(c => c.Quality).Width(10);
+ columns.Bound(c => c.Path);
+ })
+ //.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
+ .DetailView(detailView => detailView.ClientTemplate("<#= Overview #> <#= Path #>
"))
+ .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
+ .Footer(false)
+ .DataBinding(
+ d =>
+ d.Ajax().Select("_AjaxSeasonGrid", "Series",
+ new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
+ //.EnableCustomBinding(true)
+ //.ClientEvents(e => e.OnDetailViewExpand("episodeDetailExpanded")) //Causes issues displaying the episode detail multiple times...
+ .ToolBar(
+ c =>
+ c.Custom().Text("Rename Season").Action("RenameSeason", "Series", new { seasonId = season1.SeasonId })
+ .ButtonType(GridButtonType.Text))
+ .Render();
+ }
+ @{var specialSeasons = Model.Seasons.Where(s => s.SeasonNumber == 0).FirstOrDefault();}
+ @if (specialSeasons != null)
+ {
+
+
+ Specials
+ Html.Telerik().Grid(specialSeasons.Episodes).Name("seasons_specials")
+ .TableHtmlAttributes(new { @class = "Grid" })
+ .Columns(columns =>
+ {
+ columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
+ columns.Bound(c => c.Title);
+ columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
+ })
+ .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false))
+ .Footer(false)
+ .Render();
+ }
}
-
@section Scripts{