From 9b25d62a948032809c7058a4a374a72238abd9d3 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 6 Oct 2005 09:36:53 +0000 Subject: [PATCH] Improve usability --- docs/NEWS | 3 +++ include/admin/entries.inc.php | 32 +++++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index b033908..ec09295 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 0.9-beta2 () ------------------------------------------------------------------------ + * Admin entry overview: Show pagination on bottom of the list and + allow filtering for showing drafts/publishs (garvinhicking) + * Fix spartacus plugin to be able to upgrade plugins (garvinhicking) * Fix track exits plugin to redirect to the right URL when no URL-ID diff --git a/include/admin/entries.inc.php b/include/admin/entries.inc.php index 3de9806..a7756fe 100644 --- a/include/admin/entries.inc.php +++ b/include/admin/entries.inc.php @@ -23,7 +23,7 @@ $per_page = array('12', '16', '50', '100'); function serendipity_drawList() { global $serendipity, $sort_order, $per_page; - $filter_import = array('author', 'category'); + $filter_import = array('author', 'category', 'isdraft'); $sort_import = array('perPage', 'ordermode', 'order'); foreach($filter_import AS $f_import) { serendipity_restoreVar($serendipity['COOKIE']['entrylist_filter_' . $f_import], $serendipity['GET']['filter'][$f_import]); @@ -59,6 +59,14 @@ function serendipity_drawList() { $filter[] = "ec.categoryid = '" . serendipity_db_escape_string($serendipity['GET']['filter']['category']) . "'"; } + if (!empty($serendipity['GET']['filter']['isdraft'])) { + if ($serendipity['GET']['filter']['isdraft'] == 'draft') { + $filter[] = "e.isdraft = 'true'"; + } elseif ($serendipity['GET']['filter']['isdraft'] == 'publish') { + $filter[] = "e.isdraft = 'false'"; + } + } + if (!empty($serendipity['GET']['filter']['body'])) { if ($serendipity['dbType'] == 'mysql') { $filter[] = "MATCH (title,body,extended) AGAINST ('" . serendipity_db_escape_string($serendipity['GET']['filter']['body']) . "')"; @@ -92,8 +100,8 @@ function serendipity_drawList() { - - - + + +?> - - + + - - + + - + + +