From 6a19bb006887610da39c49690ca9502049990906 Mon Sep 17 00:00:00 2001 From: BlackCodec Date: Wed, 4 Jun 2014 15:56:49 +0200 Subject: [PATCH] Update draft support. Must do: - script that check for draft and move them to published if date time is ok - implement date time picker in edit post --- system/admin/views/no-posts.html.php | 2 +- system/admin/views/user-posts.html.php | 2 +- system/htmly.php | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/system/admin/views/no-posts.html.php b/system/admin/views/no-posts.html.php index 5d2948a..4b96b6e 100644 --- a/system/admin/views/no-posts.html.php +++ b/system/admin/views/no-posts.html.php @@ -1 +1 @@ -

No posts found!

+

No found!

diff --git a/system/admin/views/user-posts.html.php b/system/admin/views/user-posts.html.php index 73323e0..bcd529d 100644 --- a/system/admin/views/user-posts.html.php +++ b/system/admin/views/user-posts.html.php @@ -34,4 +34,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/system/htmly.php b/system/htmly.php index 4dd7b59..e81670c 100644 --- a/system/htmly.php +++ b/system/htmly.php @@ -399,6 +399,7 @@ get('/admin/posts', function () { render('no-posts',array( 'head_contents' => head_contents('All blog posts - ' . blog_title(), blog_description(), site_url()), 'bodyclass' => 'noposts', + 'draft' => false )); die; @@ -415,7 +416,8 @@ get('/admin/posts', function () { 'posts' => $posts, 'bodyclass' => 'all-posts', 'breadcrumb' => '', - 'pagination' => has_pagination($total, $perpage, $page) + 'pagination' => has_pagination($total, $perpage, $page), + 'draft' => false )); } else { @@ -455,6 +457,7 @@ get('/admin/drafts', function () { render('no-posts',array( 'head_contents' => head_contents('All blog posts - ' . blog_title(), blog_description(), site_url()), 'bodyclass' => 'noposts', + 'draft' => true, )); die; @@ -525,7 +528,8 @@ get('/admin/mine', function(){ 'name' => $bio->title, 'bodyclass' => 'userposts', 'breadcrumb' => '' .config('breadcrumb.home'). ' » Profile for: ' . $bio->title, - 'pagination' => has_pagination($total, $perpage, $page) + 'pagination' => has_pagination($total, $perpage, $page), + 'draft' => false )); die; } @@ -583,7 +587,8 @@ get('/admin/minedrafts', function(){ 'name' => $bio->title, 'bodyclass' => 'userposts', 'breadcrumb' => '' .config('breadcrumb.home'). ' » Profile for: ' . $bio->title, - 'pagination' => has_pagination($total, $perpage, $page) + 'pagination' => has_pagination($total, $perpage, $page), + 'draft' => true )); die; }