2011-04-21 04:20:39 +00:00
|
|
|
@model List<NzbDrone.Web.Models.HistoryModel>
|
|
|
|
@using NzbDrone.Web.Models
|
|
|
|
@section TitleContent{
|
2011-04-22 20:48:05 +00:00
|
|
|
History
|
2011-04-21 04:20:39 +00:00
|
|
|
}
|
|
|
|
@section ActionMenu{
|
|
|
|
@{Html.Telerik().Menu().Name("historyMenu").Items(items =>
|
|
|
|
{
|
|
|
|
items.Add().Text("Trim History").Action("Trim", "History");
|
|
|
|
items.Add().Text("Purge History").Action("Purge", "History");
|
|
|
|
}).Render();}
|
|
|
|
}
|
|
|
|
@section MainContent{
|
|
|
|
@{Html.Telerik().Grid<HistoryModel>().Name("history")
|
2011-04-22 20:48:05 +00:00
|
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
2011-04-10 02:44:01 +00:00
|
|
|
.Columns(columns =>
|
|
|
|
{
|
2011-04-28 04:27:02 +00:00
|
|
|
columns.Bound(c => c.Indexer)
|
|
|
|
.ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/") + "<#= Indexer #>.png' /></center>")
|
|
|
|
.Title("")
|
|
|
|
.Width(20);
|
2011-04-25 20:32:29 +00:00
|
|
|
columns.Bound(c => c.SeriesTitle).Title("Series Name");
|
|
|
|
columns.Bound(c => c.SeasonNumber).Title("Season").Width(1);
|
|
|
|
columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1);
|
2011-04-22 20:48:05 +00:00
|
|
|
columns.Bound(c => c.EpisodeTitle).Title("Episode Title");
|
2011-04-28 04:27:02 +00:00
|
|
|
columns.Bound(c => c.Quality).Title("Quality").Width(50);
|
2011-04-25 20:32:29 +00:00
|
|
|
columns.Bound(c => c.Date).Title("Grabbed on");
|
2011-04-10 02:44:01 +00:00
|
|
|
})
|
|
|
|
.DetailView(detailView => detailView.ClientTemplate(
|
|
|
|
"<fieldset>" +
|
|
|
|
"<div><b>Overview: </b><#= EpisodeOverview #></div>" +
|
|
|
|
"<div><b>NZB Title: </b><#= NzbTitle #></div>" +
|
|
|
|
"<div><b>Proper: </b><#= IsProper #></div>" +
|
|
|
|
"</fieldset>"
|
|
|
|
))
|
|
|
|
.DataBinding(data => data.Ajax().Select("_AjaxBinding", "History"))
|
|
|
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.Date).Descending()).Enabled(true))
|
|
|
|
.Pageable(
|
|
|
|
c =>
|
2011-04-10 03:00:20 +00:00
|
|
|
c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
|
2011-04-22 20:48:05 +00:00
|
|
|
//.Filterable()
|
|
|
|
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
2011-04-21 04:20:39 +00:00
|
|
|
.Render();}
|
2011-04-22 20:48:05 +00:00
|
|
|
}
|