mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
52 lines
2.4 KiB
Plaintext
52 lines
2.4 KiB
Plaintext
@model List<NzbDrone.Web.Models.HistoryModel>
|
|
@using NzbDrone.Web.Models
|
|
@section TitleContent{
|
|
History
|
|
}
|
|
@section ActionMenu{
|
|
<ul id="sub-menu">
|
|
<li>@Ajax.ActionLink("Trim History", "Trim", "History", new AjaxOptions{ OnSuccess = "reloadGrid" })</li>
|
|
<li>@Ajax.ActionLink("Purge History", "Purge", "History", new AjaxOptions{ OnSuccess = "reloadGrid" })</li>
|
|
</ul>
|
|
}
|
|
@section MainContent{
|
|
<div class="grid-container">
|
|
@{Html.Telerik().Grid<HistoryModel>().Name("history")
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(c => c.Indexer)
|
|
.ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/Indexers/") + "<#= Indexer #>.png' /></center>")
|
|
.Title("")
|
|
.Width(20);
|
|
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);
|
|
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");
|
|
})
|
|
.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 =>
|
|
c.PageSize(20).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
|
|
.Render();}
|
|
</div>
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
|
|
function reloadGrid() {
|
|
var grid = $('#history').data('tGrid');
|
|
grid.rebind();
|
|
}
|
|
|
|
</script> |