add links to indiancine.ma info page
This commit is contained in:
parent
2ff13690f8
commit
6e49032602
2 changed files with 14 additions and 2 deletions
|
@ -373,6 +373,13 @@
|
||||||
"secondaryId": true,
|
"secondaryId": true,
|
||||||
"sort": true
|
"sort": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "links",
|
||||||
|
"title": "Links",
|
||||||
|
"type": ["string"],
|
||||||
|
"columnWidth": 180,
|
||||||
|
"find": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "comments",
|
"id": "comments",
|
||||||
"title": "Comments",
|
"title": "Comments",
|
||||||
|
|
|
@ -26,7 +26,7 @@ pandora.ui.infoView = function(data) {
|
||||||
'editor', 'composer', 'lyricist', 'actor'
|
'editor', 'composer', 'lyricist', 'actor'
|
||||||
],
|
],
|
||||||
listKeys = nameKeys.concat([
|
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
|
// these may contain commas, and are thus separated by semicolons
|
||||||
specialListKeys = ['alternativeTitles', 'productionCompany'],
|
specialListKeys = ['alternativeTitles', 'productionCompany'],
|
||||||
|
@ -302,7 +302,7 @@ pandora.ui.infoView = function(data) {
|
||||||
|
|
||||||
renderGroup(canSeeAllMetadata ? ['genre', 'keyword'] : ['genre']);
|
renderGroup(canSeeAllMetadata ? ['genre', 'keyword'] : ['genre']);
|
||||||
|
|
||||||
renderGroup(['imdbId']);
|
renderGroup(['imdbId', 'links']);
|
||||||
|
|
||||||
if (canEdit) {
|
if (canEdit) {
|
||||||
updateIMDb();
|
updateIMDb();
|
||||||
|
@ -583,6 +583,11 @@ pandora.ui.infoView = function(data) {
|
||||||
var ret;
|
var ret;
|
||||||
if (key == 'year') {
|
if (key == 'year') {
|
||||||
ret = formatLink(value, '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) {
|
} else if (nameKeys.indexOf(key) > -1) {
|
||||||
ret = formatLink(value.split(', '), 'name');
|
ret = formatLink(value.split(', '), 'name');
|
||||||
} else if (listKeys.indexOf(key) > -1) {
|
} else if (listKeys.indexOf(key) > -1) {
|
||||||
|
|
Loading…
Reference in a new issue