| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup DolphinView Dolphin Studio Representation classes
- * @ingroup DolphinStudio
- * @{
- */
- bx_import('BxTemplStudioGrid');
- class BxBaseStudioGridNavigation extends BxTemplStudioGrid
- {
- function __construct($aOptions, $oTemplate = false)
- {
- parent::__construct($aOptions, $oTemplate);
- }
- public function getModulesSelectAll($sGetItemsMethod, $bShowCustom = true, $bShowSystem = true)
- {
- if(empty($sGetItemsMethod))
- return '';
- bx_import('BxTemplStudioFormView');
- $oForm = new BxTemplStudioFormView(array());
- $aInputModules = array(
- 'type' => 'select',
- 'name' => 'module',
- 'attrs' => array(
- 'id' => 'bx-grid-module-' . $this->_sObject,
- 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'
- ),
- 'value' => '',
- 'values' => $this->getModules($bShowCustom, $bShowSystem)
- );
- $aCounter = array();
- $this->oDb->$sGetItemsMethod(array('type' => 'counter_by_modules'), $aCounter, false);
- foreach($aInputModules['values'] as $sKey => $sValue)
- $aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
- $aInputModules['values'] = array_merge(array('' => _t('_adm_nav_txt_all_modules')), $aInputModules['values']);
- return $oForm->genRow($aInputModules);
- }
- public function getSearchInput()
- {
- bx_import('BxTemplStudioFormView');
- $oForm = new BxTemplStudioFormView(array());
- $aInputSearch = array(
- 'type' => 'text',
- 'name' => 'keyword',
- 'attrs' => array(
- 'id' => 'bx-grid-search-' . $this->_sObject,
- 'onKeyup' => 'javascript:$(this).off(\'keyup\'); ' . $this->getJsObject() . '.onChangeFilter()'
- )
- );
- return $oForm->genRow($aInputSearch);
- }
- }
- /** @} */
|