diff options
Diffstat (limited to 'h-source/Application/Controllers')
-rw-r--r-- | h-source/Application/Controllers/HistoryController.php | 52 | ||||
-rw-r--r-- | h-source/Application/Controllers/IssuesController.php | 4 |
2 files changed, 52 insertions, 4 deletions
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php index 8c14bb0..ad2c7dd 100644 --- a/h-source/Application/Controllers/HistoryController.php +++ b/h-source/Application/Controllers/HistoryController.php @@ -34,6 +34,7 @@ class HistoryController extends BaseController 'device' => 'device page', 'device_app' => 'device page', 'device_cl' => 'device page', + 'issue_del' => 'issue', ); public static $actionTable = array( @@ -51,6 +52,8 @@ class HistoryController extends BaseController 'deviceshow' => 'show', 'deviceapprove' => 'approve', 'deviceclear' => 'perm deleted', + 'issuehide' => 'hide', + 'issueshow' => 'show', ); protected $strings = array( @@ -155,6 +158,26 @@ class HistoryController extends BaseController ), + 'issuehide' => array( + + 'action' => 'issuehide', + 'check_status' => 'no', + 'to_status' => 'yes', + 'exec_string' => 'The issue has been hidden. Just reload the page', + 'error_string' => 'Error: the issue is already hidden', + + ), + + 'issueshow' => array( + + 'action' => 'issueshow', + 'check_status' => 'yes', + 'to_status' => 'no', + 'exec_string' => 'The issue is no more hidden. Just reload the page', + 'error_string' => 'Error: the issue is already visible', + + ), + 'devicehide' => array( 'action' => 'devicehide', @@ -212,7 +235,7 @@ class HistoryController extends BaseController 'group' => 'moderator', ), - + 'talk' => array( 'clean_type' => 'talk', @@ -243,6 +266,7 @@ class HistoryController extends BaseController 'field_name' => 'status', 'actions' => array('open','close'), 'group' => 'moderator', + 'types_to_show' => 'issue,issue_del', ), @@ -269,7 +293,7 @@ class HistoryController extends BaseController ), - //page deleted or not + //page hidden or not 'page_del' => array( 'clean_type' => 'page_del', @@ -281,6 +305,18 @@ class HistoryController extends BaseController ), + //issue hidden or not + 'issue_del' => array( + + 'clean_type' => 'issue_del', + 'model_name' => 'IssuesModel', + 'id_name' => 'id_issue', + 'field_name' => 'deleted', + 'actions' => array('issuehide','issueshow'), + 'group' => 'moderator', + + ), + //device page blocked or not 'device' => array( @@ -397,6 +433,16 @@ class HistoryController extends BaseController { $this->generic($lang, $token, 'deviceclear'); } + + public function issuehide($lang = 'en', $token = '') + { + $this->generic($lang, $token, 'issuehide'); + } + + public function issueshow($lang = 'en', $token = '') + { + $this->generic($lang, $token, 'issueshow'); + } protected function generic($lang = 'en', $token = '', $action = 'hide') { @@ -580,6 +626,8 @@ class HistoryController extends BaseController 'deviceshow' => 'restored', 'deviceapprove' => 'approved', 'deviceclear' => 'permanently deleted', + 'issuehide' => 'hidden', + 'issueshow' => 'restored', ); $this->append($data); diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php index 1e0555d..274bc56 100644 --- a/h-source/Application/Controllers/IssuesController.php +++ b/h-source/Application/Controllers/IssuesController.php @@ -171,10 +171,10 @@ class IssuesController extends BaseController $data['form'] = $this->m['MessagesModel']->form->render($values); //retrieve the values from the table - $data['table'] = $this->m['IssuesModel']->select('id_issue,created_by,title,status,creation_date,topic,priority,message,notice')->where(array('id_issue'=>$clean['id_issue'],'deleted'=>'no'))->send(); + $data['table'] = $this->m['IssuesModel']->select()->where(array('id_issue'=>$clean['id_issue']))->send(); // javascript for moderator - $data['md_javascript'] = "moderator_dialog(\"hide\",\"message\");moderator_dialog(\"show\",\"message\");moderator_dialog(\"open\",\"issue\");moderator_dialog(\"close\",\"issue\");"; + $data['md_javascript'] = "moderator_dialog(\"hide\",\"message\");moderator_dialog(\"show\",\"message\");moderator_dialog(\"open\",\"issue\");moderator_dialog(\"close\",\"issue\");moderator_dialog(\"issuehide\",\"issue_del\");moderator_dialog(\"issueshow\",\"issue_del\");"; $data['go_to'] = $this->currPage."/".$this->lang."/".$clean['id_issue']; if (count($data['table']) > 0) |