From 14094a0f9082e1eaf22d1864a52e21c69c965f3d Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Sep 2016 12:40:37 -0400 Subject: show sort/+ buttons on groupby elements if resource is empty --- examples/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'examples/index.js') 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: { -- cgit v1.2.3-70-g09d2