From eeaaf2ed66f1be0468d9c33b8b850a564c8ce44e Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 18 Oct 2010 17:09:49 +0000 Subject: added filters in the videocards catalogue page and added the possibility to add videocards that do not work --- .../Controllers/VideocardsController.php | 2 ++ h-source/Application/Include/hardware.php | 4 +++- h-source/Application/Models/VideocardsModel.php | 21 ++++++++++++--------- h-source/Application/Views/Videocards/catalogue.php | 1 + 4 files changed, 18 insertions(+), 10 deletions(-) (limited to 'h-source') diff --git a/h-source/Application/Controllers/VideocardsController.php b/h-source/Application/Controllers/VideocardsController.php index e95fac6..174359e 100644 --- a/h-source/Application/Controllers/VideocardsController.php +++ b/h-source/Application/Controllers/VideocardsController.php @@ -83,6 +83,7 @@ class VideocardsController extends GenericController 'history_page:forceNat' => 1, 'vendor:sanitizeString' => 'undef', 'comm_year:sanitizeString' => 'undef', + 'video_card_works:sanitizeString' => 'undef', 'interface:sanitizeString' => 'undef', 'sort-by:sanitizeString' => 'undef', ); @@ -101,6 +102,7 @@ class VideocardsController extends GenericController 'type' => $this->mod->type, 'vendor' => $this->viewArgs['vendor'], 'comm_year' => $this->viewArgs['comm_year'], + 'video_card_works' => $this->viewArgs['video_card_works'], 'interface' => $this->viewArgs['interface'], ); diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index e711231..9340ef8 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -104,13 +104,15 @@ class Videocard extends hardware ); public static $videoSelect = array( - "works with 3D acceleration" => "works_with_3D", + "works with 3D acceleration" => "works_with_3D", "works, but without 3D acceleration" => "works_without_3D", + "it does not work" => "does_not_work", ); public static $videoReverse = array( "works_with_3D" => "works with 3D acceleration", "works_without_3D" => "works, but without 3D acceleration", + "does_not_work" => "it does not work", ); public static $interface = "not-specified,PCI,AGP,PCI-E,ISA"; diff --git a/h-source/Application/Models/VideocardsModel.php b/h-source/Application/Models/VideocardsModel.php index fb90a31..968a005 100644 --- a/h-source/Application/Models/VideocardsModel.php +++ b/h-source/Application/Models/VideocardsModel.php @@ -27,21 +27,24 @@ class VideocardsModel extends BaseModel { $this->_popupItemNames = array( - 'vendor' => 'vendor', - 'comm_year' => 'comm_year', - 'interface' => 'interface', + 'vendor' => 'vendor', + 'comm_year' => 'comm_year', + 'video_card_works' => 'video_card_works', + 'interface' => 'interface', ); $this->_popupLabels = array( - 'vendor' => gtext("vendor"), - 'comm_year' => gtext("year"), - 'interface' => gtext("interface"), + 'vendor' => gtext("vendor"), + 'comm_year' => gtext("year"), + 'video_card_works' => gtext("does it work?"), + 'interface' => gtext("interface"), ); $this->_popupWhere = array( - 'vendor' => 'type="videocard" and deleted="no"', - 'comm_year' => 'type="videocard" and deleted="no"', - 'interface' => 'type="videocard" and deleted="no"', + 'vendor' => 'type="videocard" and deleted="no"', + 'comm_year' => 'type="videocard" and deleted="no"', + 'video_card_works' => 'type="videocard" and deleted="no"', + 'interface' => 'type="videocard" and deleted="no"', ); $this->diffFields = array( diff --git a/h-source/Application/Views/Videocards/catalogue.php b/h-source/Application/Views/Videocards/catalogue.php index 0fbe2be..c49f851 100644 --- a/h-source/Application/Views/Videocards/catalogue.php +++ b/h-source/Application/Views/Videocards/catalogue.php @@ -25,6 +25,7 @@
viewArgs['vendor']?>
viewArgs['comm_year']?>
+
viewArgs['video_card_works']?>
viewArgs['interface']?>
viewArgs['sort-by']?>
-- cgit v1.2.3