exact search for document and item keys on info page

This commit is contained in:
j 2025-10-16 13:07:48 +01:00
commit 776ef3c6c6
2 changed files with 6 additions and 2 deletions

View file

@ -423,8 +423,10 @@ pandora.ui.documentInfoView = function(data, isMixed) {
function formatLink(value, key) {
return (Ox.isArray(value) ? value : [value]).map(function(value) {
var documentKey = Ox.getObjectById(pandora.site.documentKeys, key),
op = documentKey && documentKey.filter ? '==' : '=';
return key
? '<a href="/documents/' + key + '=' + pandora.escapeQueryValue(value) + '">' + value + '</a>'
? '<a href="/documents/' + key + op + pandora.escapeQueryValue(Ox.decodeHTMLEntities(value)) + '">' + value + '</a>'
: value;
}).join(', ');
}