links
This commit is contained in:
parent
6bb51c61a5
commit
e1ffea0972
3 changed files with 24 additions and 0 deletions
14
config.jsonc
14
config.jsonc
|
@ -320,6 +320,13 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
|||
"find": true,
|
||||
"sort": true
|
||||
},
|
||||
{
|
||||
"id": "links",
|
||||
"title": "Links",
|
||||
"type": ["string"],
|
||||
"columnWidth": 180,
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "matches",
|
||||
"operator": "-",
|
||||
|
@ -636,6 +643,13 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
|||
"find": true,
|
||||
"sort": true
|
||||
},
|
||||
{
|
||||
"id": "links",
|
||||
"title": "Links",
|
||||
"type": ["string"],
|
||||
"columnWidth": 180,
|
||||
"find": true
|
||||
},
|
||||
{
|
||||
"id": "notes",
|
||||
"title": "Notes",
|
||||
|
|
|
@ -241,6 +241,7 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
|||
renderGroup(['publisher', 'place', 'series', 'edition', 'language']);
|
||||
|
||||
renderGroup(['tags']);
|
||||
renderGroup(['links']);
|
||||
|
||||
// Render any remaing keys defined in config
|
||||
|
||||
|
@ -472,6 +473,10 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
|||
ret = pandora.formatDate(value);
|
||||
} else if (nameKeys.indexOf(key) > -1) {
|
||||
ret = formatLink(value.split(', '), key);
|
||||
} else if (key == 'links') {
|
||||
ret = value.split(', ').map(function(link) {
|
||||
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
|
||||
}).join(', ');
|
||||
} else if (listKeys.indexOf(key) > -1) {
|
||||
ret = formatLink(value.split(', '), key);
|
||||
} else if (['type', 'publisher'].indexOf(key) > -1) {
|
||||
|
|
|
@ -254,6 +254,7 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
renderGroup(['editor', 'featuring']);
|
||||
|
||||
renderGroup(['tags']);
|
||||
renderGroup(['links']);
|
||||
|
||||
// Render any remaing keys defined in config
|
||||
|
||||
|
@ -515,6 +516,10 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
true
|
||||
), key, date) : '';
|
||||
}).join('; ');
|
||||
} else if (key == 'links') {
|
||||
ret = value.split(', ').map(function(link) {
|
||||
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
|
||||
}).join(', ');
|
||||
} else if (listKeys.indexOf(key) > -1) {
|
||||
ret = formatLink(value.split(', '), key);
|
||||
} else if (specialListKeys.indexOf(key) > -1) {
|
||||
|
|
Loading…
Reference in a new issue