예제 #1
0
 protected function prepareSidebar()
 {
     if (!JCck::on()) {
         return;
     }
     $buttons = array();
     if (JCck::getUIX() == 'compact') {
         $core = array(array('val' => '2', 'pre' => '', 'key' => 'COM_CCK_'));
     } else {
         $core = array(array('val' => '0', 'pre' => '', 'key' => 'COM_CCK_', 'img' => 'cck-application'), array('val' => '2', 'pre' => '- ', 'key' => 'COM_CCK_', 'img' => 'cck-form'), array('val' => '3', 'pre' => '- ', 'key' => '', 'img' => 'cck-plugin'), array('val' => '4', 'pre' => '- ', 'key' => 'COM_CCK_', 'img' => 'cck-search'), array('val' => '1', 'pre' => '- ', 'key' => '', 'img' => 'cck-template'), array('val' => '5', 'pre' => '', 'key' => '', 'img' => 'cck-multisite'));
     }
     $components = JCckDatabase::loadObjectList('SELECT a.title, a.link, b.element' . ' FROM #__menu AS a LEFT JOIN #__extensions AS b ON b.extension_id = a.component_id' . ' WHERE a.link LIKE "index.php?option=com_cck\\_%"' . ' AND a.link NOT IN ("index.php?option=com_cck_toolbox&view=processing","index.php?option=com_cck_webservices&view=api")' . ' ORDER BY a.title ASC');
     $groupedButtons = array();
     $more = array('ADDON' => 16, 'PLUGIN_FIELD' => 19, 'PLUGIN_LINK' => 20, 'PLUGIN_LIVE' => 21, 'PLUGIN_RESTRICTION' => 112, 'PLUGIN_TYPOGRAPHY' => 24, 'PLUGIN_VALIDATION' => 25, 'TEMPLATE' => 27);
     foreach ($core as $k => $v) {
         $buttons[] = array('access' => array('core.manage', 'com_cck'), 'group' => 'COM_CCK_CORE', 'image' => $v['img'], 'link' => JRoute::_(constant('_C' . $v['val'] . '_LINK')), 'target' => '_self', 'text' => $v['pre'] . JText::_($v['key'] . constant('_C' . $v['val'] . '_TEXT') . 'S'));
     }
     foreach ($components as $k => $v) {
         $buttons[] = array('access' => array('core.manage', $v->element), 'group' => 'COM_CCK_SEBLOD_MORE', 'image' => 'cck-addon', 'link' => JRoute::_($v->link), 'target' => '_self', 'text' => $v->title);
     }
     foreach ($more as $k => $v) {
         $buttons[] = array('access' => array('core.manage', 'com_cck'), 'group' => 'COM_CCK_SEBLOD_COM', 'image' => 'download', 'link' => JRoute::_('http://www.seblod.com/products?seb_item_category=' . $v), 'target' => '_blank', 'text' => JText::_('COM_CCK_PANE_MORE_' . $k));
     }
     foreach ($buttons as $button) {
         $groupedButtons[$button['group']][] = $button;
     }
     $this->sidebar = '<div class="sidebar-nav quick-icons">' . JHtml::_('links.linksgroups', $groupedButtons) . '</div>';
 }
예제 #2
0
 function display($tpl = null)
 {
     switch ($this->getlayout()) {
         case 'delete':
             $this->prepareDelete();
             break;
         case 'edit':
         case 'error':
             $this->prepareDisplay();
             break;
         case 'edit2':
             $this->prepareDisplay();
             $this->prepareDisplay_Ajax();
             break;
         default:
             break;
     }
     if (JCck::on()) {
         $this->css = array('_' => '', 'panel_height' => '132px', 'w30' => 'span4', 'w70' => 'span8', 'wrapper' => 'container', 'wrapper2' => 'row-fluid', 'wrapper_tmpl' => 'span');
         $this->js = array('_' => '', 'tooltip' => '$(".hasTooltip").tooltip({});');
     } else {
         $this->css = array('_' => '', 'panel_height' => '105px', 'w30' => 'width-30', 'w70' => 'width-70 fltlft', 'wrapper' => 'sebwrapper', 'wrapper2' => 'seb-wrapper workshop', 'wrapper_tmpl' => 'width-100 bg-dark fltlft');
         $this->js = array('_' => '', 'tooltip' => '');
     }
     $this->uix = JCck::getUIX();
     parent::display($tpl);
 }
