summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/db.json9
-rw-r--r--examples/index.js22
2 files changed, 31 insertions, 0 deletions
diff --git a/examples/db.json b/examples/db.json
index 454db14..74f460f 100644
--- a/examples/db.json
+++ b/examples/db.json
@@ -246,5 +246,14 @@
"__index": 0,
"dateCreated": "Thu, 21 Apr 2016 21:52:44 GMT"
}
+ ],
+ "card": [],
+ "stack": [
+ {
+ "id": "demo",
+ "title": "Demo",
+ "__index": 0,
+ "dateCreated": "Fri, 02 Sep 2016 16:20:27 GMT"
+ }
]
} \ No newline at end of file
diff --git a/examples/index.js b/examples/index.js
index 711246a..f1fabfa 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -10,6 +10,17 @@ var app = okcms.createApp({
debug: !isProduction,
production: isProduction,
+ admin: {
+ dashboard: {
+ resources: {
+ card: {
+ groupBy: 'stack',
+ descending: true
+ }
+ }
+ },
+ },
+
schemas: {
page: {
id: {type: 'string'},
@@ -35,6 +46,15 @@ var app = okcms.createApp({
id: {type: 'string', hidden: true},
title: {type: 'string'},
image: {type: 'image'},
+ },
+ card: {
+ id: {type: 'string', hidden: true},
+ title: {type: 'string'},
+ stack: {type: 'foreign-key', key: 'stack'},
+ },
+ stack: {
+ id: {type: 'string', hidden: true},
+ title: {type: 'string'},
}
},
@@ -44,6 +64,8 @@ var app = okcms.createApp({
{ type: 'bread' },
{ type: 'test' },
{ type: 'flour' },
+ { type: 'card' },
+ { type: 'stack' },
],
services: {