Banner is now shown on Details view.

This commit is contained in:
Mark McDowall 2011-09-10 16:01:15 -07:00
parent dfd0720872
commit f8ae95d36f
4 changed files with 28 additions and 3 deletions

3
.gitignore vendored
View File

@ -34,4 +34,5 @@ _ReSharper*/
*.db *.db
*Web.Publish.xml *Web.Publish.xml
NzbDrone.Web/NzbDrone.Web.Publish.xml NzbDrone.Web/NzbDrone.Web.Publish.xml
*.sdf *.sdf
[Bb]anners

View File

@ -152,6 +152,7 @@ namespace NzbDrone.Web.Controllers
model.Seasons = _episodeProvider.GetSeasons(seriesId); model.Seasons = _episodeProvider.GetSeasons(seriesId);
model.Title = series.Title; model.Title = series.Title;
model.SeriesId = series.SeriesId; model.SeriesId = series.SeriesId;
model.HasBanner = !String.IsNullOrEmpty(series.BannerUrl);
return View(model); return View(model);
} }

View File

@ -20,6 +20,7 @@ namespace NzbDrone.Web.Models
public string QualityProfileName { get; set; } public string QualityProfileName { get; set; }
public string Overview { get; set; } public string Overview { get; set; }
public int Episodes { get; set; } public int Episodes { get; set; }
public bool HasBanner { get; set; }
public IList<int> Seasons { get; set; } public IList<int> Seasons { get; set; }

View File

@ -1,5 +1,4 @@
@model NzbDrone.Web.Models.SeriesModel @model SeriesModel
@using NzbDrone.Core.Repository
@using NzbDrone.Web.Models @using NzbDrone.Web.Models
@section TitleContent{ @section TitleContent{
@Model.Title @Model.Title
@ -79,6 +78,18 @@
{ {
line-height: 1.5em; 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> </style>
@section ActionMenu{ @section ActionMenu{
@ -91,6 +102,17 @@
</ul> </ul>
} }
@section MainContent{ @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"> <div class="seasonToggleTopGroup">
@foreach (var season in Model.Seasons) @foreach (var season in Model.Seasons)