1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00

Fixed EpisodeSorting examples layout.

Added Missing to main UI.
Add links to series from History and Missing.
Image for search link on Missing.
This commit is contained in:
Mark McDowall 2011-08-30 17:15:22 -07:00
parent 8ce222a10c
commit f02e92b005
13 changed files with 61 additions and 30 deletions

View File

@ -4,6 +4,7 @@
using NLog; using NLog;
using NzbDrone.Core.Model; using NzbDrone.Core.Model;
using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.Model.Search;
using NzbDrone.Core.Repository; using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Providers.Jobs namespace NzbDrone.Core.Providers.Jobs
@ -36,9 +37,9 @@ public int DefaultInterval
public void Start(ProgressNotification notification, int targetId, int secondaryTargetId) public void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
{ {
var missingEpisodes = var missingEpisodes = _episodeProvider.EpisodesWithoutFiles(true)
_episodeProvider.EpisodesWithoutFiles(true).GroupBy(e => new { e.SeriesId, e.SeasonNumber }); .GroupBy(e => new { e.SeriesId, e.SeasonNumber });
var individualEpisodes = new List<Episode>(); var individualEpisodes = new List<Episode>();
Logger.Trace("Processing missing episodes list"); Logger.Trace("Processing missing episodes list");

View File

@ -68,6 +68,7 @@ public ActionResult _AjaxBinding()
var history = _historyProvider.AllItemsWithRelationships().Select(h => new HistoryModel var history = _historyProvider.AllItemsWithRelationships().Select(h => new HistoryModel
{ {
HistoryId = h.HistoryId, HistoryId = h.HistoryId,
SeriesId = h.SeriesId,
SeasonNumber = h.Episode.SeasonNumber, SeasonNumber = h.Episode.SeasonNumber,
EpisodeNumber = h.Episode.EpisodeNumber, EpisodeNumber = h.Episode.EpisodeNumber,
EpisodeTitle = h.Episode.Title, EpisodeTitle = h.Episode.Title,

View File

@ -31,6 +31,7 @@ public ActionResult _AjaxBinding()
var missing = missingEpisodes.Select(e => new MissingEpisodeModel var missing = missingEpisodes.Select(e => new MissingEpisodeModel
{ {
EpisodeId = e.EpisodeId, EpisodeId = e.EpisodeId,
SeriesId = e.SeriesId,
SeasonNumber = e.SeasonNumber, SeasonNumber = e.SeasonNumber,
EpisodeNumber = e.EpisodeNumber, EpisodeNumber = e.EpisodeNumber,
EpisodeTitle = e.Title, EpisodeTitle = e.Title,

View File

@ -32,7 +32,7 @@ public ActionResult _AjaxBindingYesterday()
{ {
SeriesId = u.Series.SeriesId, SeriesId = u.Series.SeriesId,
EpisodeId = u.EpisodeId, EpisodeId = u.EpisodeId,
SeriesName = u.Series.Title, SeriesTitle = u.Series.Title,
SeasonNumber = u.SeasonNumber, SeasonNumber = u.SeasonNumber,
EpisodeNumber = u.EpisodeNumber, EpisodeNumber = u.EpisodeNumber,
Title = u.Title, Title = u.Title,
@ -50,7 +50,7 @@ public ActionResult _AjaxBindingToday()
{ {
SeriesId = u.Series.SeriesId, SeriesId = u.Series.SeriesId,
EpisodeId = u.EpisodeId, EpisodeId = u.EpisodeId,
SeriesName = u.Series.Title, SeriesTitle = u.Series.Title,
SeasonNumber = u.SeasonNumber, SeasonNumber = u.SeasonNumber,
EpisodeNumber = u.EpisodeNumber, EpisodeNumber = u.EpisodeNumber,
Title = u.Title, Title = u.Title,
@ -68,7 +68,7 @@ public ActionResult _AjaxBindingTomorrow()
{ {
SeriesId = u.Series.SeriesId, SeriesId = u.Series.SeriesId,
EpisodeId = u.EpisodeId, EpisodeId = u.EpisodeId,
SeriesName = u.Series.Title, SeriesTitle = u.Series.Title,
SeasonNumber = u.SeasonNumber, SeasonNumber = u.SeasonNumber,
EpisodeNumber = u.EpisodeNumber, EpisodeNumber = u.EpisodeNumber,
Title = u.Title, Title = u.Title,
@ -86,7 +86,7 @@ public ActionResult _AjaxBindingWeek()
{ {
SeriesId = u.Series.SeriesId, SeriesId = u.Series.SeriesId,
EpisodeId = u.EpisodeId, EpisodeId = u.EpisodeId,
SeriesName = u.Series.Title, SeriesTitle = u.Series.Title,
SeasonNumber = u.SeasonNumber, SeasonNumber = u.SeasonNumber,
EpisodeNumber = u.EpisodeNumber, EpisodeNumber = u.EpisodeNumber,
Title = u.Title, Title = u.Title,

View File

@ -6,6 +6,7 @@ namespace NzbDrone.Web.Models
public class HistoryModel public class HistoryModel
{ {
public int HistoryId { get; set; } public int HistoryId { get; set; }
public int SeriesId { get; set; }
public string SeriesTitle { get; set; } public string SeriesTitle { get; set; }
public int SeasonNumber { get; set; } public int SeasonNumber { get; set; }
public int EpisodeNumber { get; set; } public int EpisodeNumber { get; set; }

View File

@ -7,6 +7,7 @@ namespace NzbDrone.Web.Models
{ {
public class MissingEpisodeModel public class MissingEpisodeModel
{ {
public int SeriesId { get; set; }
public int EpisodeId { get; set; } public int EpisodeId { get; set; }
public string SeriesTitle { get; set; } public string SeriesTitle { get; set; }
public int SeasonNumber { get; set; } public int SeasonNumber { get; set; }

View File

@ -6,7 +6,7 @@ public class UpcomingEpisodeModel
{ {
public int SeriesId { get; set; } public int SeriesId { get; set; }
public int EpisodeId { get; set; } public int EpisodeId { get; set; }
public string SeriesName { get; set; } public string SeriesTitle { get; set; }
public int SeasonNumber { get; set; } public int SeasonNumber { get; set; }
public int EpisodeNumber { get; set; } public int EpisodeNumber { get; set; }
public string Title { get; set; } public string Title { get; set; }

View File

@ -38,7 +38,11 @@ History
.ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/Indexers/") + "<#= Indexer #>.png' /></center>") .ClientTemplate("<center><img alt='<#= Indexer #>' src='" + Url.Content("~/Content/Images/Indexers/") + "<#= Indexer #>.png' /></center>")
.Title("") .Title("")
.Width(20); .Width(20);
columns.Bound(c => c.SeriesTitle).Title("Series Name"); columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesTitle #></a>")
.Title("Series Title");
columns.Bound(c => c.SeasonNumber).Title("Season").Width(1); columns.Bound(c => c.SeasonNumber).Title("Season").Width(1);
columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1); columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(1);
columns.Bound(c => c.EpisodeTitle).Title("Episode Title"); columns.Bound(c => c.EpisodeTitle).Title("Episode Title");

View File

@ -5,20 +5,41 @@
Missing Missing
} }
<style>
.searchImage
{
width: 18px;
height: 18px;
padding: 1px;
margin: 2px;
}
.searchImage:hover
{
background-color: #065EFE;
}
</style>
@section MainContent{ @section MainContent{
@{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing") @{Html.Telerik().Grid<MissingEpisodeModel>().Name("missing")
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(c => c.SeriesTitle).Title("Series Name"); columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesTitle #></a>")
.Title("Series Title");
columns.Bound(c => c.SeasonNumber).Title("Season").Width(40); columns.Bound(c => c.SeasonNumber).Title("Season").Width(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(40); columns.Bound(c => c.EpisodeNumber).Title("Episode").Width(40);
columns.Bound(c => c.EpisodeTitle).Title("Episode Title"); columns.Bound(c => c.EpisodeTitle).Title("Episode Title");
columns.Bound(c => c.AirDate).Format("{0:d}") columns.Bound(c => c.AirDate).Format("{0:d}")
.Title("Air Date") .Title("Air Date")
.Width(80); .Width(80);
columns.Bound(o => o.EpisodeId).Title("") columns.Bound(c => c.EpisodeId)
.ClientTemplate("<a href='#Search' onClick=\"searchForEpisode('<#= EpisodeId #>'); return false;\" >Search</a>"); .Title("Actions")
.ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onClick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for Episode' class='searchImage' /></a>")
.Width("40");
}) })
.DetailView(detailView => detailView.ClientTemplate( .DetailView(detailView => detailView.ClientTemplate(
"<fieldset>" + "<fieldset>" +

View File

@ -118,13 +118,6 @@
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
{ {
//columns.Bound(o => o.Ignored)
// .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 #>' title='Click to toggle episode ignore status' />")
// .Width(20)
// .HtmlAttributes(new { style = "text-align:center" });
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode"); columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
columns.Bound(c => c.Title).Title("Title"); columns.Bound(c => c.Title).Title("Title");
columns.Bound(c => c.AirDate).Width(0); columns.Bound(c => c.AirDate).Width(0);
@ -139,11 +132,6 @@
"<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for episode' class='searchImage' /></a>" + "<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for episode' class='searchImage' /></a>" +
"<a href=\"../Episode/Rename?episodeFileId=<#= EpisodeId #>\" onclick=\"renameEpisode('<#= EpisodeFileId #>'); return false;\"><img src='../../Content/Images/Rename.png' alt='Rename' title='Rename episode' class='renameImage' />") "<a href=\"../Episode/Rename?episodeFileId=<#= EpisodeId #>\" onclick=\"renameEpisode('<#= EpisodeFileId #>'); return false;\"><img src='../../Content/Images/Rename.png' alt='Rename' title='Rename episode' class='renameImage' />")
.Width(80); .Width(80);
//columns.Bound(o => o.EpisodeId).Title("")
// .ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onclick=\"searchForEpisode('<#= EpisodeId #>'); return false;\">Search</a>"
// + " | " +
// "<a href=\"../Episode/Rename?episodeFileId=<#= EpisodeId #>\" onclick=\"renameEpisode('<#= EpisodeFileId #>'); return false;\">Rename</a>"
// );
}) })
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>")) .DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false)) .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(false))

View File

@ -7,8 +7,15 @@
<style> <style>
#examples #examples
{ {
clear: both;
margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;
} }
#singleEpisodeExample, #multiEpisodeExample
{
float: left
}
</style> </style>
} }
@ -74,6 +81,7 @@
</label> </label>
@Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" }) @Html.DropDownListFor(m => m.MultiEpisodeStyle, Model.MultiEpisodeStyles, new { @class = "inputClass selectClass" })
<br/>
<div id ="examples" class="clearfix"> <div id ="examples" class="clearfix">
<div id="singleEpisodeExample"> <div id="singleEpisodeExample">
</div> </div>
@ -90,6 +98,10 @@
<script src="/Scripts/settingsForm.js" type="text/javascript"></script> <script src="/Scripts/settingsForm.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () {
createExamples();
});
$('#SeriesName').live('change', function () { createExamples(); }); $('#SeriesName').live('change', function () { createExamples(); });
$('#EpisodeName').live('change', function () { createExamples(); }); $('#EpisodeName').live('change', function () { createExamples(); });
$('#ReplaceSpaces').live('change', function () { createExamples(); }); $('#ReplaceSpaces').live('change', function () { createExamples(); });

View File

@ -38,6 +38,7 @@
@MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series")) @MvcHtmlString.Create(Html.CurrentActionLink("Series", "Index", "Series"))
@MvcHtmlString.Create(Html.CurrentActionLink("Upcoming", "Index", "Upcoming")) @MvcHtmlString.Create(Html.CurrentActionLink("Upcoming", "Index", "Upcoming"))
@MvcHtmlString.Create(Html.CurrentActionLink("History", "Index", "History")) @MvcHtmlString.Create(Html.CurrentActionLink("History", "Index", "History"))
@MvcHtmlString.Create(Html.CurrentActionLink("Missing", "Index", "Missing"))
@MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings")) @MvcHtmlString.Create(Html.CurrentActionLink("Settings", "Index", "Settings"))
@MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log")) @MvcHtmlString.Create(Html.CurrentActionLink("Logs", "Index", "Log"))
</ul> </ul>

View File

@ -17,11 +17,11 @@ Upcoming
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(c => c.SeriesName) columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" + .ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesName #></a>") "><#= SeriesTitle #></a>")
.Title("Series Name"); .Title("Series Title");
columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40); columns.Bound(c => c.SeasonNumber).Title("Season #").Width(40);
columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40); columns.Bound(c => c.EpisodeNumber).Title("Episode #").Width(40);
columns.Bound(c => c.Title).Title("Episode Title"); columns.Bound(c => c.Title).Title("Episode Title");
@ -48,7 +48,7 @@ Upcoming
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(c => c.SeriesName) columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" + .ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesName #></a>") "><#= SeriesName #></a>")
@ -77,7 +77,7 @@ Upcoming
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(c => c.SeriesName) columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" + .ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesName #></a>") "><#= SeriesName #></a>")
@ -107,7 +107,7 @@ Upcoming
.TableHtmlAttributes(new { @class = "Grid" }) .TableHtmlAttributes(new { @class = "Grid" })
.Columns(columns => .Columns(columns =>
{ {
columns.Bound(c => c.SeriesName) columns.Bound(c => c.SeriesTitle)
.ClientTemplate("<a href=" + .ClientTemplate("<a href=" +
Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) + Url.Action("Details", "Series", new { seriesId = "<#= SeriesId #>" }) +
"><#= SeriesName #></a>") "><#= SeriesName #></a>")