diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-06-13 15:25:33 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-06-13 15:25:33 +0000 |
commit | dcbc21e9680c54adc831b71cd1d22d3e680e03b0 (patch) | |
tree | 3680129b872dbd509c4cdb1c05cb6d92e40c011e | |
parent | 527b6fd83ec10f172a8595ab8eea72489cbe0833 (diff) |
administrators can now see the list of hidden pages
-rw-r--r-- | h-source/Application/Controllers/SpecialController.php | 29 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 3 | ||||
-rw-r--r-- | h-source/Application/Views/My/panel.php | 1 | ||||
-rw-r--r-- | h-source/Application/Views/Special/modactions.php | 2 | ||||
-rw-r--r-- | h-source/Application/Views/Special/pages_deleted.php | 45 | ||||
-rw-r--r-- | h-source/Config/Route.php | 1 | ||||
-rw-r--r-- | h-source/Public/Css/main.css | 4 |
7 files changed, 81 insertions, 4 deletions
diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 86ac9b9..1f13b69 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -28,7 +28,8 @@ class SpecialController extends BaseController parent::__construct($model, $controller, $queryString); $this->model('HistoryModel'); - + $this->model('HardwareModel'); + $data['title'] = gtext('last modifications').' - '.Website::$generalName; $this->append($data); @@ -76,7 +77,7 @@ class SpecialController extends BaseController break; } - $this->helper('Pages','last/'.$this->action.'/'.$this->lang,'page'); + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); $this->m['HistoryModel']->clear()->select()->where($whereClauseArray)->orderBy('id_history desc'); @@ -119,4 +120,28 @@ class SpecialController extends BaseController $this->last($lang = 'en','adminactions'); } + public function deleted($lang = 'en') + { + $this->shift(1); + + $this->s['registered']->check('admin'); + + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); + + $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_hard desc'); + + $recordNumber = $this->m['HardwareModel']->rowNumber(); + $page = $this->viewArgs['page']; + + $this->m['HardwareModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30); + + $data['table'] = $this->m['HardwareModel']->send(); + + $data['pageList'] = $this->h['Pages']->render($page-5,11); + + $this->append($data); + $this->load('pages_deleted'); + $this->right(); + } + }
\ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 43d0a05..798a0aa 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -235,6 +235,9 @@ class Lang /*0197*/"Special pages for administrators" => "Pagine speciali per gli amministratori", /*0198*/"Special pages for moderators" => "Pagine speciali per i moderatori", /*0199*/"see the page" => "guarda la pagina", + /*0200*/"hidden device pages" => "pagine nascoste di dispositivi", + /*0201*/"panel" => "pannello", + /*0202*/"List of hidden device pages" => "Lista di pagine nascoste di dispositivi" ), 'es' => array ( diff --git a/h-source/Application/Views/My/panel.php b/h-source/Application/Views/My/panel.php index fd70a98..9c6424a 100644 --- a/h-source/Application/Views/My/panel.php +++ b/h-source/Application/Views/My/panel.php @@ -37,6 +37,7 @@ <div class="admin_box_title"><?php echo gtext("Special pages for administrators");?></div> <ul> <li><a href="<?php echo Url::getRoot('special/adminactions/'.$lang);?>"><?php echo gtext("Actions carried out by administrators");?></a></li> + <li><a href="<?php echo Url::getRoot('special/deleted/'.$lang);?>"><?php echo gtext("List of hidden device pages");?></a></li> </ul> </div> <?php } ?> diff --git a/h-source/Application/Views/Special/modactions.php b/h-source/Application/Views/Special/modactions.php index fe50223..d3d535f 100644 --- a/h-source/Application/Views/Special/modactions.php +++ b/h-source/Application/Views/Special/modactions.php @@ -23,7 +23,7 @@ <div id="left"> <div class="position_tree_box"> - <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> » moderators' actions + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>"><?php echo gtext('panel');?></a> » moderators' actions </div> <div class="contrib_explain_box"> diff --git a/h-source/Application/Views/Special/pages_deleted.php b/h-source/Application/Views/Special/pages_deleted.php new file mode 100644 index 0000000..d960d26 --- /dev/null +++ b/h-source/Application/Views/Special/pages_deleted.php @@ -0,0 +1,45 @@ +<?php if (!defined('EG')) die('Direct access not allowed!'); ?> + +<?php +// h-source, a web software to build a community of people that want to share their hardware information. +// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt) +// +// This file is part of h-source +// +// h-source is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// h-source is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with h-source. If not, see <http://www.gnu.org/licenses/>. +?> + + <div id="left"> + + <div class="position_tree_box"> + <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> » <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>"><?php echo gtext('panel');?></a> » <?php echo gtext('hidden device pages');?> + </div> + + <div class="contrib_explain_box"> + <?php echo gtext('hidden device pages');?> + </div> + + <div class="notebooks_viewall"> + <ul class="page_history"> + <?php foreach ($table as $row) { ?> + <li class="page_history_item"><a href="<?php echo $this->baseUrl."/".Hardware::getControllerFromType($row['hardware']['type'])."/view/$lang/".$row['hardware']['id_hard']."/".encodeUrl($row['hardware']['model']);?>"><?php echo $row['hardware']['model'];?></a></li> + <?php } ?> + </ul> + </div> + + <div class="history_page_list"> + <?php echo gtext("page list");?>: <?php echo $pageList;?> + </div> + + </div> diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index 858af0a..27070b3 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -161,6 +161,7 @@ class Route 'special,modifications', 'special,modactions', 'special,adminactions', + 'special,deleted', 'wiki,insert', 'wiki,update', 'wiki,page', diff --git a/h-source/Public/Css/main.css b/h-source/Public/Css/main.css index a0217cd..6e0b548 100644 --- a/h-source/Public/Css/main.css +++ b/h-source/Public/Css/main.css @@ -1786,10 +1786,12 @@ span.entry_label_small { margin:0px; padding:0px; + margin-left:15px; } #admin_box ul li, #moderator_box ul li { - list-style-type:none; +/* list-style-type:none; */ + padding:5px 0px; } #admin_box ul li a, #moderator_box ul li a { |