From 51067940473f76373d53d839b13098f0b44ea406 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 6 Jun 2019 16:28:19 +0100 Subject: [PATCH] add links --- config.jsonc | 7 +++++++ static/js/documentInfoView.mdr.js | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config.jsonc b/config.jsonc index 8f9f657..422661f 100644 --- a/config.jsonc +++ b/config.jsonc @@ -206,6 +206,13 @@ "autocomplete": true, "columnWidth": 256 }, + { + "id": "links", + "title": "Links", + "type": ["string"], + "columnWidth": 180, + "find": true + }, { "id": "group", "operator": "+", diff --git a/static/js/documentInfoView.mdr.js b/static/js/documentInfoView.mdr.js index 971278a..4cdeaba 100644 --- a/static/js/documentInfoView.mdr.js +++ b/static/js/documentInfoView.mdr.js @@ -231,7 +231,7 @@ pandora.ui.documentInfoView = function(data, isMixed) { renderGroup(['author', 'date', 'format']); renderGroup(['publisher', 'place', 'series', 'language']); - renderGroup(['source']); + renderGroup(['source', 'links']); renderGroup(['movement', 'event', 'associatedgroups']); renderGroup(['tags']); @@ -429,8 +429,12 @@ pandora.ui.documentInfoView = function(data, isMixed) { ret = formatLink(value.split(', '), key); } else if (listKeys.indexOf(key) > -1) { 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); + } else if (key == 'links') { + ret = value.split(', ').map(function(link) { + return '' + Ox.parseURL(link).host + ''; + }).join(', '); } else { if (isMixed[key]) { ret = 'Mixed'