diff --git a/l10n/find-duplicate-field-values.csv b/l10n/find-duplicate-field-values.csv index c6c3d01..7e0d660 100644 --- a/l10n/find-duplicate-field-values.csv +++ b/l10n/find-duplicate-field-values.csv @@ -10,3 +10,6 @@ fylr-plugin-find-duplicate-field-values.info.link,Dubletten gefunden. Mehr Info fylr-plugin-find-duplicate-field-values.modal.open.link,Öffnen,Öffnen fylr-plugin-find-duplicate-field-values.options.empty,Ohne,Without fylr-plugin-find-duplicate-field-values.options.empty_save,Die Optionen werden erst nach dem Speichern sichtbar,The options only become visible after saving +fylr-plugin-find-duplicate-field-values.modal.open.shortinfo_standard,Kurzinfo,Shortinfo +fylr-plugin-find-duplicate-field-values.modal.open.pool,Pool,Pool +fylr-plugin-find-duplicate-field-values.modal.open.objecttype,Objekttyp,Objecttype diff --git a/src/webfrontend/find-duplicate-field-values.coffee b/src/webfrontend/find-duplicate-field-values.coffee index 487be3e..cae2cec 100644 --- a/src/webfrontend/find-duplicate-field-values.coffee +++ b/src/webfrontend/find-duplicate-field-values.coffee @@ -20,11 +20,25 @@ class FindDublicateFieldValues extends CustomMaskSplitter newOnClick = (evt, button) -> # generate content for modal searchResults = button.opts.searchResults + # if pool, show pool-path, else show objecttype + objecttype = searchResults[0]._objecttype + hasPool = false + if searchResults[0][objecttype]?._pool?._path + hasPool = true + firstRowLabel = $$('fylr-plugin-find-duplicate-field-values.modal.open.pool') + else + firstRowLabel = $$('fylr-plugin-find-duplicate-field-values.modal.open.objecttype') content = '' - content += '' + content += '' for object in searchResults content += '' - content += '' + if hasPool == false + content += '' + else + fullPath = [] + for pathElem in object[objecttype]._pool._path + fullPath.push pathElem.pool.name[ez5.loca.getLanguage()] + content += '' content += '' content += '' link = window.location.origin + '/#/detail/' + object._uuid @@ -59,7 +73,7 @@ class FindDublicateFieldValues extends CustomMaskSplitter type: "POST" json_data: limit: 100 - format: 'standard' + format: 'full' generate_rights: false objecttypes: [objecttype] search: [
ObjekttypIDKurzinfo' + $$('fylr-plugin-find-duplicate-field-values.modal.open.link') + '
' + firstRowLabel + 'ID' + $$('fylr-plugin-find-duplicate-field-values.modal.open.shortinfo_standard') + '' + $$('fylr-plugin-find-duplicate-field-values.modal.open.link') + '
' + object._objecttype + '' + object._objecttype + '' + fullPath.join(' > ') + '' + object._system_object_id + '' + object._standard[1].text[ez5.loca.getLanguage()] + '