mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-27 01:57:21 +00:00
Fixed history grid layout
This commit is contained in:
parent
e074164a47
commit
af1511e1f3
3 changed files with 28 additions and 26 deletions
|
@ -127,9 +127,9 @@ internal void ProcessItem(SyndicationItem feedItem)
|
||||||
if (_historyProvider.Exists(episode.EpisodeId, parseResult.Quality, parseResult.Proper))
|
if (_historyProvider.Exists(episode.EpisodeId, parseResult.Quality, parseResult.Proper))
|
||||||
{
|
{
|
||||||
_logger.Debug("Episode in history: {0}", episode.ToString());
|
_logger.Debug("Episode in history: {0}", episode.ToString());
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//TODO: Add episode to sab
|
//TODO: Add episode to sab
|
||||||
|
|
||||||
_historyProvider.Add(new History
|
_historyProvider.Add(new History
|
||||||
|
@ -141,7 +141,7 @@ internal void ProcessItem(SyndicationItem feedItem)
|
||||||
Quality = parseResult.Quality
|
Quality = parseResult.Quality
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,11 @@ public class Episode
|
||||||
public virtual EpisodeFile EpisodeFile { get; set; }
|
public virtual EpisodeFile EpisodeFile { get; set; }
|
||||||
|
|
||||||
[SubSonicToManyRelation]
|
[SubSonicToManyRelation]
|
||||||
public virtual List<History> Histories { get; private set; }
|
public virtual List<History> Histories { get; protected set; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return String.Format("[Episode: '{0} S{1:00}E{2:00}']", Series.Title, SeasonNumber, EpisodeNumber);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
@model List<NzbDrone.Web.Models.HistoryModel>
|
@model List<NzbDrone.Web.Models.HistoryModel>
|
||||||
@using NzbDrone.Web.Models
|
@using NzbDrone.Web.Models
|
||||||
|
|
||||||
@section Scripts{
|
@section Scripts{
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function onRowDataBound(e) {
|
function onRowDataBound(e) {
|
||||||
|
@ -21,11 +20,9 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
||||||
@section TitleContent{
|
@section TitleContent{
|
||||||
History
|
History
|
||||||
}
|
}
|
||||||
|
|
||||||
@section ActionMenu{
|
@section ActionMenu{
|
||||||
@{Html.Telerik().Menu().Name("historyMenu").Items(items =>
|
@{Html.Telerik().Menu().Name("historyMenu").Items(items =>
|
||||||
{
|
{
|
||||||
|
@ -33,17 +30,17 @@
|
||||||
items.Add().Text("Purge History").Action("Purge", "History");
|
items.Add().Text("Purge History").Action("Purge", "History");
|
||||||
}).Render();}
|
}).Render();}
|
||||||
}
|
}
|
||||||
|
|
||||||
@section MainContent{
|
@section MainContent{
|
||||||
@{Html.Telerik().Grid<HistoryModel>().Name("history")
|
@{Html.Telerik().Grid<HistoryModel>().Name("history")
|
||||||
|
.TableHtmlAttributes(new { @class = "Grid" })
|
||||||
.Columns(columns =>
|
.Columns(columns =>
|
||||||
{
|
{
|
||||||
columns.Bound(c => c.SeriesTitle).Title("Series Name").Width(120);
|
columns.Bound(c => c.SeriesTitle).Title("Series Name").Width(120);
|
||||||
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(10);
|
columns.Bound(c => c.SeasonNumber).Title("Season").Width(10);
|
||||||
columns.Bound(c => c.EpisodeNumber).Title("Episode #").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.EpisodeTitle).Title("Episode Title");
|
||||||
columns.Bound(c => c.Quality).Title("Quality").Width(30);
|
columns.Bound(c => c.Quality).Title("Quality").Width(10);
|
||||||
columns.Bound(c => c.Date).Title("Date Grabbed").Width(60);
|
columns.Bound(c => c.Date).Title("Date/Time Grabbed");
|
||||||
})
|
})
|
||||||
.DetailView(detailView => detailView.ClientTemplate(
|
.DetailView(detailView => detailView.ClientTemplate(
|
||||||
"<fieldset>" +
|
"<fieldset>" +
|
||||||
|
|
Loading…
Reference in a new issue