From 704241a3a4f3480eb87260aef9fca8f1ce00e638 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 10 Feb 2016 18:41:28 -0800 Subject: [PATCH] add dashboard with links to all post types --- controllers/controllers.php | 10 ++++++++++ views/dashboard.php | 15 +++++++++++++++ views/partials/header.php | 6 +++--- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 views/dashboard.php diff --git a/controllers/controllers.php b/controllers/controllers.php index 0b63699..ef619a6 100644 --- a/controllers/controllers.php +++ b/controllers/controllers.php @@ -41,6 +41,16 @@ function generate_login_token() { ), Config::$jwtSecret); } +$app->get('/dashboard', function() use($app) { + if($user=require_login($app)) { + $html = render('dashboard', array( + 'title' => 'Dashboard', + 'authorizing' => false + )); + $app->response()->body($html); + } +}); + $app->get('/new', function() use($app) { if($user=require_login($app)) { $params = $app->request()->params(); diff --git a/views/dashboard.php b/views/dashboard.php new file mode 100644 index 0000000..3c29f92 --- /dev/null +++ b/views/dashboard.php @@ -0,0 +1,15 @@ +
+ + + + +
diff --git a/views/partials/header.php b/views/partials/header.php index ef9f15a..4243557 100644 --- a/views/partials/header.php +++ b/views/partials/header.php @@ -1,4 +1,4 @@
- - Quill -
\ No newline at end of file + + Quill +