From eed359e2b6d35fe444353f115237d41d6acad9dc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 2 Mar 2021 18:38:12 +0100 Subject: improving display options to the admin view --- examples/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'examples/index.js') diff --git a/examples/index.js b/examples/index.js index 57bd600..a2a1a18 100644 --- a/examples/index.js +++ b/examples/index.js @@ -29,6 +29,9 @@ var app = okcms bread: { title: "type", }, + artwork: { + groupBy: "artist", + }, }, }, }, @@ -77,6 +80,15 @@ var app = okcms title: { type: "string" }, file: { type: "file" }, }, + artist: { + id: { type: "string", hidden: true }, + title: { type: "string", alias: "Artist Name" }, + }, + artwork: { + id: { type: "string", hidden: true }, + title: { type: "string" }, + artist: { type: "foreign-key", key: "artist" }, + }, }, resources: [ @@ -86,6 +98,8 @@ var app = okcms { type: "test" }, { type: "flour" }, { type: "filez" }, + { type: "artist" }, + { type: "artwork" }, ], services: { -- cgit v1.2.3-70-g09d2