diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 633c050466..2be803132e 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -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 { diff --git a/dashboard-ui/edititemmetadata.html b/dashboard-ui/edititemmetadata.html index 35effbd56d..f8a1eb28e2 100644 --- a/dashboard-ui/edititemmetadata.html +++ b/dashboard-ui/edititemmetadata.html @@ -40,11 +40,11 @@
- +
- +
diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index f3e3546056..cbeb44b783 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -123,14 +123,21 @@

+

+

+ +
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index 0a205b25b0..d00ee9ffe6 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -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) { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index b1cd6439d8..e7f5e003be 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -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 += "
"; - } - else if (rating < i) { - html += "
"; - } - else { - html += "
"; + + if (item.CommunityRating) { + var rating = item.CommunityRating / 2; + + for (var i = 1; i <= 5; i++) { + if (rating < i - 1) { + html += "
"; + } + else if (rating < i) { + html += "
"; + } + else { + html += "
"; + } } } @@ -837,7 +840,6 @@ } html += '
' + item.CriticRating + '%
'; - } return html;