@model List @using NzbDrone.Web.Models @using NzbDrone.Web.Helpers @{ViewBag.Title = "History";} @section ActionMenu{ } @section HeaderContent { @Html.IncludeCss("Grid.css") }
@{Html.Telerik().Grid().Name("history") .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { columns.Bound(c => c.Indexer) .ClientTemplate("
<#= Indexer #>
") .Title("") .Width(20); columns.Bound(c => c.SeriesTitle) .ClientTemplate("<#= SeriesTitle #>") .Title("Series Title"); columns.Bound(c => c.SeasonNumber).Title("Season #").Width(50); columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(50); 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(Ajax.ImageActionLink("../../Content/Images/X.png", new { Alt = "Delete", Title = "Delete from history", @class = "searchImage" }, "Delete", "History", new { HistoryId = "<#= HistoryId #>" }, new AjaxOptions { OnSuccess = "reloadHistoryGrid" }, null).ToString() + Ajax.ImageActionLink("../../Content/Images/Downloading.png", new { Alt = "Redownload", Title = "Redownlod Episode", @class = "searchImage" }, "Redownload", "History", new { HistoryId = "<#= HistoryId #>", EpisodeId = "<#= EpisodeId #>" }, new AjaxOptions { OnSuccess = "reloadHistoryGrid" }, null).ToString()) .Width("40"); }) .DetailView(detailView => detailView.ClientTemplate( "
" + "
Overview: <#= EpisodeOverview #>
" + "
NZB Title: <#= NzbTitle #>
" + "
Proper: <#= IsProper #>
" + "
" )) .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();}