From 5b7e5a133e5326a98b974b7e9e390ac393d1a05e Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Mon, 13 Apr 2015 13:42:11 -0400 Subject: Client friendly error handling --- themes/okadmin/templates/404.liquid | 54 +++++++++++++++++++++++++++++++++++++ themes/okadmin/templates/5xx.liquid | 54 +++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 themes/okadmin/templates/404.liquid create mode 100644 themes/okadmin/templates/5xx.liquid (limited to 'themes') diff --git a/themes/okadmin/templates/404.liquid b/themes/okadmin/templates/404.liquid new file mode 100644 index 0000000..87f5342 --- /dev/null +++ b/themes/okadmin/templates/404.liquid @@ -0,0 +1,54 @@ + + + + 404 + + + +
+

¯\_(ツ)_/¯

+

We couldn't find that page.

+

Sure you have the right URL?

+ Back +
+ + diff --git a/themes/okadmin/templates/5xx.liquid b/themes/okadmin/templates/5xx.liquid new file mode 100644 index 0000000..f245545 --- /dev/null +++ b/themes/okadmin/templates/5xx.liquid @@ -0,0 +1,54 @@ + + + + 404 + + + +
+

(;一_一)

+

Looks like we experienced an error.

+

Sorry about that. Maybe try again later.

+ Back +
+ + -- cgit v1.2.3-70-g09d2 From ebb17679c64723dc1378079f9da0697673b21f5d Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Mon, 13 Apr 2015 13:51:02 -0400 Subject: Namespace special admin endpoints --- app/node_modules/okadminview/index.js | 4 ++-- themes/okadmin/templates/index.liquid | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'themes') diff --git a/app/node_modules/okadminview/index.js b/app/node_modules/okadminview/index.js index 648487c..161a195 100644 --- a/app/node_modules/okadminview/index.js +++ b/app/node_modules/okadminview/index.js @@ -129,7 +129,7 @@ function OKAdminView(options) { }).fail(error(req, res, 500)); }); - router.get('/:type/new/', function createResourceView(req, res, next) { + router.get('/:type/__new__/', function createResourceView(req, res, next) { var type = req.params.type || ''; var resource = resourceCache.get(type); if (!resource) { @@ -194,7 +194,7 @@ function OKAdminView(options) { } }); - router.put('/:type/__batch/', function putBatch(req, res, next) { + router.put('/:type/__batch__/', function putBatch(req, res, next) { var type = req.params.type; var body = req.body || {}; var resourcesJSON = body[type]; diff --git a/themes/okadmin/templates/index.liquid b/themes/okadmin/templates/index.liquid index 10903b9..330ed89 100644 --- a/themes/okadmin/templates/index.liquid +++ b/themes/okadmin/templates/index.liquid @@ -8,7 +8,7 @@ {% assign resource = pair[1] %}
-
+

{{name | capitalize}}

@@ -27,7 +27,7 @@ sort - + + +
-- cgit v1.2.3-70-g09d2