mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
games page changed to graphical poster/backdrop style
This commit is contained in:
parent
ab2bc00795
commit
fdd009f29c
3 changed files with 27 additions and 54 deletions
|
@ -17,6 +17,12 @@
|
|||
</div>
|
||||
<div class="viewSettings">
|
||||
<div class="viewControls">
|
||||
<div style="display: inline-block;">
|
||||
<select data-mini="true" data-inline="true" id="selectView" name="selectView">
|
||||
<option value="Backdrop">Backdrop</option>
|
||||
<option value="Poster">Poster</option>
|
||||
</select>
|
||||
</div>
|
||||
<button data-mini="true" data-icon="sort" data-inline="true" onclick="$('#sortPanel', $.mobile.activePage).panel( 'toggle' );">Sort</button>
|
||||
<button data-mini="true" data-icon="filter" data-inline="true" onclick="$('#filterPanel', $.mobile.activePage).panel( 'toggle' );">Filter</button>
|
||||
</div>
|
||||
|
|
|
@ -25,9 +25,22 @@
|
|||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
html += LibraryBrowser.getGameTableHtml(result.Items, {
|
||||
showGameSystem: true
|
||||
if (view == "Backdrop") {
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
preferBackdrop: true,
|
||||
context: "games",
|
||||
shape: "backdrop"
|
||||
});
|
||||
}
|
||||
else if (view == "Poster") {
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
context: "games",
|
||||
shape: "poster"
|
||||
});
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
|
|
|
@ -181,6 +181,10 @@
|
|||
|
||||
html += '<p class="itemMiscInfo">' + childText + '</p>';
|
||||
}
|
||||
else if (item.Type == "Game") {
|
||||
|
||||
html += '<p class="itemMiscInfo">' + item.GameSystem + '</p>';
|
||||
}
|
||||
else {
|
||||
html += '<p class="itemMiscInfo">' + LibraryBrowser.getMiscInfoHtml(item) + '</p>';
|
||||
}
|
||||
|
@ -1460,56 +1464,6 @@
|
|||
|
||||
html += '</div></a>';
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getGameTableHtml: function (items, options) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
var html = '';
|
||||
|
||||
var cssClass = "detailTable";
|
||||
|
||||
html += '<div class="detailTableContainer"><table class="' + cssClass + '">';
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<th class="tabletColumn">Game</th>';
|
||||
|
||||
if (options.showGameSystem) {
|
||||
html += '<th>Game System</th>';
|
||||
}
|
||||
|
||||
//html += '<th class="tabletColumn">Release Year</th>';
|
||||
html += '<th class="tabletColumn">Play Count</th>';
|
||||
html += '<th class="tabletColumn userDataCell"></th>';
|
||||
|
||||
html += '</tr>';
|
||||
|
||||
for (var i = 0, length = items.length; i < length; i++) {
|
||||
|
||||
var item = items[i];
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<td><a href="' + LibraryBrowser.getHref(item, "game") + '">' + (item.Name || "") + '</a></td>';
|
||||
|
||||
if (options.showGameSystem) {
|
||||
html += '<td class="tabletColumn">' + item.DisplayMediaType + '</td>';
|
||||
}
|
||||
|
||||
//html += '<td class="tabletColumn">' + item.ReleaseYear + '</td>';
|
||||
|
||||
html += '<td class="tabletColumn">' + (item.UserData ? item.UserData.PlayCount : 0) + '</td>';
|
||||
|
||||
html += '<td class="tabletColumn userDataCell">' + LibraryBrowser.getUserDataIconsHtml(item) + '</td>';
|
||||
|
||||
html += '</tr>';
|
||||
}
|
||||
|
||||
html += '</table></div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue