render()?>
input->cookie->getString('vmmenu', 'show') === 'hide' ? ' menu-collapsed': ''; ?>
value array. key = template name, value = Language File contraction * @params $cookieName = choose a cookiename or leave empty if you don't want cookie tabs in this place * @example 'shop' => 'COM_VIRTUEMART_ADMIN_CFG_SHOPTAB' */ static public function buildTabs($view, $load_template = array(),$cookieName='') { $cookieName = vRequest::getCmd('view','virtuemart').$cookieName; vmJsApi::addJScript ( 'vm.cookie', ' var virtuemartcookie="'.$cookieName.'"; '); $html = '
'; $dispatcher = vDispatcher::getInstance(); $returnValues = $dispatcher->trigger('plgVmBuildTabs', array(&$view, &$load_template)); foreach ( $load_template as $tab_content => $tab_title ) { $html .= '
'; $html .= $view->renderLayout ( $tab_content ); $html .= '
'; } $html .= '
'; echo $html; } /** * Admin UI Tabs Imitation * Gives A Tab Based Navigation Back And Loads The Templates With A Nice Design * @param $return = return the start tag or the closing tag - choose 'start' or 'end' * @params $language = pass the language string */ static function imitateTabs($return,$language = '') { if ($return == 'start') { vmJsApi::addJScript ( 'vm.cookietab',' var virtuemartcookie="vm-tab"; '); $html = '
'; echo $html; } if ($return == 'end') { $html = '
'; echo $html; } } /** * Build an array containing all the menu items. * * @param int $moduleId Id of the module to filter on */ static function _getAdminMenu($moduleId = 0) { $db = vFactory::getDbo (); $menuArr = array (); $filter [] = "jmmod.published='1'"; $filter [] = "item.published='1'"; if (! empty ( $moduleId )) { $filter [] = 'vmmod.module_id=' . ( int ) $moduleId; } $query = 'SELECT `jmmod`.`module_id`, `module_name`, `module_perms`, `id`, `name`, `link`, `depends`, `icon_class`, `view`, `task`'; $query .= 'FROM `#__virtuemart_modules` AS jmmod LEFT JOIN `#__virtuemart_adminmenuentries` AS item ON `jmmod`.`module_id`=`item`.`module_id` WHERE ' . implode ( ' AND ', $filter ) . ' ORDER BY `jmmod`.`ordering`, `item`.`ordering` '; $db->setQuery ( $query ); $result = $db->loadAssocList (); for($i = 0, $n = count ( $result ); $i < $n; $i ++) { $row = $result [$i]; $menuArr [$row['module_id']] ['title'] = 'COM_VIRTUEMART_' . strtoupper ( $row['module_name'] ) . '_MOD'; $menuArr [$row['module_id']] ['items'] [] = $row ; } return $menuArr; } /** * Display the administrative ribbon menu. * @todo The link should be done better */ static function showAdminMenu($vmView) { if(!isset(VmConfig::$installed)){ VmConfig::$installed = false; } if(!VmConfig::$installed) return false; $moduleId = vRequest::getInt ( 'module_id', 0 ); $menuItems = AdminUIHelper::_getAdminMenu ( $moduleId ); $app = vFactory::getApplication(); $isSite = $app->isSite(); ?>
manager($link ['view']) || $target || $link ['view']=='about' || $link ['view']=='virtuemart') { $html .= '
  • '. vmText::_ ( $link ['name'] ).'
  • '; } } } if(!empty($html)){ ?>