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);
 }
Beispiel #2
0
 public function getModulesSelectOne($sGetItemsMethod, $bShowCustom = true, $bShowSystem = true)
 {
     if (empty($sGetItemsMethod)) {
         return '';
     }
     $oForm = new BxTemplStudioFormView(array());
     $aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeModule()'), 'value' => $this->sModule, '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_txt_select_module')), $aInputModules['values']);
     return $oForm->genRow($aInputModules);
 }
 protected function _getFilterControls()
 {
     parent::_getFilterControls();
     $sContent = "";
     $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(false));
     $aCounter = array();
     $this->oDb->getEtemplates(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_pgt_txt_all_modules')), $aInputModules['values']);
     $sContent .= $oForm->genRow($aInputModules);
     $aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(\'keyup\'); ' . $this->getJsObject() . '.onChangeFilter()'));
     $sContent .= $oForm->genRow($aInputSearch);
     return $sContent;
 }
 protected function _getFilterControls()
 {
     parent::_getFilterControls();
     $sContent = $this->getModulesSelectOne('getValues') . $this->getListsSelector($this->sModule);
     $oForm = new BxTemplStudioFormView(array());
     $aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject), 'tr_attrs' => array('style' => 'display:none;'));
     $sContent .= $oForm->genRow($aInputSearch);
     return $sContent;
 }
 protected function _getTmplVarsBlockPanelTop()
 {
     $sJsObject = $this->getPageJsObject();
     $oForm = new BxTemplStudioFormView(array());
     $aInputPages = array('type' => 'select', 'name' => 'page', 'attrs' => array('onChange' => 'javascript:' . $this->getPageJsObject() . '.onChangePage(this)'), 'value' => $this->sPage, 'values' => array(array('key' => '', 'value' => _t('_adm_bp_txt_select_page'))));
     $aPages = $aCounter = array();
     $this->oDb->getPages(array('type' => 'by_module', 'value' => $this->sType), $aPages, false);
     $this->oDb->getBlocks(array('type' => 'counter_by_pages'), $aCounter, false);
     foreach ($aPages as $aPage) {
         $aInputPages['values'][] = array('key' => $aPage['object'], 'value' => _t($aPage['title_system']) . " (" . (isset($aCounter[$aPage['object']]) ? $aCounter[$aPage['object']] : "0") . ")");
     }
     $aTmplVarsActions = array();
     if (($this->sPage != '' && !empty($this->aPageRebuild)) !== false) {
         $aTmplVarsActions = $this->_getTmplVarsBlockPanelTopActions();
     }
     return array('js_object' => $this->getPageJsObject(), 'selector' => $oForm->genRow($aInputPages), 'action_page_create' => $this->sActionPageCreate, 'bx_if:show_actions' => array('condition' => $this->sPage != '', 'content' => $aTmplVarsActions));
 }
 protected function _getFilterControls()
 {
     parent::_getFilterControls();
     $sContent = "";
     $oForm = new BxTemplStudioFormView(array());
     $aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'values' => array('id-' . BX_DOL_LANGUAGE_CATEGORY_SYSTEM => '', 'id-' . BX_DOL_LANGUAGE_CATEGORY_CUSTOM => ''));
     $aCategories = $aCounter = array();
     $this->oDb->getCategoriesBy(array('type' => 'all'), $aCategories, false);
     $this->oDb->getKeysBy(array('type' => 'counter_by_category'), $aCounter, false);
     foreach ($aCategories as $aCategory) {
         $aInputModules['values']['id-' . $aCategory['id']] = $aCategory['name'] . " (" . (isset($aCounter[$aCategory['id']]) ? $aCounter[$aCategory['id']] : "0") . ")";
     }
     $aInputModules['values'] = array_merge(array('id-0' => _t('_adm_pgt_txt_all_modules')), $aInputModules['values']);
     $sContent .= $oForm->genRow($aInputModules);
     $aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(); ' . $this->getJsObject() . '.onChangeFilter()'));
     $sContent .= $oForm->genRow($aInputSearch);
     return $sContent;
 }
