2011-05-01 11:05:28 +03:00
@model List<MissingEpisodeModel>
2012-01-30 04:38:44 +03:00
@using NzbDrone.Common
2011-12-09 07:57:23 +03:00
@using NzbDrone.Web.Helpers
2011-05-01 11:05:28 +03:00
@using NzbDrone.Web.Models;
2011-12-12 09:05:40 +03:00
@{ViewBag.Title="Missing";}
2011-12-09 07:57:23 +03:00
@section HeaderContent
{
@Html.IncludeCss("Grid.css")
}
2011-10-22 02:33:54 +03:00
@section ActionMenu{
<ul class="sub-menu">
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null, null)</li>
2012-01-25 04:21:20 +03:00
<li>@Ajax.ActionLink("Start Backlog Search", "BacklogSearch", "Command", null, null, new { title = "Backlog search for ALL missing episodes" })</li>
<li>@Ajax.ActionLink("Start Recent Backlog Search", "RecentBacklogSearch", "Command", null, null, new { title = "Backlog search for missing episodes that aired in the last 30 days only" })</li>
2011-10-22 02:33:54 +03:00
</ul>
}
2011-12-01 08:25:01 +03:00
@{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing")
2011-05-01 11:05:28 +03:00
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
2011-08-31 03:15:22 +03:00
columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesTitle #></a>")
.Title("Series Title");
2011-12-08 09:26:26 +03:00
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(85);
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(85);
2011-05-01 11:05:28 +03:00
columns.Bound(c => c.EpisodeTitle).Title("Episode Title");
2011-09-30 19:18:13 +03:00
columns.Bound(c => c.AirDate)
.ClientTemplate("<#= AirDateString #>")
2011-05-03 09:03:49 +03:00
.Title("Air Date")
2011-12-08 09:26:26 +03:00
.Width(90);
2011-08-31 03:15:22 +03:00
columns.Bound(c => c.EpisodeId)
.Title("Actions")
2011-12-15 11:47:32 +03:00
.ClientTemplate(Ajax.ImageActionLink("../../Content/Images/Search.png", new { Alt = "Search", Title = "Search for episode", @class = "searchImage" }, "Search", "Episode", new { EpisodeId = "<#= EpisodeId #>" }, null, null).ToString())
2011-08-31 03:15:22 +03:00
.Width("40");
2011-05-01 11:05:28 +03:00
})
.DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" +
"<div><b>Overview: </b><#= Overview #></div>" +
"</fieldset>"
))
.DataBinding(data => data.Ajax().Select("_AjaxBinding", "Missing"))
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.AirDate).Descending()).Enabled(true))
2011-05-03 09:03:49 +03:00
.Filterable(filtering => filtering
.Filters(filters => filters
.Add(o => o.SeasonNumber).IsGreaterThan(0)))
2011-05-01 11:05:28 +03:00
.Pageable(
c =>
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
2012-01-30 04:38:44 +03:00
.ClientEvents(clientEvents =>
{
if (EnviromentProvider.IsProduction)
clientEvents.OnError("grid_onError");
})
2011-05-01 11:05:28 +03:00
.Render();}