Radarr/NzbDrone.Web/Views/Missing/Index.cshtml

59 lines
2.5 KiB
Plaintext

@model List<MissingEpisodeModel>
@using NzbDrone.Web.Models;
@section TitleContent{
Missing
}
<style>
.searchImage
{
width: 18px;
height: 18px;
padding: 1px;
margin: 2px;
}
.searchImage:hover
{
background-color: #065EFE;
}
</style>
@section MainContent{
@{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
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(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(40);
columns.Bound(c => c.EpisodeTitle).Title("Episode Title");
columns.Bound(c => c.AirDate).Format("{0:d}")
.Title("Air Date")
.Width(80);
columns.Bound(c => c.EpisodeId)
.Title("Actions")
.ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onClick=\"searchForEpisode(<#= EpisodeId #>); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for Episode' class='searchImage' /></a>")
.Width("40");
})
.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))
.Filterable(filtering => filtering
.Filters(filters => filters
.Add(o => o.SeasonNumber).IsGreaterThan(0)))
.Pageable(
c =>
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
.Render();}
}