Пример #1
0
 protected function addToolbar()
 {
     $canDo = LabHelper::getActions();
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_LAB_MANAGER_LABS'), 'folder categories');
     JToolbarHelper::addNew('lab.add');
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('lab.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('labs.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('labs.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('labs.archive');
         JToolbarHelper::checkin('labs.checkin');
     }
     /*将信息直接删除
     		if($canDo->get('core.delete')){
     			JToolbarHelper::deleteList('', 'labs.delete', 'JTOOLBAR_DELETE');
     		}*/
     $state = $this->get('State');
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'labs.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolbarHelper::trash('labs.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_lab');
     }
     JHtmlSidebar::setAction('index.php?option=com_lab&view=labs');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
 }
Пример #2
0
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = LabHelper::getActions();
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_LAB_MANAGER_LABS'), '');
     JToolbarHelper::back('COM_LAB_BUTTON_BACK', 'index.php?option=com_lab');
 }