Ejemplo n.º 1
0
 protected function addToolbar()
 {
     $canDo = LowFaresHelper::getActions();
     JToolBarHelper::title(JText::_('COM_LOWFARES_LIST'), 'module.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('flights.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('flights.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('flights.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('flights.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::custom('', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_GETFARES', false);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::divider();
         JToolBarHelper::deleteList(JText::_('COM_LOWFARES_COMFIRM_DELETE'), 'flights.delete', 'JTOOLBAR_DELETE');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_lowfares');
     }
 }
Ejemplo n.º 2
0
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_LOWFARES_EDIT'), 'module.png');
     $canDo = LowFaresHelper::getActions();
     if ($canDo->get('core.create') || $canDo->get('core.edit')) {
         JToolBarHelper::apply('flights.apply');
         JToolBarHelper::save('flights.save');
     }
     JToolBarHelper::cancel('flights.cancel');
 }