mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-25 02:30:20 +02:00
Banner is now shown on Details view.
This commit is contained in:
parent
dfd0720872
commit
f8ae95d36f
3
.gitignore
vendored
3
.gitignore
vendored
@ -34,4 +34,5 @@ _ReSharper*/
|
||||
*.db
|
||||
*Web.Publish.xml
|
||||
NzbDrone.Web/NzbDrone.Web.Publish.xml
|
||||
*.sdf
|
||||
*.sdf
|
||||
[Bb]anners
|
@ -152,6 +152,7 @@ public ActionResult Details(int seriesId)
|
||||
model.Seasons = _episodeProvider.GetSeasons(seriesId);
|
||||
model.Title = series.Title;
|
||||
model.SeriesId = series.SeriesId;
|
||||
model.HasBanner = !String.IsNullOrEmpty(series.BannerUrl);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ public class SeriesModel
|
||||
public string QualityProfileName { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public int Episodes { get; set; }
|
||||
public bool HasBanner { get; set; }
|
||||
|
||||
public IList<int> Seasons { get; set; }
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
@model NzbDrone.Web.Models.SeriesModel
|
||||
@using NzbDrone.Core.Repository
|
||||
@model SeriesModel
|
||||
@using NzbDrone.Web.Models
|
||||
@section TitleContent{
|
||||
@Model.Title
|
||||
@ -79,6 +78,18 @@
|
||||
{
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
#banner-container
|
||||
{
|
||||
|
||||
width: 758px;
|
||||
height: 140px;
|
||||
padding: 0px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@section ActionMenu{
|
||||
@ -91,6 +102,17 @@
|
||||
</ul>
|
||||
}
|
||||
@section MainContent{
|
||||
<div id="banner-container">
|
||||
@{
|
||||
var bannerUrl = "../../Content/Images/img03.jpg";
|
||||
|
||||
if(Model.HasBanner)
|
||||
{
|
||||
bannerUrl = "../../Content/Images/Banners/" + Model.SeriesId + ".jpg";
|
||||
}
|
||||
}
|
||||
<img src="@bannerUrl" alt="Banner"/>
|
||||
</div>
|
||||
|
||||
<div class="seasonToggleTopGroup">
|
||||
@foreach (var season in Model.Seasons)
|
||||
|
Loading…
Reference in New Issue
Block a user