From 99a6ba9947839d62a3f09f48a0ba962c23794491 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 6 Oct 2011 19:43:29 +0000 Subject: moderators can now hide issues - part 2 --- h-source/Application/Controllers/IssuesController.php | 6 +++--- h-source/Application/Include/languages.php | 8 ++++++++ h-source/Application/Views/Issues/view.php | 14 +++++++------- h-source/Application/Views/Issues/viewall.php | 10 +++++++--- 4 files changed, 25 insertions(+), 13 deletions(-) (limited to 'h-source/Application') diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php index 274bc56..e69c598 100644 --- a/h-source/Application/Controllers/IssuesController.php +++ b/h-source/Application/Controllers/IssuesController.php @@ -98,16 +98,16 @@ class IssuesController extends BaseController //load the Pages helper $this->helper('Pages',$this->controller.'/viewall/'.$this->lang,'page'); //get the number of records - $this->m['IssuesModel']->from('issues left join messages')->using('id_issue')->aWhere(array('deleted'=>'no'))->groupBy('issues.id_issue')->orderBy('issues.update_date desc'); + $this->m['IssuesModel']->from('issues')->left('messages')->using('id_issue')->groupBy('issues.id_issue')->orderBy('issues.update_date desc'); $recordNumber = $this->m['IssuesModel']->rowNumber(); $page = $this->viewArgs['page']; //set the limit clause $this->m['IssuesModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20); - $data['table'] = $this->m['IssuesModel']->getFields('issues.*,messages.message,count(*) as numb_mess'); + $data['table'] = $this->m['IssuesModel']->select('issues.*,messages.message,count(*) as numb_mess')->send(); $data['pageList'] = $this->h['Pages']->render($page-3,7); - + $this->append($data); $this->load('viewall'); $this->right(); diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index de36683..4839e43 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -303,6 +303,14 @@ class Lang /*0255*/"Would you like to add it to the database?" => "Vorresti inserirlo nel database?", /*0256*/"can free operating systems be installed?" => "possono essere installati sistemi operativi liberi?", /*0257*/"This issue has been deleted" => "Questa questione è stata cancellata", + /*0258*/"hidden for those who are not moderators" => "Nascosto per coloro che non sono moderatori", + /*0259*/"This issue is hidden for all the users that are not moderators" => "Questa questione è nascosta per tutti gli utenti non moderatori", + /*0260*/"hide the issue" => "nascondi la questione", + /*0261*/"show the issue" => "mostra la questione", + /*0262*/"open the issue again" => "apri nuovamente la questione", + /*0263*/"close the issue" => "chiudi la questione", + /*0264*/"This issue is closed" => "Questa questione è stata chiusa", + /*0265*/"This issue is opened" => "Questa questione è aperta", ), 'es' => array ( diff --git a/h-source/Application/Views/Issues/view.php b/h-source/Application/Views/Issues/view.php index cbedcde..769717a 100644 --- a/h-source/Application/Views/Issues/view.php +++ b/h-source/Application/Views/Issues/view.php @@ -43,25 +43,25 @@
- This issue is opened + - ">close the issue + "> - This issue is closed + - ">open the issue again + "> - ">hide the issue + "> -
This issue is hidden for all the users that are not moderators
+
- ">show the issue + "> diff --git a/h-source/Application/Views/Issues/viewall.php b/h-source/Application/Views/Issues/viewall.php index 1705670..d5d652f 100644 --- a/h-source/Application/Views/Issues/viewall.php +++ b/h-source/Application/Views/Issues/viewall.php @@ -55,8 +55,10 @@ - - viewStatus;?>"> + + + + viewStatus;?>"> () getUser($row['issues']['created_by']));?> @@ -76,6 +78,8 @@ + +
@@ -86,7 +90,7 @@
-
+
-- cgit v1.2.3