aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/GenericController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/GenericController.php')
-rw-r--r--h-source/Application/Controllers/GenericController.php27
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);