From 446a748a79f0bb55cc80f4dc906a6dc3e5170da1 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 25 Aug 2024 15:22:39 +0200 Subject: [PATCH 1/2] include filename in pandora config --- pandora/config.pandora.jsonc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index ac7f0243..51aaee24 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -752,6 +752,13 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "capability": "canSeeMedia", "find": true }, + { + "id": "filename", + "title": "Filename", + "type": ["string"], + "capability": "canSeeMedia", + "find": true + }, { "id": "created", "title": "Date Created", From a218b906cca86c018ecffab608201b1732755a5e Mon Sep 17 00:00:00 2001 From: j Date: Fri, 30 Aug 2024 16:23:07 +0200 Subject: [PATCH 2/2] documents data view --- static/js/URL.js | 2 +- static/js/document.js | 7 +++++++ static/js/documentToolbar.js | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/static/js/URL.js b/static/js/URL.js index c21a6ee6..82480f96 100644 --- a/static/js/URL.js +++ b/static/js/URL.js @@ -400,7 +400,7 @@ pandora.URL = (function() { // Documents views['documents'] = { list: ['grid', 'list', 'pages'], - item: ['view', 'info'] + item: ['view', 'info', 'data'] }; sortKeys['documents'] = { list: { diff --git a/static/js/document.js b/static/js/document.js index b59c4071..143b5bf7 100644 --- a/static/js/document.js +++ b/static/js/document.js @@ -52,6 +52,13 @@ pandora.ui.document = function() { $content.replaceWith( $content = pandora.ui.documentInfoView(result.data) ); + } else if (pandora.user.ui.documentView == 'data') { + $content.replaceWith( + $content = Ox.TreeList({ + data: result.data, + width: pandora.$ui.mainPanel.size(1) - Ox.UI.SCROLLBAR_SIZE + }) + ); } else { setContent(); } diff --git a/static/js/documentToolbar.js b/static/js/documentToolbar.js index ef12a856..a6d42ac2 100644 --- a/static/js/documentToolbar.js +++ b/static/js/documentToolbar.js @@ -184,7 +184,12 @@ pandora.ui.documentToolbar = function() { items: [ {id: 'info', title: Ox._('View Info')}, {id: 'view', title: Ox._('View Document')} - ], + ].concat( + pandora.hasCapability('canSeeExtraItemViews') ? [ + {id: 'data', title: Ox._('View Data')} + ] : [] + + ), value: ui.documentView, width: 128 })