diff --git a/config.jsonc b/config.jsonc index 4e4a5c2..cafc582 100644 --- a/config.jsonc +++ b/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", diff --git a/static/js/documentInfoView.sarai.js b/static/js/documentInfoView.sarai.js index aa0b32a..98d8e64 100644 --- a/static/js/documentInfoView.sarai.js +++ b/static/js/documentInfoView.sarai.js @@ -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 '' + Ox.parseURL(link).host + ''; + }).join(', '); } else if (listKeys.indexOf(key) > -1) { ret = formatLink(value.split(', '), key); } else if (['type', 'publisher'].indexOf(key) > -1) { diff --git a/static/js/infoView.sarai.js b/static/js/infoView.sarai.js index 9746ffd..c9d0e2b 100644 --- a/static/js/infoView.sarai.js +++ b/static/js/infoView.sarai.js @@ -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 '' + Ox.parseURL(link).host + ''; + }).join(', '); } else if (listKeys.indexOf(key) > -1) { ret = formatLink(value.split(', '), key); } else if (specialListKeys.indexOf(key) > -1) {