diff options
Diffstat (limited to 'h-source/Application')
-rw-r--r-- | h-source/Application/Controllers/NotebooksController.php | 16 | ||||
-rw-r--r-- | h-source/Application/Include/hardware.php | 21 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 3 | ||||
-rw-r--r-- | h-source/Application/Models/NotebooksModel.php | 3 | ||||
-rw-r--r-- | h-source/Application/Views/Hardware/left.php | 2 | ||||
-rw-r--r-- | h-source/Application/Views/Notebooks/form.php | 15 | ||||
-rw-r--r-- | h-source/Application/Views/Notebooks/page.php | 12 |
7 files changed, 65 insertions, 7 deletions
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 <i>videocard</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", - "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> 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 <i>videocard</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the <i>webcam</i> 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 <i>videocard</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", - "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> 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 <i>videocard</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", + "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the <i>webcam</i> 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 @@ </div> <div class="hardware_element"> - <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/printer.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/printers/catalogue/<?php echo $lang;?>">Printers</a> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/printer.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/printers/catalogue/<?php echo $lang;?>">Printers and multifunction</a> </div> <div class="hardware_element"> 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 @@ -56,6 +56,11 @@ </div> <div class="form_entry"> + <div class="entry_label"><?php echo gtext("does it have a free bios?");?></div> + <?php echo Html_Form::select('bios',$values['bios'],Notebooks::$biosSelect,"select_entry");?> + </div> + + <div class="form_entry"> <div class="entry_label"><?php echo gtext("year of commercialization");?>:</div> <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?> </div> @@ -99,6 +104,16 @@ </div> <div class="form_entry"> + <div class="entry_label"><?php echo gtext("webcam model");?>:</div> + <?php echo Html_Form::input('webcam_type',$values['webcam_type'],'input_entry');?> + </div> + + <div class="form_entry"> + <div class="entry_label"><?php echo gtext("does the webcam work?");?></div> + <?php echo Html_Form::select('webcam_works',$values['webcam_works'],Notebooks::$webcamSelect,"select_entry");?> + </div> + + <div class="form_entry"> <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div> <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?> </div> 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,11 +49,16 @@ </div> <div class="notebook_vendor"> - <div class="inner_label"><?php echo gtext("subtype (notebook or netbook)");?></div> + <div class="inner_label"><?php echo gtext("subtype (notebook or netbook)");?>:</div> <div class="inner_value"><b><?php echo $item[$tableName]['subtype'];?></b></div> </div> <div class="notebook_vendor"> + <div class="inner_label"><?php echo gtext("does it have a free bios?");?></div> + <div class="inner_value"><b><?php echo $item[$tableName]['bios'];?></b></div> + </div> + + <div class="notebook_vendor"> <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div> <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div> </div> @@ -83,6 +88,11 @@ <div class="inner_value"><b><?php echo $item[$tableName]['wifi_type'];?></b> (<?php echo Notebooks::$wifiReverse[$item[$tableName]['wifi_works']];?>)</div> </div> + <div class="notebook_kernel"> + <div class="inner_label"><?php echo gtext("webcam model");?>:</div> + <div class="inner_value"><b><?php echo $item[$tableName]['webcam_type'];?></b> (<?php echo Notebooks::$webcamReverse[$item[$tableName]['webcam_works']];?>)</div> + </div> + <div class="notebook_description"> <div class="notebook_description_label"><?php echo gtext("Description");?>:</div> <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div> |