mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
display rt summary
This commit is contained in:
parent
4c30399fde
commit
70e4ec0669
5 changed files with 48 additions and 16 deletions
|
@ -203,7 +203,7 @@
|
|||
|
||||
LibraryBrowser.renderOverview($('#itemOverview', page), item);
|
||||
|
||||
if (item.CommunityRating) {
|
||||
if (item.CommunityRating || item.CriticRating) {
|
||||
$('#itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
|
||||
} else {
|
||||
$('#itemCommunityRating', page).hide();
|
||||
|
@ -225,6 +225,14 @@
|
|||
LibraryBrowser.renderStudios($('#itemStudios', page), item, context);
|
||||
renderUserDataIcons(page, item);
|
||||
LibraryBrowser.renderLinks($('#itemLinks', page), item);
|
||||
|
||||
if (item.CriticRatingSummary) {
|
||||
$('#criticRatingSummary', page).show();
|
||||
$('#criticRatingSummaryText', page).html(item.CriticRatingSummary);
|
||||
|
||||
} else {
|
||||
$('#criticRatingSummary', page).hide();
|
||||
}
|
||||
}
|
||||
|
||||
function renderChildren(page, item) {
|
||||
|
|
|
@ -813,18 +813,21 @@
|
|||
|
||||
getRatingHtml: function (item) {
|
||||
|
||||
var rating = item.CommunityRating / 2;
|
||||
|
||||
var html = "";
|
||||
for (var i = 1; i <= 5; i++) {
|
||||
if (rating < i - 1) {
|
||||
html += "<div class='starRating emptyStarRating' title='" + item.CommunityRating + "'></div>";
|
||||
}
|
||||
else if (rating < i) {
|
||||
html += "<div class='starRating halfStarRating' title='" + item.CommunityRating + "'></div>";
|
||||
}
|
||||
else {
|
||||
html += "<div class='starRating' title='" + item.CommunityRating + "'></div>";
|
||||
|
||||
if (item.CommunityRating) {
|
||||
var rating = item.CommunityRating / 2;
|
||||
|
||||
for (var i = 1; i <= 5; i++) {
|
||||
if (rating < i - 1) {
|
||||
html += "<div class='starRating emptyStarRating' title='" + item.CommunityRating + "'></div>";
|
||||
}
|
||||
else if (rating < i) {
|
||||
html += "<div class='starRating halfStarRating' title='" + item.CommunityRating + "'></div>";
|
||||
}
|
||||
else {
|
||||
html += "<div class='starRating' title='" + item.CommunityRating + "'></div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -837,7 +840,6 @@
|
|||
}
|
||||
|
||||
html += '<div class="criticRating">' + item.CriticRating + '%</div>';
|
||||
|
||||
}
|
||||
|
||||
return html;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue