gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

New UI: Control properties for schema fields #170

Open Jotschi opened 7 years ago

Jotschi commented 7 years ago

Add an additional property to the schema fields which can be used to control the appearance of fields within the node edit view.

config: json object (optional) use: string control: Only add control if there were configuration settings specified.

 {
    "uuid" : "477ecd1759ae4a1bbecd1759aeea1b5f",
    "creator" : {
      "uuid" : "41fb5c7e721246a4bb5c7e721216a449"
    },
    "created" : "2017-05-09T09:53:47Z",
    "editor" : {
      "uuid" : "41fb5c7e721246a4bb5c7e721216a449"
    },
    "edited" : "2017-05-09T09:53:47Z",
    "displayField" : "title",
    "segmentField" : "filename",
    "container" : false,
    "version" : 1,
    "description" : "Content schema for blogposts",
    "name" : "content",
    "fields" : [ {
      "name" : "name",
      "label" : "Name",
      "required" : true,
      "type" : "string",
      "control": {
         "use": "textarea",
         "config": { .... }
      }
    }, {
      "name" : "filename",
      "label" : "Filename",
      "required" : false,
      "type" : "string",
      "control": {
         "use": "textarea",
         "config": { .... }
      }
    }, {
      "name" : "title",
      "label" : "Title",
      "required" : false,
      "type" : "string"
    }, {
      "name" : "content",
      "label" : "Content",
      "required" : false,
      "type" : "html"
    } ],
    "permissions" : {
      "create" : false,
      "read" : true,
      "update" : false,
      "delete" : false,
      "publish" : false,
      "readPublished" : false
    }
  }
philippguertler commented 5 years ago

The same concept can be used for not only schema fields, but also for schemas in general and other types (project, user, group, role, tag-family)