예제 #3
0
 public static function &getButtons()
 {
     $uix = JCck::getUIX();
     if (empty(self::$buttons)) {
         if ($uix == 'compact') {
             self::$buttons = array(array('link' => JRoute::_('index.php?option=com_cck&view=types'), 'icon' => 'icon-48-types.png', 'image' => 'cck-form', 'label' => JText::_('MOD_CCK_QUICKICON_FORM_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_FORM_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=folders'), 'icon' => 'icon-48-folders.png', 'image' => 'cck-application', 'label' => JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('http://www.seblod.com/products'), 'target' => '_blank', 'icon' => 'icon-48-seblod.png', 'image' => 'cck-products', 'label' => JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET_EXTEND')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_SEBLOD_MARKET'));
         } else {
             self::$buttons = array(array('link' => JRoute::_('index.php?option=com_cck&view=types'), 'icon' => 'icon-48-types.png', 'image' => 'cck-form', 'label' => JText::_('MOD_CCK_QUICKICON_CONTENT_TYPE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_CONTENT_TYPE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=fields'), 'icon' => 'icon-48-fields.png', 'image' => 'cck-plugin', 'label' => JText::_('MOD_CCK_QUICKICON_FIELD_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_FIELD_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=searchs'), 'icon' => 'icon-48-searchs.png', 'image' => 'cck-search', 'label' => JText::_('MOD_CCK_QUICKICON_SEARCH_TYPE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SEARCH_TYPE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=templates'), 'icon' => 'icon-48-templates.png', 'image' => 'cck-template', 'label' => JText::_('MOD_CCK_QUICKICON_TEMPLATE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_TEMPLATE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'));
             if (!JCck::on()) {
                 self::$buttons[] = array('link' => JRoute::_('index.php?option=com_cck&view=folders'), 'icon' => 'icon-48-folders.png', 'image' => 'cck-application', 'label' => JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION');
                 self::$buttons[] = array('link' => JRoute::_('index.php?option=com_cck&view=sites'), 'icon' => 'icon-48-sites.png', 'image' => 'cck-multisite', 'label' => JText::_('MOD_CCK_QUICKICON_SITE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SITE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION');
             }
             self::$buttons[] = array('link' => JRoute::_('http://www.seblod.com/products'), 'target' => '_blank', 'icon' => 'icon-48-seblod.png', 'image' => 'cck-products', 'label' => JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET_EXTEND')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_SEBLOD_MARKET');
         }
     }
     return self::$buttons;
 }
예제 #4
0
<?php

/**
* @version 			SEBLOD 3.x Core ~ $Id: edit.php sebastienheraud $
* @package			SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url				http://www.seblod.com
* @editor			Octopoos - www.octopoos.com
* @copyright		Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license 			GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$uix = JCck::getUIX();
$config = JCckDev::init(array('42', 'checkbox', 'colorpicker', 'jform_rules', 'radio', 'text', 'wysiwyg_editor'), true, array('item' => $this->item));
Helper_Include::addDependencies($this->getName(), $this->getLayout());
?>

<form action="<?php 
echo JRoute::_('index.php?option=' . $this->option . '&view=' . $this->getName() . '&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" id="adminForm" name="adminForm">

<div class="<?php 
echo $this->css['wrapper'];
?>
">
	<div class="seblod first">
        <ul class="spe spe_title">
            <?php 
echo JCckDev::renderForm('core_title_folder', $this->item->title, $config);
?>
        </ul>
예제 #5
0
파일: helper.php 프로젝트: kolydart/SEBLOD
 public static function buildMenu($mode, $menutitle, $moduleid, $com, $more = array())
 {
     $app = JFactory::getApplication();
     $empty = false;
     $label = $menutitle;
     $menu = new JAdminCSSCCKMenu();
     $uix = JCck::getUIX();
     if ($mode == 1 || $mode == 2) {
         if ($uix == 'compact') {
             $menu->addChild(new JCCKMenuNode($label, 'index.php?option=com_cck'), true);
             if ($mode == 2 && JFactory::getUser()->authorise('core.manage', 'com_cck')) {
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_FORM_MANAGER'), 'index.php?option=com_cck&view=types', 'class:type-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=types&task=type.add', 'class:newarticle'));
                 }
                 $menu->getParent();
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_APP_FOLDER_MANAGER'), 'index.php?option=com_cck&view=folders', 'class:folder-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=folders&task=folder.add', 'class:newarticle'));
                 }
                 $menu->getParent();
             }
         } else {
             $menu->addChild(new JCCKMenuNode($label, 'index.php?option=com_cck'), true);
             if ($mode == 2 && JFactory::getUser()->authorise('core.manage', 'com_cck')) {
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_CONTENT_TYPE_MANAGER'), 'index.php?option=com_cck&view=types', 'class:type-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=types&task=type.add', 'class:newarticle'));
                 }
                 $menu->getParent();
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_FIELD_MANAGER'), 'index.php?option=com_cck&view=fields', 'class:field-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=fields&task=field.add', 'class:newarticle'));
                 }
                 $menu->getParent();
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_SEARCH_TYPE_MANAGER'), 'index.php?option=com_cck&view=searchs', 'class:search-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=searchs&task=search.add', 'class:newarticle'));
                 }
                 $menu->getParent();
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_TEMPLATE_MANAGER'), 'index.php?option=com_cck&view=templates', 'class:template-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=templates&task=template.add', 'class:newarticle'));
                 }
                 $menu->getParent();
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_APP_FOLDER_MANAGER'), 'index.php?option=com_cck&view=folders', 'class:folder-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=folders&task=folder.add', 'class:newarticle'));
                 }
                 $menu->getParent();
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_SITE_MANAGER'), 'index.php?option=com_cck&view=sites', 'class:site-manager'), true);
                 if ($more['new'] == 1) {
                     $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_NEW'), 'index.php?option=com_cck&view=folders&task=site.add', 'class:newarticle'));
                 }
                 $menu->getParent();
             }
         }
         $menu->addSeparator();
         $menu->addChild(new JCCKMenuNode('SEBLOD.com', 'http://www.seblod.com/', 'class:cck', false, '_blank'), true);
         $menu->addChild(new JCCKMenuNode('Community', 'http://www.seblod.com/community', 'class:cck', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Blog', 'http://www.seblod.com/community/blog', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Events', 'http://www.seblod.com/community/events', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Forums', 'http://www.seblod.com/community/forums', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Showcase', 'http://www.seblod.com/community/showcase', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Social Hub', 'http://www.seblod.com/community/social-hub', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Testimonials', 'http://www.seblod.com/community/testimonials', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Users', 'http://www.seblod.com/community/users', '', false, '_blank'));
         $menu->addSeparator();
         $menu->addChild(new JCCKMenuNode('Products', 'http://www.seblod.com/products', 'class:cck', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Editor\'s Picks', 'http://www.seblod.com/products/editors-picks', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- New', 'http://www.seblod.com/products/new', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Popular', 'http://www.seblod.com/products/popular', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Top', 'http://www.seblod.com/products/top', '', false, '_blank'));
         $menu->addSeparator();
         $menu->addChild(new JCCKMenuNode('Resources', 'http://www.seblod.com/resources', 'class:cck', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Books', 'http://www.seblod.com/resources/books', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Manuals', 'http://www.seblod.com/resources/manuals', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Marketing', 'http://www.seblod.com/resources/marketing', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Tracker', 'http://www.seblod.com/resources/tracker', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Tutorials', 'http://www.seblod.com/resources/tutorials', '', false, '_blank'));
         $menu->addChild(new JCCKMenuNode('- Videos', 'http://www.seblod.com/resources/videos', '', false, '_blank'));
         $menu->addSeparator();
         $menu->getParent();
     } elseif ($mode == 3) {
         $uix_ecommerce = JCckEcommerce::getUIX();
         $product_manager = JComponentHelper::getParams('com_cck_ecommerce')->get('product_manager_link');
         $menu->addChild(new JCCKMenuNode($label, 'index.php?option=com_cck_ecommerce'), true);
         $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_CART_MANAGER'), 'index.php?option=com_cck_ecommerce&view=carts', 'class:cart-manager'), true);
         $menu->getParent();
         if ($uix_ecommerce == 'full') {
             $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_ORDER_MANAGER'), 'index.php?option=com_cck_ecommerce&view=orders', 'class:order-manager'), true);
             $menu->getParent();
             if ($more['ecommerce']) {
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_PAYMENT_MANAGER'), 'index.php?option=com_cck_ecommerce&view=payments', 'class:payment-manager'), true);
                 $menu->getParent();
             }
             if ($product_manager) {
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_PRODUCT_MANAGER'), $product_manager, 'class:product-manager'), true);
                 $menu->getParent();
             }
             if ($more['ecommerce']) {
                 $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_SHIPPING_MANAGER'), 'index.php?option=com_cck_ecommerce&view=shippings', 'class:shipping-manager'), true);
                 $menu->getParent();
             }
             $menu->addChild(new JCCKMenuNode(JText::_('MOD_CCK_MENU_STORE_MANAGER'), 'index.php?option=com_cck_ecommerce&view=stores', 'class:store-manager'), true);
             $menu->getParent();
         }
     } elseif ($mode == 4) {
         $items = JCckDatabase::loadObjectList('SELECT title as text, name as value, id FROM #__cck_core_types' . ' WHERE published = 1 AND location != "none" AND location != "site" AND storage_location != "none" ORDER BY text');
         $menu->addChild(new JCCKMenuNode($label), true);
         if (count($items)) {
             $link = 'index.php?option=com_cck&view=form&type=';
             $user = JFactory::getUser();
             foreach ($items as $item) {
                 if ($user->authorise('core.create', 'com_cck.form.' . $item->id)) {
                     $text = strlen($item->text) > 30 ? substr($item->text, 0, 30) . '..' : $item->text;
                     $menu->addChild(new JCCKMenuNode(JText::_($text), $link . $item->value, 'newarticle'));
                 }
             }
         }
     } elseif ($mode == 5) {
         $user = JFactory::getUser();
         $groups = implode(',', $user->getAuthorisedViewLevels());
         $items = JCckDatabase::loadObjectList('SELECT title as text, name as value, id FROM #__cck_core_searchs' . ' WHERE published = 1 AND location !="none" AND location != "site" AND access IN (' . $groups . ') ORDER BY text');
         $menu->addChild(new JCCKMenuNode($label), true);
         if (count($items)) {
             $link = 'index.php?option=com_cck&view=list&search=';
             $user = JFactory::getUser();
             foreach ($items as $item) {
                 $text = strlen($item->text) > 30 ? substr($item->text, 0, 30) . '..' : $item->text;
                 $menu->addChild(new JCCKMenuNode(JText::_($text), $link . $item->value, 'component'));
             }
         }
     } elseif ($mode == 6) {
         $addons = JCckDatabase::loadObjectList('SELECT a.element, b.title FROM #__extensions AS a' . ' LEFT JOIN #__menu AS b on b.component_id = a.extension_id' . ' WHERE a.type = "component" AND a.element LIKE "com_cck\\_%" ORDER BY title');
         $menu->addChild(new JCCKMenuNode($label), true);
         if (count($addons)) {
             foreach ($addons as $addon) {
                 $menu->addChild(new JCCKMenuNode($addon->title, 'index.php?option=' . $addon->element, 'component'));
             }
         }
     } else {
         $empty = true;
         if (strpos($label, 'icon-16-') !== false) {
             $class = str_replace('icon-16-', '', $label) . '||root-icon-position';
             $label = ' ';
         } else {
             $class = '';
         }
         $menu->addChild(new JCCKMenuNode($label, '#', $class), true);
     }
     if (count($com)) {
         if (!$empty) {
             $menu->addSeparator();
         }
         foreach ($com as $key => $item) {
             $link = null;
             $link = explode('||', $item);
             if (strpos($key, 'free') === false) {
                 $link[1] = $link[1];
                 $link[2] = $link[2] ? $link[2] : 'component';
             } else {
                 $link[2] = $link[2] ? str_replace(array('icon-16-', '.png'), '', $link[2]) : 'component';
             }
             $menu->addChild(new JCCKMenuNode(JText::_($link[0]), $link[1], $link[2]));
         }
     }
     $menu->getParent();
     // TK added menutitle to menuname
     $menu->renderMenu('cck_menu_jseblod' . $moduleid, '');
 }
 protected function _setUIX($view, $layout)
 {
     if (JCck::getUIX() == 'compact') {
         define('_C0_TEXT', 'FOLDER');
         define('_C2_TEXT', 'FORM');
         define('_C4_TEXT', 'LIST');
         define('CCK_BUILDER', 'FORM_BUILDER');
         define('CCK_LABEL', 'SEBLOD 3.x nano');
         define('CCK_LABEL1', 'SEBLOD');
         define('CCK_LABEL2', 'nano');
     } else {
         define('_C0_TEXT', 'APP_FOLDER');
         define('_C2_TEXT', 'CONTENT_TYPE');
         define('_C4_TEXT', 'SEARCH_TYPE');
         define('CCK_BUILDER', 'APP_BUILDER');
         define('CCK_LABEL', 'SEBLOD 3.x');
         define('CCK_LABEL1', 'SEBLOD');
         define('CCK_LABEL2', '');
     }
     if ($view == 'form' || $view == 'list' || $view == 'cck' && $layout == 'welcome') {
         return;
     }
     $user = JCck::getUser(0, false, true);
 }
 public static function addToolbar($vName, $vTitle, $folderId = 0)
 {
     $bar = JToolBar::getInstance('toolbar');
     $canDo = self::getActions($folderId);
     $uix = JCck::getUIX();
     require_once JPATH_COMPONENT . '/helpers/toolbar/separator.php';
     if ($vTitle != '') {
         JToolBarHelper::title(JText::_($vTitle . '_MANAGER'), self::getIcon($vName));
     }
     if ($canDo->get('core.create') || $canDo->get('core.edit')) {
         if ($canDo->get('core.create')) {
             if ($vName == 'type' || $vName == 'search' || $vName == 'site') {
                 if (JCck::on()) {
                     JHtml::_('bootstrap.modal', 'collapseModal');
                     $label = JText::_('JTOOLBAR_NEW');
                     $html = '<button data-toggle="modal" data-target="#collapseModal2" class="btn btn-small btn-success">' . '<i class="icon-new" title="' . $label . '"></i> ' . $label . '</button>';
                     $bar->appendButton('Custom', $html, 'new');
                 } else {
                     if ($vName == 'site') {
                         JToolBarHelper::custom($vName . '.add', 'new', 'new', 'JTOOLBAR_NEW', false);
                     } else {
                         require_once JPATH_COMPONENT . '/helpers/toolbar/modalbox.php';
                         $bar->appendButton('CckModalBox', 'new', 'JTOOLBAR_NEW', 'index.php?option=' . CCK_COM . '&view=' . $vName . '&layout=new&tmpl=component');
                     }
                 }
             } else {
                 JToolBarHelper::custom($vName . '.add', 'new', 'new', 'JTOOLBAR_NEW', false);
             }
         }
         if ($canDo->get('core.edit')) {
             JToolBarHelper::custom($vName . '.edit', 'edit', 'edit', 'JTOOLBAR_EDIT', true);
         }
         $bar->appendButton('CckSeparator');
     }
     if ($canDo->get('core.edit.state') || $canDo->get('core.delete')) {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::custom($vName . 's' . '.publish', 'publish', 'publish', 'COM_CCK_TURN_ON', true);
             JToolBarHelper::custom($vName . 's' . '.unpublish', 'unpublish', 'unpublish', 'COM_CCK_TURN_OFF', true);
         }
         if ($canDo->get('core.delete')) {
             JToolBarHelper::custom($vName . 's' . '.delete', 'delete', 'delete', 'JTOOLBAR_DELETE', true);
         }
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::custom($vName . 's' . '.checkin', 'checkin', 'checkin', 'JTOOLBAR_CHECKIN', true);
         }
         if ($vName == 'type' || $vName == 'search') {
             JToolBarHelper::custom($vName . 's' . '.version', 'archive', 'archives', 'JTOOLBAR_ARCHIVE', true);
         }
         if (!($vName == 'folder' || $vName == 'site')) {
             $bar->appendButton('CckSeparator');
         }
     }
     if (JCck::on() && $vName != 'site' && $vName != 'folder') {
         if (($vName == 'type' || $vName == 'search') && ($canDo->get('core.create') || $canDo->get('core.edit')) || $canDo->get('core.edit')) {
             JHtml::_('bootstrap.modal', 'collapseModal');
             $label = JText::_('JTOOLBAR_BATCH');
             $html = '<button data-toggle="modal" data-target="#collapseModal" class="btn btn-small">' . '<i class="icon-checkbox-partial" title="' . $label . '"></i> ' . $label . '</button>';
             $bar->appendButton('Custom', $html, 'batch');
         }
     }
     if ($vName == 'folder') {
         JToolBarHelper::custom('folders.clear', 'refresh', 'refresh', JText::_('COM_CCK_CLEAR_ACL'), true);
         JToolBarHelper::custom('folders.rebuild', 'refresh', 'refresh', JText::_('COM_CCK_REBUILD'), false);
         if (JCck::on()) {
             JHtml::_('bootstrap.modal', 'collapseModal');
             $label = JText::_('COM_CCK_APP_FOLDER_EXPORT_OPTIONS');
             $html = '<button data-toggle="modal" data-target="#collapseModal" class="btn btn-small">' . '<i class="icon-checkbox-partial" title="' . $label . '"></i> ' . $label . '</button>';
             $bar->appendButton('Custom', $html, 'batch');
         } else {
             $bar->appendButton('CckSeparator');
             require_once JPATH_COMPONENT . '/helpers/toolbar/scroll.php';
             $bar->appendButton('CckScroll', 'download', JText::_('COM_CCK_DOWNLOAD'), '#pagination-bottom');
         }
     } elseif ($vName == 'site') {
         //JToolBarHelper::custom( 'sites.clear', 'refresh', 'refresh', JText::_( 'COM_CCK_CLEAR_VISITS' ), true );
     } else {
         require_once JPATH_ADMINISTRATOR . '/components/com_cck/helpers/toolbar/link.php';
         if ($vName == 'type' || $vName == 'search') {
             $bar->appendButton('CckLink', 'archive', 'COM_CCK_VERSIONS', JRoute::_('index.php?option=com_cck&view=versions&filter_e_type=' . $vName), '_self');
         } elseif ($vName == 'template') {
             $bar->appendButton('CckLink', 'cck-variation', JText::_(_C7_TEXT . 'S'), JRoute::_('index.php?option=com_cck&view=variations'), '_self');
         }
         $bar->appendButton('CckLink', 'folder', 'COM_CCK_' . _C0_TEXT . 'S', JRoute::_('index.php?option=com_cck&view=folders'), '_self');
     }
 }