english/administrator/components/com_contact/views/contacts/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()
	{
		require_once JPATH_COMPONENT.'/helpers/contact.php';
		$canDo	= ContactHelper::getActions($this->state->get('filter.category_id'));
		$user	= JFactory::getUser();
		JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png');
		if ($canDo->get('core.create') || (count($user->getAuthorisedCategories('com_contact', 'core.create'))) > 0) {
			JToolBarHelper::addNew('contact.add');
		}
		if (($canDo->get('core.edit')) || ($canDo->get('core.edit.own'))) {
			JToolBarHelper::editList('contact.edit');
		}
		if ($canDo->get('core.edit.state')) {
			JToolBarHelper::divider();
			JToolBarHelper::publish('contacts.publish', 'JTOOLBAR_PUBLISH', true);
			JToolBarHelper::unpublish('contacts.unpublish', 'JTOOLBAR_UNPUBLISH', true);
			JToolBarHelper::divider();
			JToolBarHelper::archiveList('contacts.archive');
			JToolBarHelper::checkin('contacts.checkin');
		}
		if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
			JToolBarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH');
			JToolBarHelper::divider();
		}
		else if ($canDo->get('core.edit.state')) {
			JToolBarHelper::trash('contacts.trash');
			JToolBarHelper::divider();
		}
		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_contact');
			JToolBarHelper::divider();
		}
		JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');
	}
protected function addToolbar ( ) { require_once JPATH_COMPONENT . '/helpers/contact.php' ; $ canDo = ContactHelper :: getActions ( $ this -> state -> get ( 'filter.category_id' ) ) ; $ user = JFactory :: getUser ( ) ; JToolBarHelper :: title ( JText :: _ ( 'COM_CONTACT_MANAGER_CONTACTS' ) , 'contact.png' ) ; if ( $ canDo -> get ( 'core.create' ) || ( count ( $ user -> getAuthorisedCategories ( 'com_contact' , 'core.create' ) ) ) > 0 ) { JToolBarHelper :: addNew ( 'contact.add' ) ; } if ( ( $ canDo -> get ( 'core.edit' ) ) || ( $ canDo -> get ( 'core.edit.own' ) ) ) { JToolBarHelper :: editList ( 'contact.edit' ) ; } if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: divider ( ) ; JToolBarHelper :: publish ( 'contacts.publish' , 'JTOOLBAR_PUBLISH' , true ) ; JToolBarHelper :: unpublish ( 'contacts.unpublish' , 'JTOOLBAR_UNPUBLISH' , true ) ; JToolBarHelper :: divider ( ) ; JToolBarHelper :: archiveList ( 'contacts.archive' ) ; JToolBarHelper :: checkin ( 'contacts.checkin' ) ; } if ( $ this -> state -> get ( 'filter.published' ) == - 2 && $ canDo -> get ( 'core.delete' ) ) { JToolBarHelper :: deleteList ( '' , 'contacts.delete' , 'JTOOLBAR_EMPTY_TRASH' ) ; JToolBarHelper :: divider ( ) ; } else if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: trash ( 'contacts.trash' ) ; JToolBarHelper :: divider ( ) ; } if ( $ canDo -> get ( 'core.admin' ) ) { JToolBarHelper :: preferences ( 'com_contact' ) ; JToolBarHelper :: divider ( ) ; } JToolBarHelper :: help ( 'JHELP_COMPONENTS_CONTACTS_CONTACTS' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .