mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #944 - Add card views
This commit is contained in:
parent
a1535a341b
commit
c6064c9e96
27 changed files with 321 additions and 69 deletions
|
@ -1217,7 +1217,7 @@
|
|||
cssClass += ' itemWithAction';
|
||||
}
|
||||
|
||||
html += '<a' + dataAttributes + ' class="' + cssClass + '" href="' + href + '"' + defaultActionAttribute + '>';
|
||||
html += '<div' + dataAttributes + ' class="' + cssClass + '">';
|
||||
|
||||
var style = "";
|
||||
|
||||
|
@ -1250,7 +1250,7 @@
|
|||
html += '<div class="cardScalable">';
|
||||
|
||||
html += '<div class="cardPadder"></div>';
|
||||
html += '<div class="cardContent">';
|
||||
html += '<a class="cardContent" href="' + href + '"' + defaultActionAttribute + '>';
|
||||
html += '<div class="' + imageCssClass + '" style="' + style + '"' + dataSrc + '></div>';
|
||||
|
||||
html += '<div class="cardOverlayTarget"></div>';
|
||||
|
@ -1292,7 +1292,7 @@
|
|||
}
|
||||
|
||||
// cardContent
|
||||
html += '</div>';
|
||||
html += '</a>';
|
||||
|
||||
// cardScalable
|
||||
html += '</div>';
|
||||
|
@ -1304,7 +1304,7 @@
|
|||
// cardBox
|
||||
html += '</div>';
|
||||
|
||||
html += "</a>";
|
||||
html += "</div>";
|
||||
|
||||
}
|
||||
|
||||
|
@ -1317,6 +1317,12 @@
|
|||
|
||||
html += '<div class="' + footerClass + '">';
|
||||
|
||||
if (options.cardLayout) {
|
||||
html += '<div class="cardText" style="text-align:right; float:right;">';
|
||||
html += '<button class="listviewMenuButton" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 4px 0 0;"></button>';
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
var name = LibraryBrowser.getPosterViewDisplayName(item, options.displayAsSpecial);
|
||||
|
||||
if (!imgUrl && !options.showTitle) {
|
||||
|
@ -1346,6 +1352,19 @@
|
|||
lines.push(itemCountHtml);
|
||||
}
|
||||
|
||||
if (options.showSongCount) {
|
||||
|
||||
var songLine = '';
|
||||
|
||||
if (item.SongCount) {
|
||||
songLine = item.SongCount == 1 ?
|
||||
Globalize.translate('ValueOneSong') :
|
||||
Globalize.translate('ValueSongCount', item.SongCount);
|
||||
}
|
||||
|
||||
lines.push(songLine);
|
||||
}
|
||||
|
||||
if (options.showPremiereDate && item.PremiereDate) {
|
||||
|
||||
try {
|
||||
|
@ -1363,6 +1382,18 @@
|
|||
lines.push(item.ProductionYear || '');
|
||||
}
|
||||
|
||||
if (options.showSeriesYear) {
|
||||
|
||||
if (item.Status == "Continuing") {
|
||||
|
||||
lines.push(Globalize.translate('ValueSeriesYearToPresent', item.ProductionYear || ''));
|
||||
|
||||
} else {
|
||||
lines.push(item.ProductionYear || '');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getCardTextLines(lines, cssClass, !options.overlayText);
|
||||
|
||||
if (options.overlayText) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue