1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-10 11:10:40 +02: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"> <table class="seriesTable">
<colgroup> <colgroup>
<col style="width: 10px"/> <col style="width: 10px"/>
<col style="width:auto" /> <col style="width:auto" />
<col style="width:100px" /> <col style="width:100px" />
<col style="width:100px" /> <col style="width:100px" />
@ -89,34 +90,38 @@
<col style="width:100px" /> <col style="width:100px" />
<col style="width:80px"/> <col style="width:80px"/>
</colgroup> </colgroup>
<tr> <thead>
<th>Status</>
<th>Title</th>
<th>Seasons</th>
<th>Quality</th>
<th>Next Airing</th>
<th>Episodes</th>
@*Commands Column*@ <tr>
<th> <th>Status</th>
<th>Title</th>
<th>Seasons</th>
<th>Quality</th>
<th>Next Airing</th>
<th>Episodes</th>
@*Commands Column*@
<th>
</th> </th>
</tr> </tr>
</thead>
@for (int i = 0; i < Model.Count; i++) <tbody>
{ @for (int i = 0; i < Model.Count; i++)
var series = Model[i]; {
var series = Model[i];
if (i % 2 == 0) if (i % 2 == 0)
{ {
Html.RenderPartial("Series", series); Html.RenderPartial("Series", series);
} }
else else
{ {
Html.RenderPartial("Series", series, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) }); Html.RenderPartial("Series", series, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
} }
} </tbody>
</table> </table>
<div id="seriesEditor" title="Edit Series"></div> <div id="seriesEditor" title="Edit Series"></div>

View File

@ -8,37 +8,41 @@
<table class="seriesTable"> <table class="seriesTable">
<colgroup> <colgroup>
<col style="width:40px"/> <col style="width:40px"/>
<col/> <col style="width:auto"/>
<col style="width:100px" /> <col style="width:100px" />
<col style="width:100px" /> <col style="width:100px" />
<col style="width:110px" /> <col style="width:110px" />
</colgroup> </colgroup>
<tr> <thead>
<th>#</th> <tr>
<th>Title</th> <th>#</th>
<th>Air Date</th> <th>Title</th>
<th>Quality</th> <th>Air Date</th>
<th>Quality</th>
@*Commands Column*@ @*Commands Column*@
<th> <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.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' /> <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/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) @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> </th>
</tr> </tr>
@for (int i = 0; i < Model.Episodes.Count; i++) </thead>
{ <tbody>
var episode = Model.Episodes[i]; @for (int i = 0; i < Model.Episodes.Count; i++)
if (i % 2 == 0)
{ {
Html.RenderPartial("Episode", episode); var episode = Model.Episodes[i];
}
if (i % 2 == 0)
{
Html.RenderPartial("Episode", episode);
}
else else
{ {
Html.RenderPartial("Episode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) }); Html.RenderPartial("Episode", episode, new ViewDataDictionary { new KeyValuePair<string, object>("AltRow", true) });
}
} }
} </tbody>
</table> </table>

View File

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