add links to indiancine.ma info page

This commit is contained in:
j 2013-12-26 08:35:41 +00:00
parent 2ff13690f8
commit 6e49032602
2 changed files with 14 additions and 2 deletions

View file

@ -373,6 +373,13 @@
"secondaryId": true,
"sort": true
},
{
"id": "links",
"title": "Links",
"type": ["string"],
"columnWidth": 180,
"find": true
},
{
"id": "comments",
"title": "Comments",

View file

@ -26,7 +26,7 @@ pandora.ui.infoView = function(data) {
'editor', 'composer', 'lyricist', 'actor'
],
listKeys = nameKeys.concat([
'country', 'language', 'color', 'sound', 'genre', 'keyword'
'country', 'language', 'color', 'sound', 'genre', 'keyword', 'links'
]),
// these may contain commas, and are thus separated by semicolons
specialListKeys = ['alternativeTitles', 'productionCompany'],
@ -302,7 +302,7 @@ pandora.ui.infoView = function(data) {
renderGroup(canSeeAllMetadata ? ['genre', 'keyword'] : ['genre']);
renderGroup(['imdbId']);
renderGroup(['imdbId', 'links']);
if (canEdit) {
updateIMDb();
@ -583,6 +583,11 @@ pandora.ui.infoView = function(data) {
var ret;
if (key == 'year') {
ret = formatLink(value, 'year');
} else if (key == 'links') {
ret = value.split(', ').map(function(link) {
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
}).join(', ');
} else if (nameKeys.indexOf(key) > -1) {
ret = formatLink(value.split(', '), 'name');
} else if (listKeys.indexOf(key) > -1) {