Beispiel #7
0
 protected function _getFilterControls()
 {
     bx_import('BxTemplStudioFormView');
     $oForm = new BxTemplStudioFormView(array());
     $aInput = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject));
     $this->_oTemplate->addCss('forms.css');
     return $oForm->genRow($aInput);
 }
 protected function _getFilterControls()
 {
     parent::_getFilterControls();
     $sContent = "";
     bx_import('BxTemplStudioFormView');
     $oForm = new BxTemplStudioFormView(array());
     $aInputLevels = array('type' => 'select', 'name' => 'level', 'attrs' => array('id' => 'bx-grid-level-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeLevel()'), 'value' => 'id-' . $this->iLevel, 'values' => array());
     $aLevels = $aCounter = array();
     $this->oDb->getLevels(array('type' => 'all'), $aLevels, false);
     $this->oDb->getPrices(array('type' => 'counter_by_levels'), $aCounter, false);
     foreach ($aLevels as $aLevel) {
         $aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']) . " (" . (isset($aCounter[$aLevel['id']]) ? $aCounter[$aLevel['id']] : "0") . ")";
     }
     asort($aInputLevels['values']);
     $aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']);
     $sContent .= $oForm->genRow($aInputLevels);
     if ($this->iLevel == 0) {
         return $sContent;
     }
     $aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject));
     $sContent .= $oForm->genRow($aInputSearch);
     return $sContent;
 }
 protected function _getFilterControls()
 {
     $sContent = parent::_getFilterControls();
     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());
     $aCounter = array();
     $this->oDb->getLists(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_form_txt_all_modules')), $aInputModules['values']);
     return $oForm->genRow($aInputModules) . $sContent;
 }
 protected function _getFilterControls()
 {
     parent::_getFilterControls();
     bx_import('BxTemplStudioFormView');
     $oForm = new BxTemplStudioFormView(array());
     $aInputSets = array('type' => 'select', 'name' => 'set', 'attrs' => array('id' => 'bx-grid-set-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'value' => '', 'values' => array());
     $aSets = $aCounter = array();
     $this->oDb->getSets(array('type' => 'all', 'except' => $this->sSet), $aSets, false);
     $this->oDb->getItems(array('type' => 'counter_by_sets'), $aCounter, false);
     foreach ($aSets as $aSet) {
         $aInputSets['values'][$aSet['name']] = _t($aSet['title']) . " (" . (isset($aCounter[$aSet['name']]) ? $aCounter[$aSet['name']] : "0") . ")";
     }
     asort($aInputSets['values']);
     $aInputSets['values'] = array_merge(array('' => _t('_adm_nav_txt_select_set')), $aInputSets['values']);
     return $oForm->genRow($aInputSets) . $this->getModulesSelectAll('getItems') . $this->getSearchInput();
 }
 protected function _getFilterControls()
 {
     parent::_getFilterControls();
     $sContent = "";
     $oForm = new BxTemplStudioFormView(array());
     $aInputLevels = array('type' => 'select', 'name' => 'level', 'attrs' => array('id' => 'bx-grid-level-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeLevel()'), 'value' => 'id-' . $this->iLevel, 'values' => array());
     $aLevels = $aCounter = array();
     $this->oDb->getLevels(array('type' => 'all'), $aLevels, false);
     $this->oDb->getActions(array('type' => 'counter_by_levels'), $aCounter, false);
     foreach ($aLevels as $aLevel) {
         $aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']) . " (" . (isset($aCounter[$aLevel['id']]) ? $aCounter[$aLevel['id']] : "0") . ")";
     }
     asort($aInputLevels['values']);
     $aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']);
     $sContent .= $oForm->genRow($aInputLevels);
     if ($this->iLevel == 0) {
         return $sContent;
     }
     $aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'value' => '', 'values' => $this->getModules(false));
     $aInputModules['values'] = array_merge(array('' => _t('_adm_prm_txt_all_modules')), $aInputModules['values']);
     $aCounter = array();
     $this->oDb->getActions(array('type' => 'counter_by_modules'), $aCounter, false);
     foreach ($aInputModules['values'] as $sKey => $sValue) {
         if (isset($aCounter[$sKey])) {
             $aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . $aCounter[$sKey] . ")";
         }
     }
     $sContent .= $oForm->genRow($aInputModules);
     $aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(\'keyup\'); ' . $this->getJsObject() . '.onChangeFilter()'));
     $sContent .= $oForm->genRow($aInputSearch);
     return $sContent;
 }