From 2f0587286b4e433b96a7db5db60a0dd94617f485 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 3 Oct 2011 08:18:08 +0000 Subject: added the field can free systems be installed to notebooks category - Michał Masłowski suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Application/Controllers/DownloadController.php | 1 + .../Controllers/NotebooksController.php | 29 +++------------------- h-source/Application/Include/hardware.php | 2 ++ h-source/Application/Include/languages.php | 3 ++- h-source/Application/Models/NotebooksModel.php | 1 + h-source/Application/Views/Notebooks/form.php | 7 +++++- h-source/Application/Views/Notebooks/page.php | 9 +++++-- h-source/Application/Views/page.php | 2 +- h-source/tables.sql | 2 ++ 9 files changed, 26 insertions(+), 30 deletions(-) diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index d58ba6c..1e4f94e 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -71,6 +71,7 @@ class DownloadController extends BaseController { $xml .= "\t\t".translate($row['hardware']['architecture'])."\n"; $xml .= "\t\t".$row['hardware']['bios']."\n"; + $xml .= "\t\t".$row['hardware']['can_free_systems_be_installed']."\n"; } $xml .= "\t\t".$row['hardware']['model']."\n"; diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php index 103ac05..febf5f9 100644 --- a/h-source/Application/Controllers/NotebooksController.php +++ b/h-source/Application/Controllers/NotebooksController.php @@ -56,23 +56,10 @@ class NotebooksController extends GenericController "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", "++++++++checkIsStrings|".Notebooks::architectureList() => "architecture", + "+++++++++checkIsStrings|".Notebooks::$installableSelect => "can_free_systems_be_installed", ); - $this->m['HardwareModel']->strongConditions['insert'] = array( - "checkIsStrings|".Notebooks::vendorsList() => "vendor", - "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", - "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility", - "checkLength|99" => "model", - "+checkLength|299" => "distribution", - "++checkIsStrings|".Notebooks::$commYear => "comm_year", - "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype", - "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works", - "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", - "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", - "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", - "++++++++checkIsStrings|".Notebooks::architectureList() => "architecture", - ); + $this->m['HardwareModel']->strongConditions['insert'] = $this->m['HardwareModel']->strongConditions['update']; $this->m['HardwareModel']->softConditions['update'] = array( "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", @@ -84,17 +71,9 @@ class NotebooksController extends GenericController "+++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( - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", - "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 - _ . + / , : ; ( ) [ ]", - "++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'] = $this->m['HardwareModel']->softConditions['update']; - $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,architecture','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,can_free_systems_be_installed,webcam_type,webcam_works,architecture','sanitizeAll'); $argKeys = array( 'page:forceNat' => 1, diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index abef543..7cfb994 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -279,6 +279,8 @@ class Notebooks extends Hardware ); public static $biosSelect = 'not-specified,no,yes'; + + public static $installableSelect = 'not-specified,no,yes'; public static $videoSelect = array( "not specified" => 'not-specified', diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index d810cad..89d116f 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -300,7 +300,8 @@ class Lang /*0252*/"Sd card readers" => "Lettori di schede sd", /*0253*/"Download the xml file of all the sd card readers in the database" => "Scarica il file xml di tutti i lettori di schede sd presenti nel database", /*0254*/"There are no devices in the database with the vendorid:productid code specified by you." => "Non ci sono dispositivi nel database con il codice vendorid:productid da te specificato", - /*0255*/"Would you like to add it to the database?" => "Vorresti inserirlo nel database?" + /*0255*/"Would you like to add it to the database?" => "Vorresti inserirlo nel database?", + /*0256*/"can free operating systems be installed?" => "possono essere installati sistemi operativi liberi?", ), 'es' => array ( diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php index 40052d4..b9f4b80 100644 --- a/h-source/Application/Models/NotebooksModel.php +++ b/h-source/Application/Models/NotebooksModel.php @@ -49,6 +49,7 @@ class NotebooksModel extends GenericModel { 'subtype' => gtext('subtype (notebook or netbook)'), 'architecture' => gtext('architecture'), 'bios' => gtext('does it have a free bios?'), + 'can_free_systems_be_installed' => gtext('can free operating systems be installed?'), 'comm_year' => gtext('year of commercialization'), 'distribution' => gtext('GNU/Linux distribution used for the test'), 'compatibility' => gtext('compatibility with free software'), diff --git a/h-source/Application/Views/Notebooks/form.php b/h-source/Application/Views/Notebooks/form.php index 2effe36..4a661b1 100644 --- a/h-source/Application/Views/Notebooks/form.php +++ b/h-source/Application/Views/Notebooks/form.php @@ -61,9 +61,14 @@
- +
+ +
+ + +
diff --git a/h-source/Application/Views/Notebooks/page.php b/h-source/Application/Views/Notebooks/page.php index 9c30f86..6c7a97f 100644 --- a/h-source/Application/Views/Notebooks/page.php +++ b/h-source/Application/Views/Notebooks/page.php @@ -33,7 +33,7 @@ action,'revision') === 0) { ?>
- This is an old revision of this page, as edited by getUser($updated_by));?> at . It may differ significantly from the viewStatus;?>">current revision. + getLinkToUserFromId($updated_by);?> . controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">.
@@ -60,9 +60,14 @@
-
+
+ +
+
+
+
:
diff --git a/h-source/Application/Views/page.php b/h-source/Application/Views/page.php index 082357f..dad60f6 100644 --- a/h-source/Application/Views/page.php +++ b/h-source/Application/Views/page.php @@ -33,7 +33,7 @@ action,'revision') === 0) { ?> diff --git a/h-source/tables.sql b/h-source/tables.sql index 59fee95..9b9e8ab 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -102,6 +102,7 @@ create table hardware ( fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', ethernet-card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', sd_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', + can_free_systems_be_installed varchar(30) CHARACTER SET utf8 not null default 'not-specified', architecture char(15) not null default 'not-specified', other_names text CHARACTER SET utf8 not null )engine=innodb; @@ -140,6 +141,7 @@ create table revisions ( other_names text CHARACTER SET utf8 not null, approved char(4) not null default 'yes', cleared char(3) not null default 'no', + can_free_systems_be_installed varchar(30) CHARACTER SET utf8 not null default 'not-specified', id_hard INT UNSIGNED NOT NULL )engine=innodb; -- cgit v1.2.3