mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-23 01:16:43 +00:00
列表显示外键
This commit is contained in:
parent
369700cfac
commit
86a87be017
@ -19,7 +19,7 @@ Creator.Objects.contacts =
|
||||
reference_to: "customers"
|
||||
list_views:
|
||||
default:
|
||||
columns: ["name", "description", "modified"]
|
||||
columns: ["name", "customer_id", "modified"]
|
||||
permissions:
|
||||
default:
|
||||
allowCreate: true
|
||||
|
@ -64,11 +64,10 @@ Meteor.startup ->
|
||||
_.each obj.fields, (field, field_name)->
|
||||
if field.type == "master_detail" and field.reference_to
|
||||
tabular_name = field.reference_to + "_related_" + object_name
|
||||
console.log tabular_name
|
||||
Creator.TabularTables[tabular_name] = new Tabular.Table
|
||||
name: tabular_name,
|
||||
collection: Creator.Collections[object_name],
|
||||
columns: Creator.getTabularColumns(object_name, ["name"])
|
||||
columns: Creator.getTabularColumns(object_name, obj.list_views.default.columns)
|
||||
dom: "tp"
|
||||
extraFields: ["_id"]
|
||||
lengthChange: false
|
||||
|
Loading…
Reference in New Issue
Block a user