Follow up - 848175a290 - Can't access session information for User ObjectManager::Attribute in fields URL template.

This commit is contained in:
Thorsten Eckel 2019-11-19 10:17:06 +01:00
parent 94fd8c2957
commit 4cc3ed640b
2 changed files with 2 additions and 2 deletions

View file

@ -362,7 +362,7 @@ class App.ControllerForm extends App.Controller
else
placeholderObjects = {}
if @model.className && !_.isEmpty(attribute.linktemplate) && !_.isEmpty(@params[attribute.name])
placeholderObjects = { attribute: attribute, user: App.Session.get(), config: App.Config.all() }
placeholderObjects = { attribute: attribute, session: App.Session.get(), config: App.Config.all() }
placeholderObjects[@model.className.toLowerCase()] = @params
fullItem = $(
App.view('generic/attribute')(

View file

@ -158,7 +158,7 @@ class App extends Spine.Controller
return if !object.constructor
return if !object.constructor.className
return if _.isEmpty(object[attributeConfig.name])
placeholderObjects = { attribute: attributeConfig, user: App.Session.get(), config: App.Config.all() }
placeholderObjects = { attribute: attributeConfig, session: App.Session.get(), config: App.Config.all() }
placeholderObjects[object.constructor.className.toLowerCase()] = object
"<a href=\"#{App.Utils.replaceTags(attributeConfig.linktemplate, placeholderObjects, true)}\" target=\"blank\">#{App.Utils.htmlEscape(resultLocal)}</a>"