1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-27 02:07:41 +00:00

NzbDrone grids now have thead and tbody properly set.

This commit is contained in:
Mark McDowall 2012-02-07 14:28:53 -08:00
parent 19fbed2c42
commit e42f0222dc
3 changed files with 136 additions and 123 deletions

View file

@ -80,8 +80,9 @@
}
<table class="seriesTable">
<colgroup>
<col style="width: 10px"/>
<col style="width: 10px"/>
<col style="width:auto" />
<col style="width:100px" />
<col style="width:100px" />
@ -89,34 +90,38 @@
<col style="width:100px" />
<col style="width:80px"/>
</colgroup>
<tr>
<th>Status</>
<th>Title</th>
<th>Seasons</th>
<th>Quality</th>
<th>Next Airing</th>
<th>Episodes</th>
<thead>
@*Commands Column*@
<th>
<tr>
<th>Status</th>
<th>Title</th>
<th>Seasons</th>
<th>Quality</th>
<th>Next Airing</th>
<th>Episodes</th>
@*Commands Column*@
<th>
</th>
</tr>
@for (int i = 0; i < Model.Count; i++)
{
var series = Model[i];
</th>
</tr>
</thead>
<tbody>
@for (int i = 0; i < Model.Count; i++)
{
var series = Model[i];
if (i % 2 == 0)
{
Html.RenderPartial("Series", series);
}
if (i % 2 == 0)
{
Html.RenderPartial("Series", series);
}
else
{
Html.RenderPartial("Series", series, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
else
{
Html.RenderPartial("Series", series, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
}
}
</tbody>
</table>
<div id="seriesEditor" title="Edit Series"></div>

View file

@ -8,37 +8,41 @@
<table class="seriesTable">
<colgroup>
<col style="width:40px"/>
<col/>
<col style="width:auto"/>
<col style="width:100px" />
<col style="width:100px" />
<col style="width:110px" />
</colgroup>
<tr>
<th>#</th>
<th>Title</th>
<th>Air Date</th>
<th>Quality</th>
<thead>
<tr>
<th>#</th>
<th>Title</th>
<th>Air Date</th>
<th>Quality</th>
@*Commands Column*@
<th>
<img src='../../Content/Images/@(Model.AnyWanted ? "notIgnored" : "ignored").png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_@(Model.SeasonNumber) @(Model.AnyWanted ? "" : "ignored")' title='Click to toggle season ignore status' />
<img src='../../Content/Images/@(Model.CommonStatus).png' alt='Status' title='Season Status' class='statusImage statusImageMaster' />
@Ajax.ImageActionLink("../../Content/Images/Search.png", new { Alt = "Search", Title = "Search for all episodes in this season", @class = "searchImage searchImageMaster" }, "SearchSeason", "Episode", new { SeriesId = Model.SeriesId, SeasonNumber = Model.SeasonNumber }, null, null)
@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>
@for (int i = 0; i < Model.Episodes.Count; i++)
{
var episode = Model.Episodes[i];
if (i % 2 == 0)
@*Commands Column*@
<th>
<img src='../../Content/Images/@(Model.AnyWanted ? "notIgnored" : "ignored").png' class='ignoredEpisodesMaster ignoreEpisode ignoreSeason_@(Model.SeasonNumber) @(Model.AnyWanted ? "" : "ignored")' title='Click to toggle season ignore status' />
<img src='../../Content/Images/@(Model.CommonStatus).png' alt='Status' title='Season Status' class='statusImage statusImageMaster' />
@Ajax.ImageActionLink("../../Content/Images/Search.png", new { Alt = "Search", Title = "Search for all episodes in this season", @class = "searchImage searchImageMaster" }, "SearchSeason", "Episode", new { SeriesId = Model.SeriesId, SeasonNumber = Model.SeasonNumber }, null, null)
@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>
</thead>
<tbody>
@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) });
else
{
Html.RenderPartial("Episode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
}
}
</tbody>
</table>

View file

@ -21,97 +21,101 @@
<col style="width:160px" />
<col style="width:100px" />
</colgroup>
<tr>
<th>Series Title</th>
<th>Season #</th>
<th>Episode #</th>
<th>Episode Title</th>
<th>Air Time</th>
<thead>
<tr>
<th>Series Title</th>
<th>Season #</th>
<th>Episode #</th>
<th>Episode Title</th>
<th>Air Time</th>
@*Commands/Status Column*@
<th>
Status
</th>
</tr>
<tr class="title-row">
<td colspan="6">
Yesterday
</td>
</tr>
@*Commands/Status Column*@
<th>
Status
</th>
</tr>
</thead>
<tbody>
<tr class="title-row">
<td colspan="6">
Yesterday
</td>
</tr>
@for (int i = 0; i < Model.Yesterday.Count; i++)
{
var episode = Model.Yesterday[i];
@for (int i = 0; i < Model.Yesterday.Count; i++)
{
var episode = Model.Yesterday[i];
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
}
}
<tr class="title-row">
<td colspan="6">
Today
</td>
</tr>
<tr class="title-row">
<td colspan="6">
Today
</td>
</tr>
@for (int i = 0; i < Model.Today.Count; i++)
{
var episode = Model.Today[i];
@for (int i = 0; i < Model.Today.Count; i++)
{
var episode = Model.Today[i];
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
}
}
<tr class="title-row">
<td colspan="6">
Tomorrow
</td>
<tr class="title-row">
<td colspan="6">
Tomorrow
</td>
@for (int i = 0; i < Model.Tomorrow.Count; i++)
{
var episode = Model.Tomorrow[i];
@for (int i = 0; i < Model.Tomorrow.Count; i++)
{
var episode = Model.Tomorrow[i];
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
}
}
<tr class="title-row">
<td colspan="6">
Future Forecast
</td>
</tr>
<tr class="title-row">
<td colspan="6">
Future Forecast
</td>
</tr>
@for (int i = 0; i < Model.Week.Count; i++)
{
var episode = Model.Week[i];
@for (int i = 0; i < Model.Week.Count; i++)
{
var episode = Model.Week[i];
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
if (i % 2 == 0)
{
Html.RenderPartial("UpcomingEpisode", episode);
}
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
else
{
Html.RenderPartial("UpcomingEpisode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
}
}
</tbody>
</table>
@section Scripts{