From 4477a95a94fad105139927ecb7890dc508ef2f05 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 2 Nov 2010 21:40:43 +0000 Subject: added bios and webcam entries in the notebook category --- .../Application/Controllers/NotebooksController.php | 16 +++++++++++----- h-source/Application/Include/hardware.php | 21 +++++++++++++++++++++ h-source/Application/Include/languages.php | 3 +++ h-source/Application/Models/NotebooksModel.php | 3 +++ h-source/Application/Views/Hardware/left.php | 2 +- h-source/Application/Views/Notebooks/form.php | 15 +++++++++++++++ h-source/Application/Views/Notebooks/page.php | 12 +++++++++++- 7 files changed, 65 insertions(+), 7 deletions(-) (limited to 'h-source/Application') diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php index dcdab76..c663620 100644 --- a/h-source/Application/Controllers/NotebooksController.php +++ b/h-source/Application/Controllers/NotebooksController.php @@ -53,6 +53,8 @@ class NotebooksController extends GenericController "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype", "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works", "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", + "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", + "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", ); $this->m['HardwareModel']->strongConditions['insert'] = array( @@ -66,6 +68,8 @@ class NotebooksController extends GenericController "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype", "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works", "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", + "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", + "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", ); $this->m['HardwareModel']->softConditions['update'] = array( @@ -73,8 +77,9 @@ class NotebooksController extends GenericController "checkLength|20000" => "description", "++checkLength|99" => "video_card_type,wifi_type", "+++checkLength|49" => "kernel", - "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the videocard entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", - "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the wifi entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the videocard entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the wifi entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the webcam entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", ); $this->m['HardwareModel']->softConditions['insert'] = array( @@ -82,11 +87,12 @@ class NotebooksController extends GenericController "checkLength|20000" => "description", "++checkLength|99" => "video_card_type,wifi_type", "+++checkLength|49" => "kernel", - "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the videocard entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", - "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the wifi entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", + "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the videocard entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the wifi entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the webcam entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", ); - $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype','sanitizeAll'); + $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype,bios,webcam_type,webcam_works','sanitizeAll'); $argKeys = array( 'page:forceNat' => 1, diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 291f639..f363d72 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -193,6 +193,8 @@ class Notebooks extends Hardware public static $subtypeSelect = 'notebook,netbook,not-specified'; + public static $biosSelect = 'not-specified,no,yes'; + public static $videoSelect = array( "not specified" => 'not-specified', "yes, with 3D acceleration" => "yes_with_3D", @@ -223,6 +225,20 @@ class Notebooks extends Hardware "" => "" ); + public static $webcamSelect = array( + 'not specified' => 'not-specified', + 'it works' => 'yes', + 'it does not work' => 'no', + 'there is no webcam' => 'there-is-no-webcam', + ); + + public static $webcamReverse = array( + "yes" => "it works", + "no" => "it does not work", + 'not-specified' => "not specified how it works", + 'there-is-no-webcam' => 'there is no webcam', + ); + public static function videoList() { return implode(',',array_values(self::$videoSelect)); @@ -233,6 +249,11 @@ class Notebooks extends Hardware return implode(',',array_values(self::$wifiSelect)); } + public static function webcamList() + { + return implode(',',array_values(self::$webcamSelect)); + } + public static function vendorsList() { return implode(',',array_values(self::$vendors)); diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 69871fb..69dcdd4 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -98,6 +98,9 @@ class Lang "differences in the entry" => "differenze nel campo", "No 3G cards found" => "Non รจ stata trovata alcuna scheda 3G", "Please specify in the below description entry the Internet Service Provider (ISP) and the country where the service is provided" => "Per favore specifica nel sottostante campo descrizione l'Internet Service Provider (ISP) e il Paese dove il servizio viene fornito", + "webcam model" => "modello di webcam", + "does it have a free bios?" => "ha il bios libero?", + "does the webcam work?" => "funziona la webcam?", ), 'es' => array ( diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php index 30d1a57..a8fcdf2 100644 --- a/h-source/Application/Models/NotebooksModel.php +++ b/h-source/Application/Models/NotebooksModel.php @@ -52,6 +52,7 @@ class NotebooksModel extends BaseModel { 'vendor' => gtext("vendor"), 'model' => gtext('model name'), 'subtype' => gtext('subtype (notebook or netbook)'), + 'bios' => gtext('does it have a free bios?'), 'comm_year' => gtext('year of commercialization'), 'distribution' => gtext('GNU/Linux distribution used for the test'), 'compatibility' => gtext('compatibility with free software'), @@ -60,6 +61,8 @@ class NotebooksModel extends BaseModel { 'video_card_works' => gtext('does the video card work?'), 'wifi_type' => gtext('wifi model'), 'wifi_works' => gtext('does the wifi card work?'), + 'webcam_type' => gtext('webcam model'), + 'webcam_works' => gtext('does the webcam work?'), 'description' => gtext('Description'), ); diff --git a/h-source/Application/Views/Hardware/left.php b/h-source/Application/Views/Hardware/left.php index ac808a4..020719c 100644 --- a/h-source/Application/Views/Hardware/left.php +++ b/h-source/Application/Views/Hardware/left.php @@ -39,7 +39,7 @@
- Printers + Printers and multifunction
diff --git a/h-source/Application/Views/Notebooks/form.php b/h-source/Application/Views/Notebooks/form.php index f93eda3..698620e 100644 --- a/h-source/Application/Views/Notebooks/form.php +++ b/h-source/Application/Views/Notebooks/form.php @@ -55,6 +55,11 @@
+
+ + +
+
@@ -98,6 +103,16 @@
+
+ + +
+ +
+ + +
+
diff --git a/h-source/Application/Views/Notebooks/page.php b/h-source/Application/Views/Notebooks/page.php index 1c00992..3094e78 100644 --- a/h-source/Application/Views/Notebooks/page.php +++ b/h-source/Application/Views/Notebooks/page.php @@ -49,10 +49,15 @@
-
+
:
+
+
+
+
+
:
@@ -83,6 +88,11 @@
()
+
+
:
+
()
+
+
:
-- cgit v1.2.3