From 3f9361c85752014f4bd7ec4a3b8ae69eeb4c004c Mon Sep 17 00:00:00 2001 From: j Date: Tue, 8 May 2018 12:40:49 +0100 Subject: [PATCH] render cast --- static/js/infoView.cinemuse.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/static/js/infoView.cinemuse.js b/static/js/infoView.cinemuse.js index d8ce458..5534884 100644 --- a/static/js/infoView.cinemuse.js +++ b/static/js/infoView.cinemuse.js @@ -313,11 +313,27 @@ pandora.ui.infoView = function(data) { renderGroup([ 'producer', 'codirector', 'writer', 'cinematographer', 'editor', - 'composer', 'lyricist' ]); renderGroup(['actor']); + data.cast && $('
') + .addClass('OxSelectable') + .css(css) + .html( + formatKey('cast') + data.cast.map(function(value) { + // FIXME: 'uncredited' should be removed on the backend + value.character = value.character.replace('(uncredited)', '').trim(); + return formatValue(value.actor, 'name') + + ( + canSeeAllMetadata && value.character + ? ' ' + formatLight('(' + value.character + ')') + : '' + ); + }).join(', ') + ) + .appendTo($text); + renderGroup(canSeeAllMetadata ? ['genre', 'topic'] : ['genre']); renderGroup([