mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
games list
This commit is contained in:
parent
5b432f8c83
commit
353ea30d63
3 changed files with 55 additions and 34 deletions
|
@ -24,26 +24,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Game System</th>
|
||||
<th>Release Year</th>
|
||||
<th>Genre</th>
|
||||
<th>Studio</th>
|
||||
<th>Rating</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody id="items"></tbody>
|
||||
</table>
|
||||
|
||||
<div id="items" class="itemsContainer"></div>
|
||||
|
||||
</div>
|
||||
<div data-role="panel" id="sortPanel" data-position="right" data-display="overlay" data-theme="b" data-position-fixed="true">
|
||||
|
|
|
@ -25,19 +25,9 @@
|
|||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
for (var i = 0, length = result.Items.length; i < length; i++) {
|
||||
var item = result.Items[i];
|
||||
//console.log(item);
|
||||
html += '<tr>';
|
||||
html += '<td><a href="itemdetails.html?id='+item.Id+'">' + item.Name + '</a></td>';
|
||||
html += '<td>' + item.DisplayMediaType + '</td>';
|
||||
html += '<td>' + item.ReleaseYear + '</td>';
|
||||
html += '<td>' + /*LibraryBrowser.renderGenres('', item, "games")*/ + '</td>';
|
||||
html += '<td>' + /*LibraryBrowser.renderStudios('', item, "games")*/ + '</td>';
|
||||
html += '<td>' + /* */ + '</td>';
|
||||
html += '</tr>';
|
||||
|
||||
}
|
||||
html += LibraryBrowser.getGameTableHtml(result.Items, {
|
||||
showGameSystem: true
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
|
|
|
@ -1442,6 +1442,56 @@
|
|||
|
||||
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