Ejemplo n.º 1
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
     require_once JPATH_COMPONENT . '/helpers/html/modules.php';
     $state = $this->get('State');
     $canDo = MaximenuckHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_MAXIMENUCK') . ' - ' . JText::_('CK_MODULES_LIST'), 'logo_menumanagerck_large.png');
     if ($canDo->get('core.admin')) {
         // JToolBarHelper::preferences('com_maximenuck');
     }
 }
Ejemplo n.º 2
0
    protected function addMenuSelection()
    {
        require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
        $canDo = MaximenuckHelper::getActions($this->state->get('filter.parent_id'));
        $menushtml = '';
        // Add a batch button
        if ($canDo->get('core.edit')) {
            $menushtml .= '<div id="toolbar-menu" class="btn-wrapper">';
            foreach ($this->get('Menus') as $menu) {
                $active = $menu->menutype == JFactory::getApplication()->input->get('menutype') ? ' active' : '';
                $menushtml .= '<a href="index.php?option=com_maximenuck&view=migration&menutype=' . $menu->menutype . '"><button class="btn btn-small btn-primary' . $active . '">
						<i class="icon-list-view"></i>
						' . $menu->title . '</button></a>';
            }
        } else {
            $menushtml = Jtext::_('COM_MENUMANAGERCK_NOT_HAVE_RIGHT_TO_EDIT');
        }
        return $menushtml;
    }