Skip to content

Commit 7d037f4

Browse files
pool to popup
1 parent 3562b6c commit 7d037f4

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

l10n/find-duplicate-field-values.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ fylr-plugin-find-duplicate-field-values.info.link,Dubletten gefunden. Mehr Info
1010
fylr-plugin-find-duplicate-field-values.modal.open.link,Öffnen,Öffnen
1111
fylr-plugin-find-duplicate-field-values.options.empty,Ohne,Without
1212
fylr-plugin-find-duplicate-field-values.options.empty_save,Die Optionen werden erst nach dem Speichern sichtbar,The options only become visible after saving
13+
fylr-plugin-find-duplicate-field-values.modal.open.shortinfo_standard,Kurzinfo,Shortinfo
14+
fylr-plugin-find-duplicate-field-values.modal.open.pool,Pool,Pool
15+
fylr-plugin-find-duplicate-field-values.modal.open.objecttype,Objekttyp,Objecttype

src/webfrontend/find-duplicate-field-values.coffee

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,25 @@ class FindDublicateFieldValues extends CustomMaskSplitter
2020
newOnClick = (evt, button) ->
2121
# generate content for modal
2222
searchResults = button.opts.searchResults
23+
# if pool, show pool-path, else show objecttype
24+
objecttype = searchResults[0]._objecttype
25+
hasPool = false
26+
if searchResults[0][objecttype]?._pool?._path
27+
hasPool = true
28+
firstRowLabel = $$('fylr-plugin-find-duplicate-field-values.modal.open.pool')
29+
else
30+
firstRowLabel = $$('fylr-plugin-find-duplicate-field-values.modal.open.objecttype')
2331
content = '<table>'
24-
content += '<tr><th>Objekttyp</th><th>ID</th><th>Kurzinfo</th><th>' + $$('fylr-plugin-find-duplicate-field-values.modal.open.link') + '</th></tr>'
32+
content += '<tr><th>' + firstRowLabel + '</th><th>ID</th><th>' + $$('fylr-plugin-find-duplicate-field-values.modal.open.shortinfo_standard') + '</th><th>' + $$('fylr-plugin-find-duplicate-field-values.modal.open.link') + '</th></tr>'
2533
for object in searchResults
2634
content += '<tr>'
27-
content += '<td>' + object._objecttype + '</td>'
35+
if hasPool == false
36+
content += '<td>' + object._objecttype + '</td>'
37+
else
38+
fullPath = []
39+
for pathElem in object[objecttype]._pool._path
40+
fullPath.push pathElem.pool.name[ez5.loca.getLanguage()]
41+
content += '<td>' + fullPath.join(' > ') + '</td>'
2842
content += '<td>' + object._system_object_id + '</td>'
2943
content += '<td>' + object._standard[1].text[ez5.loca.getLanguage()] + '</td>'
3044
link = window.location.origin + '/#/detail/' + object._uuid
@@ -59,7 +73,7 @@ class FindDublicateFieldValues extends CustomMaskSplitter
5973
type: "POST"
6074
json_data:
6175
limit: 100
62-
format: 'standard'
76+
format: 'full'
6377
generate_rights: false
6478
objecttypes: [objecttype]
6579
search: [

0 commit comments

Comments
 (0)