diff options
| author | Antonio Gallo <tonicucoz@gmail.com> | 2011-12-04 19:07:42 +0000 | 
|---|---|---|
| committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-12-04 19:07:42 +0000 | 
| commit | 9cfcb4bb32e2fb8f5dbabd7faa06e47adf1c23af (patch) | |
| tree | c1ee0451fe37e64dfe29c98cf8c0905e9ab53767 /h-source/Application/Controllers/GenericController.php | |
| parent | d30d70afd95653bb356603612db6519d6e6ebead (diff) | |
improved i18n
Diffstat (limited to 'h-source/Application/Controllers/GenericController.php')
| -rw-r--r-- | h-source/Application/Controllers/GenericController.php | 27 | 
1 files changed, 19 insertions, 8 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index 639faa5..3a8c1f0 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -34,23 +34,29 @@ class GenericController extends BaseController  		$popup = new Popup();  		$popup->name = gtext('sort by'); + +		$popNames = array(gtext('last inserted'),gtext('alphabetically'),gtext('alphabetically desc'),gtext('compatibility')); +		$popValues = array('last-inserted','alphabetically','alphabetically-desc','compatibility'); +  		switch ($this->controller)  		{  			case 'printers': -				$popup->itemsName = array('last inserted','alphabetically','alphabetically desc','compatibility'); -				$popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc','compatibility'); +				$popup->itemsName = $popNames; +				$popup->itemsValue = $popValues;  				break;  			case 'notebooks': -				$popup->itemsName = array('last inserted','alphabetically','alphabetically desc','compatibility'); -				$popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc','compatibility'); +				$popup->itemsName = $popNames; +				$popup->itemsValue = $popValues;  				break;  			case 'scanners': -				$popup->itemsName = array('last inserted','alphabetically','alphabetically desc','compatibility'); -				$popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc','compatibility'); +				$popup->itemsName = $popNames; +				$popup->itemsValue = $popValues;  				break;  			default: -				$popup->itemsName = array('last inserted','alphabetically','alphabetically desc'); -				$popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc'); +				array_pop($popNames); +				array_pop($popValues); +				$popup->itemsName = $popNames; +				$popup->itemsValue = $popValues;  				break;  		} @@ -445,6 +451,9 @@ class GenericController extends BaseController  		$popup['sort-by'] = $this->orderPopup;  		$this->helper('Popup',$this->controller.'/catalogue/'.$this->lang,$popup,'inclusive','page'); + +		$this->h['Popup']->allString = gtext("All"); +		  		//create the HTML of the popup  		$data['popup'] = $this->h['Popup']->render(); @@ -474,6 +483,8 @@ class GenericController extends BaseController  		$data['pageList'] = $this->h['Pages']->render($page-3,7);  		$data['topNotice'] = $this->getModule(array('devices',$this->controller,'catalogue')); + +		$data['popupLabel'] = $this->mod->getPopupLabel($this->viewArgs);  		$this->append($data);  | 
