From 82d1fce1124a497dc1b78cf88dbc29e2eb1f6ae5 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 10 Jul 2011 20:27:11 +0000 Subject: administrators can now see the list of pages that have to be approved --- .../Application/Controllers/SpecialController.php | 38 ++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'h-source/Application/Controllers/SpecialController.php') diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 1f13b69..6f17c2c 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -120,15 +120,23 @@ class SpecialController extends BaseController $this->last($lang = 'en','adminactions'); } - public function deleted($lang = 'en') + protected function pagelist($lang = 'en', $type) { - $this->shift(1); - - $this->s['registered']->check('admin'); - + switch($type) + { + case 'deleted': + $whereArray = array('-deleted'=>'yes','approved'=>'yes'); + $data['titleString'] = 'hidden device pages'; + break; + case 'notapproved': + $whereArray = array('approved'=>'no'); + $data['titleString'] = 'Device pages that have to be approved'; + break; + } + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); - $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_hard desc'); + $this->m['HardwareModel']->clear()->select()->where($whereArray)->orderBy('id_hard desc'); $recordNumber = $this->m['HardwareModel']->rowNumber(); $page = $this->viewArgs['page']; @@ -144,4 +152,22 @@ class SpecialController extends BaseController $this->right(); } + public function deleted($lang = 'en') + { + $this->shift(1); + + $this->s['registered']->check('admin'); + + $this->pagelist($lang,'deleted'); + } + + public function notapproved($lang = 'en') + { + $this->shift(1); + + $this->s['registered']->check('admin'); + + $this->pagelist($lang,'notapproved'); + } + } \ No newline at end of file -- cgit v1.2.3