From a420ecb5307057c715fd68575f3383ebefaca98f Mon Sep 17 00:00:00 2001 From: j Date: Wed, 5 Feb 2020 17:31:44 +0100 Subject: [PATCH] add tags --- config.jsonc | 20 ++++++++++++++++++++ static/js/documentInfoView.js | 2 +- static/js/infoView.js | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/config.jsonc b/config.jsonc index a09d35c..1d8039d 100644 --- a/config.jsonc +++ b/config.jsonc @@ -45,6 +45,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "canAddItems": {"member": true, "staff": true, "admin": true}, "canAddDocuments": {"member": true, "staff": true, "admin": true}, "canDownloadVideo": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, + "canDownloadSource": {"guest": -1, "member": -1, "staff": 4, "admin": 4}, "canEditAnnotations": {"staff": true, "admin": true}, "canEditDocuments": {"staff": true, "admin": true}, "canEditEntities": {"staff": true, "admin": true}, @@ -309,6 +310,15 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "sort": true, "columnWidth": 256 }, + { + "id": "tags", + "title": "Tags", + "type": ["string"], + "columnWidth": 180, + "filter": true, + "find": true, + "sort": true + }, { "id": "matches", "operator": "-", @@ -615,6 +625,16 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "type": "text", "find": true }, + { + "id": "tags", + "title": "Tags", + "type": ["string"], + "autocomplete": true, + "columnWidth": 180, + "filter": true, + "find": true, + "sort": true + }, { "id": "notes", "title": "Notes", diff --git a/static/js/documentInfoView.js b/static/js/documentInfoView.js index 2991d13..940bfab 100644 --- a/static/js/documentInfoView.js +++ b/static/js/documentInfoView.js @@ -239,7 +239,7 @@ pandora.ui.documentInfoView = function(data, isMixed) { renderGroup(['author', 'editor', 'date', 'type']); renderGroup(['publisher', 'place', 'series', 'edition', 'language']); - Ox.getObjectById(pandora.site.documentKeys, 'keywords') && renderGroup(['keywords']) + renderGroup(['tags']); // Render any remaing keys defined in config diff --git a/static/js/infoView.js b/static/js/infoView.js index 347a351..8205d2f 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -253,6 +253,8 @@ pandora.ui.infoView = function(data, isMixed) { renderGroup(['editor', 'featuring']); + renderGroup(['tags']); + // Render any remaing keys defined in config renderRemainingKeys();