mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 17:06:42 +00:00
相关表列表支持显示自定义按钮 #2697
This commit is contained in:
parent
fb972b5aa5
commit
08bc891736
@ -558,6 +558,22 @@ Creator.getRelatedObjectNames = (object_name, spaceId, userId)->
|
||||
related_objects = Creator.getRelatedObjects(object_name, spaceId, userId)
|
||||
return _.pluck(related_objects,"object_name")
|
||||
|
||||
Creator.getRelatedObjectListActions = (relatedObjectName, spaceId, userId)->
|
||||
actions = Creator.getActions(relatedObjectName, spaceId, userId)
|
||||
actions = _.filter actions, (action)->
|
||||
if action.name == "standard_follow"
|
||||
return false
|
||||
if action.name == "standard_query"
|
||||
return false
|
||||
if action.on == "list"
|
||||
if typeof action.visible == "function"
|
||||
return action.visible()
|
||||
else
|
||||
return action.visible
|
||||
else
|
||||
return false
|
||||
return actions
|
||||
|
||||
Creator.getActions = (object_name, spaceId, userId)->
|
||||
if Meteor.isClient
|
||||
if !object_name
|
||||
|
Loading…
Reference in New Issue
Block a user