mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 09:49:00 +00:00
More grid work. Row partial views are now sent a bool set to true if it is an alternate row.
This commit is contained in:
parent
93355a4ae1
commit
854d66c1f5
7 changed files with 31 additions and 24 deletions
|
@ -65,17 +65,6 @@
|
|||
background: #f0f5ff;
|
||||
}
|
||||
|
||||
/*
|
||||
.seriesTable tr:nth-child(4n)
|
||||
{
|
||||
background: #f0f5ff;
|
||||
}
|
||||
|
||||
.seriesTable tr:nth-child(4n+1)
|
||||
{
|
||||
background: #f0f5ff;
|
||||
}*/
|
||||
|
||||
/* Episode Grid Row Colouring */
|
||||
.episodeIgnored
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ public SeriesController(SeriesProvider seriesProvider, EpisodeProvider episodePr
|
|||
|
||||
public ActionResult Index()
|
||||
{
|
||||
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount()).OrderBy(o => SortHelper.SkipArticles(o.Title));
|
||||
var series = GetSeriesModels(_seriesProvider.GetAllSeriesWithEpisodeCount()).OrderBy(o => SortHelper.SkipArticles(o.Title)).ToList();
|
||||
return View(series);
|
||||
}
|
||||
|
||||
|
|
|
@ -555,9 +555,6 @@
|
|||
<ItemGroup>
|
||||
<Content Include="Views\Series\SeriesEditor.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Upcoming\Index2.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Upcoming\UpcomingEpisode.cshtml" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@using NzbDrone.Web.Helpers
|
||||
@model NzbDrone.Web.Models.EpisodeModel
|
||||
|
||||
<tr class="@Model.EpisodeId data-row">
|
||||
<tr class="@Model.EpisodeId data-row@(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")">
|
||||
<td>@Model.EpisodeNumber</td>
|
||||
<td>@Model.Title</td>
|
||||
<td>@Model.AirDate</td>
|
||||
|
@ -29,7 +29,7 @@
|
|||
@Ajax.ImageActionLink("../../Content/Images/Rename.png", new { Alt = "Rename", Title = "Rename episode", @class = "renameImage" }, "Rename", "Episode", new { EpisodeFileId = Model.EpisodeFileId }, null, null)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="detail-row">
|
||||
<tr class="detail-row@(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")">
|
||||
<td colspan="5">
|
||||
@Model.Overview <br />
|
||||
<b>@Model.Path</b>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@using NzbDrone.Common
|
||||
@using NzbDrone.Web.Helpers
|
||||
@using NzbDrone.Web.Models;
|
||||
@model IEnumerable<NzbDrone.Web.Models.SeriesModel>
|
||||
@model List<NzbDrone.Web.Models.SeriesModel>
|
||||
@{ViewBag.Title = "NzbDrone";}
|
||||
|
||||
@section HeaderContent
|
||||
|
@ -117,9 +117,20 @@
|
|||
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var series in Model)
|
||||
|
||||
@for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
Html.RenderPartial("Series", series);
|
||||
var series = Model[i];
|
||||
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
Html.RenderPartial("Series", series);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Html.RenderPartial("Series", series, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
||||
}
|
||||
}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -27,8 +27,18 @@
|
|||
@Ajax.ImageActionLink("../../Content/Images/Rename.png", new { Alt = "Rename", Title = "Rename all episodes in this season", @class = "renameImage renameImageMaster" }, "RenameSeason", "Episode", new { SeriesId = Model.SeriesId, SeasonNumber = Model.SeasonNumber }, null, null)
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var episode in Model.Episodes)
|
||||
@for (int i = 0; i < Model.Episodes.Count; i++)
|
||||
{
|
||||
Html.RenderPartial("Episode", episode);
|
||||
var episode = Model.Episodes[i];
|
||||
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
Html.RenderPartial("Episode", episode);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Html.RenderPartial("Episode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
|
||||
}
|
||||
}
|
||||
</table>
|
|
@ -1,7 +1,7 @@
|
|||
@using NzbDrone.Web.Helpers
|
||||
@model NzbDrone.Web.Models.SeriesModel
|
||||
|
||||
<tr class="@Model.SeriesId data-row">
|
||||
<tr class="@Model.SeriesId data-row @(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")">
|
||||
<td>@Html.ActionLink(Model.Title, "Details", "Series", new { seriesId = Model.SeriesId }, null)</td>
|
||||
<td>@Model.SeasonsCount</td>
|
||||
<td>@Model.QualityProfileName</td>
|
||||
|
@ -20,7 +20,7 @@
|
|||
<img src="../../Content/Images/Delete.png" class="deleteButton" value="@Model.SeriesId" rel="@Model.Title" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="detail-row details_@(Model.SeriesId)">
|
||||
<tr class="detail-row details_@(Model.SeriesId) @(ViewData["AltRow"] == null || !(bool)ViewData["AltRow"] ? "" : " alt-row")">
|
||||
<td colspan="7">
|
||||
<b>Airs Day of Week:</b> @Model.AirsDayOfWeek <br/>
|
||||
<b>Overview:</b> @Model.Overview
|
||||
|
|
Loading…
Reference in a new issue