mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
display rt summary
This commit is contained in:
parent
4c30399fde
commit
70e4ec0669
@ -128,6 +128,21 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.criticRatingSummary {
|
||||
padding: 5px;
|
||||
font-size: 13px;
|
||||
background: #555;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.criticRatingSummaryHeader {
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media all and (min-width: 750px) {
|
||||
|
||||
.galleryImage {
|
||||
@ -245,7 +260,7 @@
|
||||
.detailPageName .itemMiscInfo {
|
||||
margin-left: 1.5em;
|
||||
font-family: Arial;
|
||||
color: #bbb;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.itemMediaInfo {
|
||||
|
@ -40,11 +40,11 @@
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="txtCommunityRating">Community rating:</label>
|
||||
<input type="number" id="txtCommunityRating" name="txtCommunityRating" step=".1" data-mini="true" min="0" max="10" />
|
||||
<input type="number" id="txtCommunityRating" name="txtCommunityRating" step=".1" data-mini="true" />
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="txtCriticRating">Critic rating:</label>
|
||||
<input type="number" id="txtCriticRating" name="txtCriticRating" step=".1" data-mini="true" min="0" max="10" />
|
||||
<input type="number" id="txtCriticRating" name="txtCriticRating" step=".1" data-mini="true" />
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="txtCriticRatingSummary">Critic rating summary:</label>
|
||||
|
@ -123,14 +123,21 @@
|
||||
<p id="itemCommunityRating"></p>
|
||||
<p id="itemTagline" style="font-style: italic;"></p>
|
||||
<p id="itemOverview"></p>
|
||||
|
||||
<p id="itemRatings" class="userDataIcons"></p>
|
||||
|
||||
<p id="itemPremiereDate"></p>
|
||||
|
||||
<p id="itemBudget"></p>
|
||||
<p id="itemRevenue"></p>
|
||||
<p id="itemGenres"></p>
|
||||
<p id="itemStudios"></p>
|
||||
<p id="itemLinks"></p>
|
||||
|
||||
<p id="criticRatingSummary" class="criticRatingSummary" style="display: none;">
|
||||
<span class="criticRatingSummaryHeader">What the critics say</span>
|
||||
<span id="criticRatingSummaryText"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="itemSongs"></div>
|
||||
|
@ -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…
Reference in New Issue
Block a user