diff --git a/static/js/pandora/infoView.indiancinema.js b/static/js/pandora/infoView.indiancinema.js index a35e7e4fa..1585ce8de 100644 --- a/static/js/pandora/infoView.indiancinema.js +++ b/static/js/pandora/infoView.indiancinema.js @@ -131,6 +131,8 @@ pandora.ui.infoView = function(data) { $imdb, + $links, + $descriptions, $statistics = $('
') @@ -235,6 +237,31 @@ pandora.ui.infoView = function(data) { updateIMDb(); } + // Encyclopedia and Wiki --------------------------------------------------- + + if ((data.encyclopedia || data.wiki) && canEdit) { + $links = Ox.Element().css(css); + if (data.encyclopedia) { + $links + .append(formatKey('encyclopedia')) + .append( + '' + + data.encyclopedia + '' + ) + .append(data.wiki ? '; ' : ''); + } + if (data.wiki) { + $links + .append(formatKey('wiki')) + .append( + '' + decodeURI(data.wiki) + '' + ); + } + $links.appendTo($text); + pandora.createLinks($links); + } + // Summary ----------------------------------------------------------------- if (data.summary || canEdit) { @@ -375,7 +402,19 @@ pandora.ui.infoView = function(data) { $('
') .css({marginBottom: '4px'}) - .append(formatKey('Notes', 'statistics')) + .append( + formatKey('Notes', 'statistics').options({ + tooltip: 'Only ' + + Object.keys(pandora.site.capabilities.canEditMetadata).map(function(level, i) { + return ( + i == 0 ? '' + : i < pandora.site.capabilities.canEditMetadata.length - 1 ? ', ' + : ' and ' + ) + Ox.toTitleCase(level) + }) + + ' can see and edit these notes' + }) + ) .append( Ox.EditableContent({ clickLink: pandora.clickLink, @@ -472,7 +511,7 @@ pandora.ui.infoView = function(data) { ? '' + Ox.toTitleCase(key) + ': ' : mode == 'description' ? Ox.toTitleCase(key) - : $('
') + : Ox.Element() .css({marginBottom: '4px', fontWeight: 'bold'}) .html(Ox.toTitleCase(key) .replace(' Per ', ' per '));