diff options
-rw-r--r-- | h-source/Application/Controllers/SearchController.php | 1 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 11 | ||||
-rw-r--r-- | h-source/Application/Views/Search/lspci_results.php | 91 | ||||
-rwxr-xr-x | h-source/Public/Css/website.css | 32 | ||||
-rwxr-xr-x | h-source/Public/Img/Crystal/agt_forward.png | bin | 0 -> 729 bytes | |||
-rw-r--r-- | h-source/Public/Img/search_back.png | bin | 0 -> 3404 bytes |
6 files changed, 88 insertions, 47 deletions
diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php index a65ba62..1b35a09 100644 --- a/h-source/Application/Controllers/SearchController.php +++ b/h-source/Application/Controllers/SearchController.php @@ -221,6 +221,7 @@ class SearchController extends BaseController $data['flag'] = $flag; $data['table'] = array(); + $data['notFoundDevices'] = array(); if ($flag) { diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index f09b809..a315339 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -154,6 +154,7 @@ class Lang "The following devices has been found in the database" => "I seguenti device sono stati trovati nel database", "yes" => "sì", "The following devices has not been found in the database" => "I seguenti device non sono stati trovati nel database", + "can you please insert them?" => "puoi gentilmente inserirli?", ), 'es' => array ( @@ -348,6 +349,16 @@ class Lang } } +class Go +{ + + public static function toHardwareType($type) + { + return "http://".DOMAIN_NAME."/".Hardware::getControllerFromType($type)."/catalogue/".Lang::$current; + } + +} + class MyStrings { diff --git a/h-source/Application/Views/Search/lspci_results.php b/h-source/Application/Views/Search/lspci_results.php index 5d1dfa4..65323cf 100644 --- a/h-source/Application/Views/Search/lspci_results.php +++ b/h-source/Application/Views/Search/lspci_results.php @@ -39,56 +39,61 @@ </div> <?php } ?> - <?php if (count($table)>0) { ?> - <div class="search_item_found"> - <?php echo gtext("The following devices has been found in the database");?>: - </div> - <?php }?> - - <?php foreach ($table as $row) { ?> - <div class="lspci_item_found"> - <div class="lspci_item_found_model"> - <img align="top" class="catalogue_item_icon" src="<?php echo Hardware::getIconFromType($row['hardware']['type']);?>"> <span class="search_result_model_name"><?php echo "<b>".$row['hardware']['type']."</b> - <a href='".$this->baseUrl."/".Hardware::getControllerFromType($row['hardware']['type'])."/view/$lang/".$row['hardware']['id_hard']."/".encodeUrl($row['hardware']['model'])."'>".$row['hardware']['model']."</a>";?></span> + <div class="found_ext"> + <?php if (count($table)>0) { ?> + <div class="search_item_found"> + <?php echo gtext("The following devices has been found in the database");?>: </div> - <div class="lspci_item_found_compat"> - <?php - switch ($row['hardware']['type']) - { - case 'wifi': - echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['wifi_works'])."</b>"; - break; - case 'videocard': - echo gtext("does it work with free software?"). " <b>".gtext(Videocard::$videoReverse[$row['hardware']['video_card_works']])."</b>"; - break; - case 'soundcard': - echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['sound_card_works'])."</b>"; - break; - } - ?> + <?php }?> + + <?php foreach ($table as $row) { ?> + <div class="lspci_item_found"> + <div class="lspci_item_found_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo Hardware::getIconFromType($row['hardware']['type']);?>"> <span class="search_result_model_name"><?php echo "<b>".$row['hardware']['type']."</b> - <a href='".$this->baseUrl."/".Hardware::getControllerFromType($row['hardware']['type'])."/view/$lang/".$row['hardware']['id_hard']."/".encodeUrl($row['hardware']['model'])."'>".$row['hardware']['model']."</a>";?></span> + </div> + <div class="lspci_item_found_compat"> + <?php + switch ($row['hardware']['type']) + { + case 'wifi': + echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['wifi_works'])."</b>"; + break; + case 'videocard': + echo gtext("does it work with free software?"). " <b>".gtext(Videocard::$videoReverse[$row['hardware']['video_card_works']])."</b>"; + break; + case 'soundcard': + echo gtext("does it work with free software?"). " <b>".gtext($row['hardware']['sound_card_works'])."</b>"; + break; + } + ?> + </div> </div> + <?php } ?> </div> - <?php } ?> - <?php if (count($notFoundDevices)>0) { ?> - <div class="search_item_found"> - <?php echo gtext("The following devices has not been found in the database");?>: - </div> - <?php }?> - - <?php foreach ($notFoundDevices as $device) { ?> - <div class="lspci_item_not_found"> - <div class="lspci_item_found_model"> - <img align="top" class="catalogue_item_icon" src="<?php echo Hardware::getIconFromClass($device['classId']);?>"> <span class="search_result_model_name"><?php echo "<b>".Hardware::getTypeFromClass($device['classId'])."</b> - ".$device['deviceName'];?></span> - <div class="lspci_item_found_compat"> - <ul> - <li><b>vendor name:</b><?php echo $device['vendorName'];?></li> - <li><b>vendorid:productid</b> code: <?php echo $device['vendorId'].":".$device['deviceId'];?></li> - </ul> + <div class="found_ext"> + <?php if (count($notFoundDevices)>0) { ?> + <div class="search_item_found"> + <?php echo gtext("The following devices has not been found in the database");?>:<br /> + <?php echo gtext("can you please insert them?");?> + </div> + <?php }?> + + <?php foreach ($notFoundDevices as $device) { ?> + <div class="lspci_item_not_found"> + <div class="lspci_item_found_model"> + <img align="top" class="catalogue_item_icon" src="<?php echo Hardware::getIconFromClass($device['classId']);?>"> <span class="search_result_model_name"><?php echo "<b>".Hardware::getTypeFromClass($device['classId'])."</b> - ".$device['deviceName'];?></span> + <div class="lspci_item_found_compat"> + <ul> + <li><b><?php echo gtext("vendor");?>:</b><?php echo $device['vendorName'];?></li> + <li><b><?php echo gtext("VendorID:ProductID code of the device");?></b>: <?php echo $device['vendorId'].":".$device['deviceId'];?></li> + </ul> + <a href="<?php echo Go::toHardwareType(Hardware::getTypeFromClass($device['classId']));?>"><img align="top" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/agt_forward.png"> insert</a> + </div> </div> </div> + <?php } ?> </div> - <?php } ?> - </div> </div> diff --git a/h-source/Public/Css/website.css b/h-source/Public/Css/website.css index 03043ec..def10fa 100755 --- a/h-source/Public/Css/website.css +++ b/h-source/Public/Css/website.css @@ -1568,9 +1568,12 @@ td.text_item_date .lspci_item_found, .lspci_item_not_found { - margin:10px 5px; - background: #C7DAEF; - padding:8px; + margin:20px 5px; + background: url('../Img/search_back.png') no-repeat top left; +/* background: #C7DAEF; */ + padding:12px 15px; + border-bottom:3px solid #8eb5df; + border-right:1px solid #8eb5df; } .lspci_item_found_compat { @@ -1589,5 +1592,26 @@ td.text_item_date .lspci_item_not_found { - background: orange; + background: #ffe170; + border-bottom:3px solid #e8c224; + border-right:1px solid #e8c224; +} +.lspci_item_found_compat ul li +{ + list-style-type:none; +} +.lspci_item_found_compat ul +{ + margin:10px 20px; + padding:0px; +} +.found_ext +{ + margin-bottom:2em; +} + +.lspci_item_found_compat a +{ + text-decoration:none; + font:normal 16px/1 sans-serif; }
\ No newline at end of file diff --git a/h-source/Public/Img/Crystal/agt_forward.png b/h-source/Public/Img/Crystal/agt_forward.png Binary files differnew file mode 100755 index 0000000..13a59ad --- /dev/null +++ b/h-source/Public/Img/Crystal/agt_forward.png diff --git a/h-source/Public/Img/search_back.png b/h-source/Public/Img/search_back.png Binary files differnew file mode 100644 index 0000000..6fd3b01 --- /dev/null +++ b/h-source/Public/Img/search_back.png |