/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JToolbarHelper::addNew('addGroup', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_ADD_GROUP')); JToolbarHelper::custom('moveelementconfirm.show', 'move', 'move', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_MOVE_ELEMENTS'), true); $toolbar = JToolbar::getInstance(); $toolbar->addButtonPath(JPATH_NENO . '/button'); $toolbar->appendButton('TC', NenoHelperApi::getTCAvailable()); $this->extraSidebar = NenoHelperBackend::getSidebarInfobox('groupselements'); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JToolbarHelper::addNew('addGroup', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_ADD_GROUP')); JToolbarHelper::custom('moveelementconfirm.show', 'move', 'move', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_MOVE_ELEMENTS'), true); JToolbarHelper::custom('groupselements.scanForContent', 'loop', 'loop', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_SCAN_FOR_CONTENT'), true); JToolbarHelper::custom('groupselements.moveTranslationsToTarget', 'download', 'download', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_MOVE_TRANSLATED_CONTENT'), true); JToolbarHelper::custom('groupselements.checkIntegrity', 'cogs', 'cogs', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_CHECK_INTEGRITY'), true); JToolbarHelper::custom('groupselements.refreshWordCount', 'refresh', 'refresh', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_REFRESH_WORD_COUNT'), true); $toolbar = JToolbar::getInstance(); $toolbar->addButtonPath(JPATH_NENO . '/button'); $toolbar->appendButton('TC', NenoHelperApi::getTCAvailable()); $this->extraSidebar = NenoHelperBackend::getSidebarInfobox('groupselements'); }
/** * Display the view * * @param string $tpl Template * * @return void * * @throws Exception This will happen if there are errors during the process to load the data * * @since 1.0 */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->isLanguageSwitcherPublished = $this->get('IsSwitcherPublished'); if (!$this->isLanguageSwitcherPublished) { $this->positionField = $this->get('PositionField'); } // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); } NenoHelperBackend::addSubmenu('dashboard'); $toolbar = JToolbar::getInstance(); $toolbar->addButtonPath(JPATH_NENO . '/button'); $toolbar->appendButton('TC', NenoHelperApi::getTCAvailable()); JToolbarHelper::custom('fixMenus', 'refresh', 'refresh', JText::_('COM_NENO_DASHBOARD_FIX_MENU_BUTTON'), false); JToolBarHelper::title(JText::_('COM_NENO_DASHBOARD_TITLE'), 'screen'); $this->sidebar = JHtmlSidebar::render(); $this->extraSidebar = NenoHelperBackend::getSidebarInfobox('dashboard'); parent::display($tpl); }