diff options
Diffstat (limited to 'h-source/Application')
-rw-r--r-- | h-source/Application/Controllers/IssuesController.php | 6 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 8 | ||||
-rw-r--r-- | h-source/Application/Views/Issues/view.php | 14 | ||||
-rw-r--r-- | h-source/Application/Views/Issues/viewall.php | 10 |
4 files changed, 25 insertions, 13 deletions
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 @@ <!--open/close an issue--> <div class="moderator_box"> <?php if (strcmp($row['issues']['status'],'opened') == 0) { ?> - This issue is opened + <?php echo gtext("This issue is opened");?> - <a id="<?php echo $row['issues']['id_issue'];;?>" class="close_issue block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/folder_blue.png">close the issue</a> + <a id="<?php echo $row['issues']['id_issue'];;?>" class="close_issue block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/folder_blue.png"><?php echo gtext("close the issue");?></a> <?php } else { ?> - This issue is closed + <?php echo gtext("This issue is closed");?> - <a id="<?php echo $row['issues']['id_issue'];;?>" class="open_issue block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/folder_blue_open.png">open the issue again</a> + <a id="<?php echo $row['issues']['id_issue'];;?>" class="open_issue block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/folder_blue_open.png"><?php echo gtext("open the issue again");?></a> <?php } ?> <?php if (strcmp($row['issues']['deleted'],'no') == 0) { ?> - <a id="<?php echo $row['issues']['id_issue'];;?>" class="issuehide_issue_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png">hide the issue</a> + <a id="<?php echo $row['issues']['id_issue'];;?>" class="issuehide_issue_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png"><?php echo gtext("hide the issue");?></a> <?php } else { ?> - <div class="issue_hidden_notice">This issue is hidden for all the users that are not moderators</div> + <div class="issue_hidden_notice"><?php echo gtext("This issue is hidden for all the users that are not moderators");?></div> - <a id="<?php echo $row['issues']['id_issue'];;?>" class="issueshow_issue_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">show the issue</a> + <a id="<?php echo $row['issues']['id_issue'];;?>" class="issueshow_issue_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png"><?php echo gtext("show the issue");?></a> <?php } ?> 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 @@ </thead> <?php foreach ($table as $row) { ?> - <tr> - <td><a href="<?php echo $this->baseUrl."/issues/view/$lang/".$row['issues']['id_issue'].$this->viewStatus;?>"><?php echo $row['issues']['title'];?></a></td> + + <?php if (strcmp($row['issues']['deleted'],'no') === 0 or $ismoderator) { ?> + <tr class="issue_deleted_<?php echo $row['issues']['deleted']?>"> + <td><a href="<?php echo $this->baseUrl."/issues/view/$lang/".$row['issues']['id_issue'].$this->viewStatus;?>"><?php echo $row['issues']['title'];?></a> <span>(<?php echo gtext("hidden for those who are not moderators");?>)</span></td> <td><?php echo str_replace('-',' ',$row['issues']['topic']);?></td> <td><?php echo getLinkToUser($u->getUser($row['issues']['created_by']));?></td> <td><?php echo smartDate($row['issues']['update_date']);?></td> @@ -76,6 +78,8 @@ <td><?php echo $row['issues']['status'];?></td> </tr> <?php } ?> + + <?php } ?> </table> </div> @@ -86,7 +90,7 @@ <?php if ($islogged === 'yes') { ?> <div class="add_issue_form"> - <div class="add_issue_form_title"> + <div class="add_issue_form_title"> <a name="form"><?php echo gtext("Add a new issue");?></a> </div> |