aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-10-03 08:18:08 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-10-03 08:18:08 +0000
commit2f0587286b4e433b96a7db5db60a0dd94617f485 (patch)
treecc84a0899bd3fb380998005bbeb89fcddabd7220
parentfab22f5ebb7c5f757e48292a7f8de605638b7213 (diff)
added the field can free systems be installed to notebooks category - Michał Masłowski suggestion
-rw-r--r--h-source/Application/Controllers/DownloadController.php1
-rw-r--r--h-source/Application/Controllers/NotebooksController.php29
-rw-r--r--h-source/Application/Include/hardware.php2
-rw-r--r--h-source/Application/Include/languages.php3
-rw-r--r--h-source/Application/Models/NotebooksModel.php1
-rw-r--r--h-source/Application/Views/Notebooks/form.php7
-rw-r--r--h-source/Application/Views/Notebooks/page.php9
-rw-r--r--h-source/Application/Views/page.php2
-rw-r--r--h-source/tables.sql2
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<architecture>".translate($row['hardware']['architecture'])."</architecture>\n";
$xml .= "\t\t<free_bios>".$row['hardware']['bios']."</free_bios>\n";
+ $xml .= "\t\t<can_free_systems_be_installed>".$row['hardware']['can_free_systems_be_installed']."</can_free_systems_be_installed>\n";
}
$xml .= "\t\t<model_name>".$row['hardware']['model']."</model_name>\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 <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> 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 <i>kernel</i> 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 <i>webcam</i> 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 <i>kernel</i> 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 <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'] = $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 <b>sd card readers</b> in the database" => "Scarica il file xml di tutti i <b>lettori di schede sd</b> 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 @@
</div>
<div class="form_entry">
- <div class="entry_label"><?php echo gtext("does it have a free bios?");?></div>
+ <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("can free operating systems be installed?");?></div>
+ <?php echo Html_Form::select('can_free_systems_be_installed',$values['can_free_systems_be_installed'],Notebooks::$installableSelect,"select_entry");?>
+ </div>
<div class="form_entry">
<div class="entry_label"><?php echo gtext("year of commercialization");?>:</div>
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 @@
<!--if revision-->
<?php if (strcmp($this->action,'revision') === 0) { ?>
<div class="revision_alert">
- This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/notebooks/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ <?php echo gtext("This is an old revision of this page, as edited by");?> <b><?php echo $u->getLinkToUserFromId($updated_by);?></b> <?php echo gtext('at');?> <b><?php echo smartDate($update_date); ?></b>. <?php echo gtext("It may differ significantly from the");?> <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>"><?php echo gtext("Current revision");?></a>.
</div>
<?php } ?>
@@ -60,9 +60,14 @@
</div>
<div class="notebook_vendor">
- <div class="inner_label"><?php echo gtext("does it have a free bios?");?></div>
+ <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("can free operating systems be installed?");?></div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['can_free_systems_be_installed'];?></b></div>
+ </div>
<div class="notebook_vendor">
<div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
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 @@
<!--if revision-->
<?php if (strcmp($this->action,'revision') === 0) { ?>
<div class="revision_alert">
- <?php echo gtext("This is an old revision of this page, as edited by");?> <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> <?php echo gtext('at');?> <b><?php echo smartDate($update_date); ?></b>. <?php echo gtext("It may differ significantly from the");?> <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>"><?php echo gtext("Current revision");?></a>.
+ <?php echo gtext("This is an old revision of this page, as edited by");?> <b><?php echo $u->getLinkToUserFromId($updated_by);?></b> <?php echo gtext('at');?> <b><?php echo smartDate($update_date); ?></b>. <?php echo gtext("It may differ significantly from the");?> <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>"><?php echo gtext("Current revision");?></a>.
</div>
<?php } ?>
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;