You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.5 KiB
63 lines
2.5 KiB
14 years ago
|
@model List<NzbDrone.Web.Models.HistoryModel>
|
||
|
@using NzbDrone.Web.Models
|
||
14 years ago
|
|
||
14 years ago
|
@section Scripts{
|
||
14 years ago
|
<script type="text/javascript">
|
||
|
function onRowDataBound(e) {
|
||
|
|
||
|
e.row.style.boarder = "";
|
||
|
|
||
|
if (e.dataItem.Level == 3) {
|
||
|
e.row.style.backgroundColor = "#FFD700";
|
||
|
}
|
||
|
else if (e.dataItem.Level == 4) {
|
||
|
e.row.style.backgroundColor = "#FF7500";
|
||
|
}
|
||
|
else if (e.dataItem.Level == 5) {
|
||
|
e.row.style.backgroundColor = "black";
|
||
|
e.row.style.color = "red";
|
||
|
}
|
||
|
//e.row.style.color = 'blue';
|
||
|
}
|
||
|
</script>
|
||
14 years ago
|
}
|
||
|
|
||
|
@section TitleContent{
|
||
14 years ago
|
History
|
||
14 years ago
|
}
|
||
|
|
||
|
@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")
|
||
14 years ago
|
.Columns(columns =>
|
||
|
{
|
||
|
columns.Bound(c => c.SeriesTitle).Title("Series Name").Width(120);
|
||
|
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(10);
|
||
|
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(10);
|
||
|
columns.Bound(c => c.EpisodeTitle).Title("Episode Title").Width(140);
|
||
|
columns.Bound(c => c.Quality).Title("Quality").Width(30);
|
||
|
columns.Bound(c => c.Date).Title("Date Grabbed").Width(60);
|
||
|
})
|
||
|
.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 =>
|
||
14 years ago
|
c.PageSize(50).Position(GridPagerPosition.Bottom).Style(GridPagerStyles.NextPrevious))
|
||
14 years ago
|
//.Filterable()
|
||
|
//.ClientEvents(c => c.OnRowDataBound("onRowDataBound"))
|
||
14 years ago
|
.Render();}
|
||
|
}
|