From 265e0708d6eea9de98b36035fff1287a01221a00 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 17 Feb 2011 18:51:57 +0000 Subject: admin users can now delete and block wiki pages --- .../Application/Controllers/WikiController.php | 30 ++++++ h-source/Application/Include/languages.php | 3 + h-source/Application/Views/Wiki/page.php | 103 +++++++++++---------- h-source/Application/Views/Wiki/pages.php | 4 +- h-source/Application/Views/right.php | 1 + h-source/Config/Route.php | 1 + h-source/Public/Css/main.css | 9 +- 7 files changed, 98 insertions(+), 53 deletions(-) (limited to 'h-source') diff --git a/h-source/Application/Controllers/WikiController.php b/h-source/Application/Controllers/WikiController.php index b282d24..8e26454 100644 --- a/h-source/Application/Controllers/WikiController.php +++ b/h-source/Application/Controllers/WikiController.php @@ -487,6 +487,7 @@ class WikiController extends BaseController public function pages($lang = 'en') { + $data['topString'] = 'list of pages'; $data['title'] = gtext('list of pages').' - '.Website::$generalName; $this->setArgKeys(array('page:forceNat'=>1)); @@ -511,6 +512,35 @@ class WikiController extends BaseController $this->right(); } + public function deleted($lang = 'en') + { + $this->s['registered']->check('admin'); + + $data['topString'] = 'list of deleted pages'; + $data['title'] = gtext('list of deleted pages').' - '.Website::$generalName; + + $this->setArgKeys(array('page:forceNat'=>1)); + + $this->shift(1); + + $this->helper('Pages','wiki/deleted/'.$this->lang,'page'); + + $this->m['WikiModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_wiki desc'); + + $recordNumber = $this->m['WikiModel']->rowNumber(); + $page = $this->viewArgs['page']; + + $this->m['WikiModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30); + + $data['table'] = $this->m['WikiModel']->send(); + + $data['pageList'] = $this->h['Pages']->render($page-7,15); + + $this->append($data); + $this->load('pages'); + $this->right(); + } + //print all the modifications to the wiki public function modifications($lang = 'en') { diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 9922e87..5145029 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -207,6 +207,9 @@ class Lang "block the wiki page" => "blocca la pagina", "show the wiki page" => "mostra la pagina della wiki", "hide the wiki page" => "nascondi la pagina della wiki", + "list of deleted pages" => "lista delle pagine cancellate", + "restore the wiki page" => "ripristina la pagina", + "delete the wiki page" => "cancella la pagina", ), 'es' => array ( diff --git a/h-source/Application/Views/Wiki/page.php b/h-source/Application/Views/Wiki/page.php index e59d85c..da5b9d5 100644 --- a/h-source/Application/Views/Wiki/page.php +++ b/h-source/Application/Views/Wiki/page.php @@ -30,54 +30,6 @@ ">Home » ">Wiki » - - -
- - - - "> - - - - "> - - - - -
-
page
- ">view details -
-
- -
- - - - -
- - - - "> - - - - "> - - - - -
-
page_del
- ">view details -
-
- -
- -