add links
This commit is contained in:
parent
6e915beadf
commit
5106794047
2 changed files with 13 additions and 2 deletions
|
@ -206,6 +206,13 @@
|
||||||
"autocomplete": true,
|
"autocomplete": true,
|
||||||
"columnWidth": 256
|
"columnWidth": 256
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "links",
|
||||||
|
"title": "Links",
|
||||||
|
"type": ["string"],
|
||||||
|
"columnWidth": 180,
|
||||||
|
"find": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "group",
|
"id": "group",
|
||||||
"operator": "+",
|
"operator": "+",
|
||||||
|
|
|
@ -231,7 +231,7 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
|
|
||||||
renderGroup(['author', 'date', 'format']);
|
renderGroup(['author', 'date', 'format']);
|
||||||
renderGroup(['publisher', 'place', 'series', 'language']);
|
renderGroup(['publisher', 'place', 'series', 'language']);
|
||||||
renderGroup(['source']);
|
renderGroup(['source', 'links']);
|
||||||
renderGroup(['movement', 'event', 'associatedgroups']);
|
renderGroup(['movement', 'event', 'associatedgroups']);
|
||||||
renderGroup(['tags']);
|
renderGroup(['tags']);
|
||||||
|
|
||||||
|
@ -429,8 +429,12 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
ret = formatLink(value.split(', '), key);
|
ret = formatLink(value.split(', '), key);
|
||||||
} else if (listKeys.indexOf(key) > -1) {
|
} else if (listKeys.indexOf(key) > -1) {
|
||||||
ret = formatLink(value.split(', '), key);
|
ret = formatLink(value.split(', '), key);
|
||||||
} else if (['type', 'publisher', 'format'].indexOf(key) > -1) {
|
} else if (['type', 'publisher', 'format', 'source'].indexOf(key) > -1) {
|
||||||
ret = formatLink(value, key);
|
ret = formatLink(value, key);
|
||||||
|
} else if (key == 'links') {
|
||||||
|
ret = value.split(', ').map(function(link) {
|
||||||
|
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
|
||||||
|
}).join(', ');
|
||||||
} else {
|
} else {
|
||||||
if (isMixed[key]) {
|
if (isMixed[key]) {
|
||||||
ret = 'Mixed'
|
ret = 'Mixed'
|
||||||
|
|
Loading…
Reference in a new issue