english/administrator/components/com_users/views/user/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()
	{
		JRequest::setVar('hidemainmenu', 1);
		$user		= JFactory::getUser();
		$isNew		= ($this->item->id == 0);
		$canDo		= UsersHelper::getActions();
		$isNew	= ($this->item->id == 0);
		$isProfile = $this->item->id == $user->id;
		JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_USER_TITLE' : ($isProfile ? 'COM_USERS_VIEW_EDIT_PROFILE_TITLE' : 'COM_USERS_VIEW_EDIT_USER_TITLE')), $isNew ? 'user-add' : ($isProfile ? 'user-profile' : 'user-edit'));
		if ($canDo->get('core.edit')||$canDo->get('core.edit.own')||$canDo->get('core.create')) {
			JToolBarHelper::apply('user.apply');
			JToolBarHelper::save('user.save');
		}
		if ($canDo->get('core.create')&&$canDo->get('core.manage')) {
			JToolBarHelper::save2new('user.save2new');
		}
		if (empty($this->item->id))  {
			JToolBarHelper::cancel('user.cancel');
		} else {
			JToolBarHelper::cancel('user.cancel', 'JTOOLBAR_CLOSE');
		}
		JToolBarHelper::divider();
		JToolBarHelper::help('JHELP_USERS_USER_MANAGER_EDIT');
	}
protected function addToolbar ( ) { JRequest :: setVar ( 'hidemainmenu' , 1 ) ; $ user = JFactory :: getUser ( ) ; $ isNew = ( $ this -> item -> id == 0 ) ; $ canDo = UsersHelper :: getActions ( ) ; $ isNew = ( $ this -> item -> id == 0 ) ; $ isProfile = $ this -> item -> id == $ user -> id ; JToolBarHelper :: title ( JText :: _ ( $ isNew ? 'COM_USERS_VIEW_NEW_USER_TITLE' : ( $ isProfile ? 'COM_USERS_VIEW_EDIT_PROFILE_TITLE' : 'COM_USERS_VIEW_EDIT_USER_TITLE' ) ) , $ isNew ? 'user-add' : ( $ isProfile ? 'user-profile' : 'user-edit' ) ) ; if ( $ canDo -> get ( 'core.edit' ) || $ canDo -> get ( 'core.edit.own' ) || $ canDo -> get ( 'core.create' ) ) { JToolBarHelper :: apply ( 'user.apply' ) ; JToolBarHelper :: save ( 'user.save' ) ; } if ( $ canDo -> get ( 'core.create' ) && $ canDo -> get ( 'core.manage' ) ) { JToolBarHelper :: save2new ( 'user.save2new' ) ; } if ( empty ( $ this -> item -> id ) ) { JToolBarHelper :: cancel ( 'user.cancel' ) ; } else { JToolBarHelper :: cancel ( 'user.cancel' , 'JTOOLBAR_CLOSE' ) ; } JToolBarHelper :: divider ( ) ; JToolBarHelper :: help ( 'JHELP_USERS_USER_MANAGER_EDIT' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .