render cast

This commit is contained in:
j 2018-05-08 12:40:49 +01:00
parent ec32fc207e
commit 3f9361c857

View file

@ -313,11 +313,27 @@ pandora.ui.infoView = function(data) {
renderGroup([ renderGroup([
'producer', 'codirector', 'writer', 'cinematographer', 'editor', 'producer', 'codirector', 'writer', 'cinematographer', 'editor',
'composer', 'lyricist'
]); ]);
renderGroup(['actor']); renderGroup(['actor']);
data.cast && $('<div>')
.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(canSeeAllMetadata ? ['genre', 'topic'] : ['genre']);
renderGroup([ renderGroup([