From 822005d36ad721c2203a5bff990210fa33afee34 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 3 Feb 2011 13:22:46 +0000 Subject: improved search page --- .../Application/Controllers/SearchController.php | 1 + h-source/Application/Include/languages.php | 11 +++ .../Application/Views/Search/lspci_results.php | 91 ++++++++++++---------- 3 files changed, 60 insertions(+), 43 deletions(-) (limited to 'h-source/Application') 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 @@ - 0) { ?> -
- : -
- - - -
-
- ".$row['hardware']['type']." - ".$row['hardware']['model']."";?> +
+ 0) { ?> +
+ :
-
- ".gtext($row['hardware']['wifi_works']).""; - break; - case 'videocard': - echo gtext("does it work with free software?"). " ".gtext(Videocard::$videoReverse[$row['hardware']['video_card_works']]).""; - break; - case 'soundcard': - echo gtext("does it work with free software?"). " ".gtext($row['hardware']['sound_card_works']).""; - break; - } - ?> + + + +
+
+ ".$row['hardware']['type']." - ".$row['hardware']['model']."";?> +
+
+ ".gtext($row['hardware']['wifi_works']).""; + break; + case 'videocard': + echo gtext("does it work with free software?"). " ".gtext(Videocard::$videoReverse[$row['hardware']['video_card_works']]).""; + break; + case 'soundcard': + echo gtext("does it work with free software?"). " ".gtext($row['hardware']['sound_card_works']).""; + break; + } + ?> +
+
- - 0) { ?> -
- : -
- - - -
-
- ".Hardware::getTypeFromClass($device['classId'])." - ".$device['deviceName'];?> -
-
    -
  • vendor name:
  • -
  • vendorid:productid code:
  • -
+
+ 0) { ?> +
+ :
+ +
+ + + +
+
+ ".Hardware::getTypeFromClass($device['classId'])." - ".$device['deviceName'];?> +
+
    +
  • :
  • +
  • :
  • +
+ insert +
+
- -
-- cgit v1.2.3