english/administrator/components/com_redirect/views/links/view.html.php
/**
	 * Add the page title and toolbar.
	 *
	 * @since	1.6
	 */
Add the page title and toolbar.
Add the page title and toolbar .
protected function addToolbar()
	{
		$state	= $this->get('State');
		$canDo	= RedirectHelper::getActions();
		JToolBarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'redirect');
		if ($canDo->get('core.create')) {
			JToolBarHelper::addNew('link.add');
		}
		if ($canDo->get('core.edit')) {
			JToolBarHelper::editList('link.edit');
		}
		if ($canDo->get('core.edit.state')) {
			if ($state->get('filter.state') != 2){
				JToolBarHelper::divider();
				JToolBarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true);
				JToolBarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true);
			}
			if ($state->get('filter.state') != -1 ) {
				JToolBarHelper::divider();
				if ($state->get('filter.state') != 2) {
					JToolBarHelper::archiveList('links.archive');
				}
				else if ($state->get('filter.state') == 2) {
					JToolBarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE');
				}
			}
		}
		if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
			JToolBarHelper::deleteList('', 'links.delete', 'JTOOLBAR_EMPTY_TRASH');
		} else if ($canDo->get('core.edit.state')) {
			JToolBarHelper::trash('links.trash');
			JToolBarHelper::divider();
		}
		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_redirect');
			JToolBarHelper::divider();
		}
		JToolBarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER');
	}
protected function addToolbar ( ) { $ state = $ this -> get ( 'State' ) ; $ canDo = RedirectHelper :: getActions ( ) ; JToolBarHelper :: title ( JText :: _ ( 'COM_REDIRECT_MANAGER_LINKS' ) , 'redirect' ) ; if ( $ canDo -> get ( 'core.create' ) ) { JToolBarHelper :: addNew ( 'link.add' ) ; } if ( $ canDo -> get ( 'core.edit' ) ) { JToolBarHelper :: editList ( 'link.edit' ) ; } if ( $ canDo -> get ( 'core.edit.state' ) ) { if ( $ state -> get ( 'filter.state' ) != 2 ) { JToolBarHelper :: divider ( ) ; JToolBarHelper :: publish ( 'links.publish' , 'JTOOLBAR_ENABLE' , true ) ; JToolBarHelper :: unpublish ( 'links.unpublish' , 'JTOOLBAR_DISABLE' , true ) ; } if ( $ state -> get ( 'filter.state' ) != - 1 ) { JToolBarHelper :: divider ( ) ; if ( $ state -> get ( 'filter.state' ) != 2 ) { JToolBarHelper :: archiveList ( 'links.archive' ) ; } else if ( $ state -> get ( 'filter.state' ) == 2 ) { JToolBarHelper :: unarchiveList ( 'links.publish' , 'JTOOLBAR_UNARCHIVE' ) ; } } } if ( $ state -> get ( 'filter.state' ) == - 2 && $ canDo -> get ( 'core.delete' ) ) { JToolBarHelper :: deleteList ( '' , 'links.delete' , 'JTOOLBAR_EMPTY_TRASH' ) ; } else if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: trash ( 'links.trash' ) ; JToolBarHelper :: divider ( ) ; } if ( $ canDo -> get ( 'core.admin' ) ) { JToolBarHelper :: preferences ( 'com_redirect' ) ; JToolBarHelper :: divider ( ) ; } JToolBarHelper :: help ( 'JHELP_COMPONENTS_REDIRECT_MANAGER' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .