diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-02 18:38:12 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-02 18:38:30 +0100 |
| commit | eed359e2b6d35fe444353f115237d41d6acad9dc (patch) | |
| tree | 5e90cb767cf7e87555890318e7f103d9e78cf568 /examples | |
| parent | ee364381107827718c90fa359055be8e525fe386 (diff) | |
improving display options to the admin view
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/db.json | 51 | ||||
| -rw-r--r-- | examples/index.js | 14 |
2 files changed, 65 insertions, 0 deletions
diff --git a/examples/db.json b/examples/db.json index 11204e7..a0a7eb3 100644 --- a/examples/db.json +++ b/examples/db.json @@ -340,5 +340,56 @@ "__index": 0, "dateCreated": "Tue, 23 Feb 2021 19:30:32 GMT" } + ], + "artist": [ + { + "id": "alexandra-leykauf", + "title": "Alexandra Leykauf", + "__index": 0, + "dateCreated": "Tue, 02 Mar 2021 17:26:21 GMT" + }, + { + "id": "dragutin-banic", + "title": "Dragutin Banic", + "__index": 1, + "dateCreated": "Tue, 02 Mar 2021 17:31:53 GMT" + } + ], + "artwork": [ + { + "id": "sample-1", + "title": "Sample 1", + "artist": "alexandra-leykauf", + "__index": 1, + "dateCreated": "Tue, 02 Mar 2021 17:31:33 GMT" + }, + { + "id": "sample-2", + "title": "Sample 2", + "artist": "alexandra-leykauf", + "__index": 0, + "dateCreated": "Tue, 02 Mar 2021 17:31:37 GMT" + }, + { + "id": "sample-3", + "title": "Sample 3", + "artist": "alexandra-leykauf", + "__index": 2, + "dateCreated": "Tue, 02 Mar 2021 17:31:39 GMT" + }, + { + "id": "dragutin-s-dream", + "title": "Dragutin's Dream", + "artist": "dragutin-banic", + "__index": 4, + "dateCreated": "Tue, 02 Mar 2021 17:32:02 GMT" + }, + { + "id": "dragutin-s-nightmare", + "title": "Dragutin's Nightmare", + "artist": "dragutin-banic", + "__index": 3, + "dateCreated": "Tue, 02 Mar 2021 17:32:08 GMT" + } ] }
\ No newline at end of file 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: { |
