コード例 #1
0
 protected function _getCellVisibleForLevels($mixedValue, $sKey, $aField, $aRow)
 {
     $mixedValue = $this->_oTemplate->parseHtmlByName('bx_a.html', array('href' => 'javascript:void(0)', 'title' => _t('_adm_nav_txt_manage_visibility'), 'bx_repeat:attrs' => array(array('key' => 'bx_grid_action_single', 'value' => 'show_to'), array('key' => 'bx_grid_action_data', 'value' => $aRow['id'])), 'content' => BxDolStudioUtils::getVisibilityTitle($aRow['visible_for_levels'])));
     return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
 }
コード例 #2
0
 protected function getBlockList($sModule)
 {
     if (empty($sModule)) {
         return '';
     }
     $sJsObject = $this->getPageJsObject();
     $oTemplate = BxDolStudioTemplate::getInstance();
     $oForm = new BxTemplStudioFormView(array());
     $aInputCheckbox = array('type' => 'checkbox', 'name' => 'blocks[]', 'attrs' => array('onChange' => 'javascript:' . $sJsObject . '.onSelectBlock(this);'), 'value' => '');
     $aTmplParams = array('html_block_list_id' => $this->aHtmlIds['block_list_id'] . $sModule, 'bx_repeat:blocks' => array());
     $aBlocks = $this->getBlocks($sModule);
     foreach ($aBlocks as $aBlock) {
         list($sIcon, $sIconUrl) = $this->getBlockIcon($aBlock);
         $aInputCheckbox['value'] = $aBlock['id'];
         $aTmplParams['bx_repeat:blocks'][] = array('js_object' => $sJsObject, 'html_id' => $this->aHtmlIds['block_id'] . $aBlock['id'], 'bx_if:is_inactive' => array('condition' => false, 'content' => array()), 'bx_if:show_link' => array('condition' => false, 'content' => array()), 'bx_if:show_text' => array('condition' => true, 'content' => array('title' => _t($aBlock['title']))), 'bx_if:image' => array('condition' => (bool) $sIconUrl, 'content' => array('icon_url' => $sIconUrl)), 'bx_if:icon' => array('condition' => (bool) $sIcon, 'content' => array('icon' => $sIcon)), 'module' => $this->getModuleTitle($aBlock['module']), 'visible_for' => _t('_adm_bp_txt_visible_for', BxDolStudioUtils::getVisibilityTitle($aBlock['visible_for_levels'])), 'bx_if:show_checkbox' => array('condition' => true, 'content' => array('content' => $oForm->genRow($aInputCheckbox))), 'bx_if:show_drag_handle' => array('condition' => false, 'content' => array()));
     }
     return $oTemplate->parseHtmlByName('bp_blocks_list.html', $aTmplParams);
 }