aboutsummaryrefslogtreecommitdiff
path: root/h-source
diff options
context:
space:
mode:
Diffstat (limited to 'h-source')
-rw-r--r--h-source/Application/Controllers/GenericController.php4
-rw-r--r--h-source/Application/Controllers/HistoryController.php2
-rw-r--r--h-source/Application/Include/languages.php3
-rw-r--r--h-source/Application/Include/myFunctions.php22
-rw-r--r--h-source/Application/Views/top_left.php31
-rw-r--r--h-source/Public/Css/main.css5
6 files changed, 61 insertions, 6 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php
index da2f87a..eececc9 100644
--- a/h-source/Application/Controllers/GenericController.php
+++ b/h-source/Application/Controllers/GenericController.php
@@ -503,12 +503,12 @@ class GenericController extends BaseController
session_start();
if ( isset($_SESSION['notebook_inserted']) and strcmp($this->controller,'notebooks') === 0 )
{
- $viewFilesList = 'suggest_dialog,dialog,page,if_page_deleted';
+ $viewFilesList = 'suggest_dialog,dialog,page,if_page_deleted,moderator_dialog';
unset($_SESSION['notebook_inserted']);
}
else
{
- $viewFilesList = 'dialog,page,if_page_deleted';
+ $viewFilesList = 'dialog,page,if_page_deleted,moderator_dialog';
}
$this->loadViewAll($viewFilesList);
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php
index 71055fc..ead0886 100644
--- a/h-source/Application/Controllers/HistoryController.php
+++ b/h-source/Application/Controllers/HistoryController.php
@@ -261,7 +261,7 @@ class HistoryController extends BaseController
'id_name' => 'id_hard',
'field_name' => '-deleted',
'actions' => array('devicehide','deviceshow'),
- 'group' => 'moderator',
+ 'group' => 'admin',
),
);
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
index b66e5e8..45e6a74 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -228,6 +228,9 @@ class Lang
/*0190*/"possible other names of the device" => "eventuali altri nomi del dispositivo",
/*0191*/"Description entry preview" => "Anteprima del campo descrizione",
/*0192*/"Page preview" => "Anteprima della pagina",
+ /*0193*/"This device page has been hidden" => "La pagina di questo dispositivo รจ stata nascosta",
+ /*0194*/"restore the device page" => "ripristina la pagina",
+ /*0195*/"hide the device page" => "nascondi la pagina",
),
'es' => array
(
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php
index 4bff411..174c7ea 100644
--- a/h-source/Application/Include/myFunctions.php
+++ b/h-source/Application/Include/myFunctions.php
@@ -4622,6 +4622,24 @@ function getHardwareInfoFromTalkId($id = 0)
return count($res) > 0 ? $res[0]['hardware'] : null;
}
+//get hardware info from id
+function getHardwareInfoFromId($id = 0)
+{
+ $clean['id'] = (int)$id;
+ $hw = new HardwareModel();
+ $res = $hw->select()->where(array('id_hard'=>$clean['id']))->send();
+ $controller = 'home/index/en';
+ $model = '';
+ if (count($res) > 0)
+ {
+ $controller = Hardware::getControllerFromType($res[0]['hardware']['type']);
+ $controller = strcmp($controller,'') !== 0 ? $controller : 'home/index/en';
+ $model = $res[0]['hardware']['model'];
+ }
+
+ return array('controller'=>$controller,'model'=>$model);
+}
+
//get the wiki page info from the talk id
function getWikiPageInfoFromTalkId($id = 0)
{
@@ -4686,6 +4704,10 @@ function goToModeratedItem( $row = array() )
case 'page_del':
$url = 'wiki/page/'.Lang::$current.'/'.encodeUrl(getWikiNameFromId($row['id']));
break;
+ case 'device':
+ $hardInfo = getHardwareInfoFromId($row['id']);
+ $url = $hardInfo['controller'].'/view/'.Lang::$current.'/'.$row['id'].'/'.encodeUrl($hardInfo['model']);
+ break;
}
return 'http://'.DOMAIN_NAME.'/'.$url;
}
diff --git a/h-source/Application/Views/top_left.php b/h-source/Application/Views/top_left.php
index 07f3ad3..e547f08 100644
--- a/h-source/Application/Views/top_left.php
+++ b/h-source/Application/Views/top_left.php
@@ -27,7 +27,33 @@
</div>
<?php if (strcmp($this->action,'view') === 0) { ?>
-
+
+ <!--delete the page-->
+ <?php if ($isadmin) { ?>
+ <div class="moderator_box_deleted clear_right">
+ <?php if ($isDeleted) { ?>
+ <?php echo gtext('This device page has been hidden'); ?>
+
+ <a id="<?php echo $id_hard;?>" class="deviceshow_device 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('restore the device page'); ?></a>
+
+ <?php } else { ?>
+
+ <a id="<?php echo $id_hard;?>" class="devicehide_device 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 device page'); ?></a>
+
+ <?php } ?>
+
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">device</div>
+ <a id="<?php echo $id_hard;?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+ <div class="details_of_hidden_message">
+ <div class="moderation_details_box"></div>
+ </div>
+ </div>
+
+ </div>
+ <?php } ?>
+
<div class="notebook_view_title">
Specifications of the <?php echo singular($this->controller);?> <b><?php echo $ne_name;?></b>
</div>
@@ -54,12 +80,11 @@
</div>
<?php } ?>
</div>
-
+
<div class="talk_numb_ext">
<a href="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>">talk messages: <?php echo $talk_number;?></a>
</div>
-
<?php } else if (strcmp($this->action,'catalogue') === 0) { ?>
diff --git a/h-source/Public/Css/main.css b/h-source/Public/Css/main.css
index 67e95f0..3ba2222 100644
--- a/h-source/Public/Css/main.css
+++ b/h-source/Public/Css/main.css
@@ -1758,6 +1758,11 @@ span.entry_label_small
font-size:12px;
}
+.clear_right
+{
+ clear:right;
+}
+
/*
Start - temporarily added due to transformation of help pages
2011-05-29 joeko