Series/Details specials grid will be generated like all others.

Added images for Episode Status, Ignored status removed
Updated SceneNameMappings.csv
pull/2/head
Mark McDowall 14 years ago
parent 2e48034d70
commit d120a61ccb

@ -37,15 +37,12 @@ namespace NzbDrone.Core.Repository
{
get
{
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
{
return EpisodeStatusType.Downloading;
}
if (Ignored) return EpisodeStatusType.Ignored;
if (AirDate != null && AirDate.Value.Date < DateTime.Now)
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -47,31 +47,6 @@ namespace NzbDrone.Web.Controllers
return View();
}
public ActionResult SeasonEditor(int seriesId)
{
var model = new List<SeasonEditModel>();
var seasons = _episodeProvider.GetSeasons(seriesId);
foreach (var season in seasons)
{
var seasonEdit = new SeasonEditModel();
seasonEdit.Monitored = !_episodeProvider.IsIgnored(seriesId, season);
seasonEdit.SeasonNumber = season;
seasonEdit.SeriesId = seriesId;
seasonEdit.SeasonString = GetSeasonString(season);
model.Add(seasonEdit);
}
return View(model);
}
public ActionResult GetSingleSeasonView(SeasonEditModel model)
{
return PartialView("SingleSeason", model);
}
[GridAction]
public ActionResult _AjaxSeriesGrid()
{

@ -136,8 +136,12 @@
</ItemGroup>
<ItemGroup>
<Content Include="Content\Images\close.png" />
<Content Include="Content\Images\Downloading.png" />
<Content Include="Content\Images\error.png" />
<Content Include="Content\Images\gritter.png" />
<Content Include="Content\Images\Missing.png" />
<Content Include="Content\Images\NotAired.png" />
<Content Include="Content\Images\Ready.png" />
<Content Include="Content\Images\success.png" />
<Content Include="Content\jquery.gritter.css" />
<Content Include="Content\Menu.css" />

@ -30,16 +30,7 @@
}
.seasonToggleTop
{
@*float: left;
border-width: 1px;
border-style: solid;
border-color: grey;
margin: 5px;
padding: 3px;
padding-top: 0px;
padding-bottom: 0px;*@
{
background-color: #F1EDED;
background-position: 5px center;
background-repeat: no-repeat;
@ -61,6 +52,12 @@
padding-right: 0px;
margin-bottom: -4px;
}
.statusImage
{
width: 18px;
height: 18px;
}
</style>
@section ActionMenu{
@ -84,13 +81,15 @@
}
</div>
@foreach (var s in Model.Seasons.Where(s => s > 0).Reverse())
@foreach (var s in Model.Seasons.Reverse())
{
var seriesId = @Model.SeriesId;
var season = s;
<h3>
Season @season</h3>
@(season == 0 ? "Specials" : "Season " + season)
</h3>
<div class="grid-container">
@{
Html.Telerik().Grid<EpisodeModel>().Name("seasons_" + season)
@ -98,9 +97,9 @@
.Columns(columns =>
{
columns.Bound(o => o.Ignored)
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_" + season + "'/>")
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_" + season + "' title='Click to toggle season ignore status' />")
.ClientTemplate(
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_" + season + " ignored' id='<#= EpisodeId #>' />")
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_" + season + " ignored' id='<#= EpisodeId #>' title='Click to toggle episode ignore status' />")
.Width(20)
.HtmlAttributes(new { style = "text-align:center" });
@ -108,7 +107,10 @@
columns.Bound(c => c.Title).Title("Title");
columns.Bound(c => c.AirDate).Width(0);
columns.Bound(c => c.Quality).Width(0);
columns.Bound(c => c.Status).Width(0);
columns.Bound(c => c.Status)
.ClientTemplate("<img src='../../Content/Images/<#= Status #>.png' alt='<#= Status #>' title='<#= Status #>' class='statusImage' />")
.Width(20)
.HtmlAttributes(new { style = "text-align:center" });
columns.Bound(o => o.EpisodeId).Title("")
.ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\">Search</a>"
+ " | " +
@ -136,44 +138,6 @@
.Render();}
</div>
}
@if (Model.Seasons.Any(s => s == 0))
{
<br />
<h3>
Specials</h3>
<div class="grid-container">
@{Html.Telerik().Grid<EpisodeModel>().Name("seasons_0")
.TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns =>
{
columns.Bound(o => o.Ignored)
.Title("<img src='../../Content/Images/ignoredNeutral.png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_0' />")
.ClientTemplate(
"<img src='../../Content/Images/ignoredNeutral.png' class='ignoreEpisode ignoreEpisode_0 ignored' id='<#= EpisodeId #>' />")
.Width(20)
.HtmlAttributes(new { style = "text-align:center" });
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
columns.Bound(c => c.Title).Title("Title").Width(10000);
columns.Bound(c => c.AirDate).Width(10);
columns.Bound(c => c.Quality).Width(10);
columns.Bound(c => c.Status).Width(10);
})
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))
.Footer(true)
.DataBinding(
d =>
d.Ajax().Select("_AjaxSeasonGrid", "Series",
new RouteValueDictionary { { "seriesId", Model.SeriesId }, { "seasonNumber", 0 } }))
.ClientEvents(clientEvents =>
{
clientEvents.OnRowDataBound("grid_rowBound");
clientEvents.OnDataBound("grid_dataBound");
})
.Render(); }
</div>
}
}
@section Scripts{
<script type="text/javascript">

@ -1,5 +1,7 @@
csinewyork,73696,CSI
csiny,73696,CSI
csi,72546,CSI
csilasvegas,72546,CSI
archer,110381,Archer
lifeafterpeopleseries,83897,Life After People
lifeafterpeople,83897,Life After People
@ -55,4 +57,6 @@ rbtau,189931,RBT AU
house,73255,House
housemd,73255,House
office,73244,The Office
officeus,73244,The Office
officeus,73244,The Office
thevoice,247824,The Voice
battlestargalactica,73545,Battlestar Galactica
1 csinewyork 73696 CSI
2 csiny 73696 CSI
3 csi 72546 CSI
4 csilasvegas 72546 CSI
5 archer 110381 Archer
6 lifeafterpeopleseries 83897 Life After People
7 lifeafterpeople 83897 Life After People
57 house 73255 House
58 housemd 73255 House
59 office 73244 The Office
60 officeus 73244 The Office
61 thevoice 247824 The Voice
62 battlestargalactica 73545 Battlestar Galactica
Loading…
Cancel
Save