english/administrator/components/com_languages/views/language/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/languages.php';
		JRequest::setVar('hidemainmenu', 1);
		$isNew = empty($this->item->lang_id);
		$canDo	= LanguagesHelper::getActions();
		JToolBarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
		if ($isNew && $canDo->get('core.create')) {
			JToolBarHelper::save('language.save');
		}
		if (!$isNew && $canDo->get('core.edit')) {
			JToolBarHelper::apply('language.apply');
			JToolBarHelper::save('language.save');
		}
		if ($canDo->get('core.create')) {
			JToolBarHelper::save2new('language.save2new');
		}
		if ($isNew) {
			JToolBarHelper::cancel('language.cancel');
		}
		else {
			JToolBarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE');
		}
		JToolBarHelper::divider();
		JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
	}
protected function addToolbar ( ) { require_once JPATH_COMPONENT . '/helpers/languages.php' ; JRequest :: setVar ( 'hidemainmenu' , 1 ) ; $ isNew = empty ( $ this -> item -> lang_id ) ; $ canDo = LanguagesHelper :: getActions ( ) ; JToolBarHelper :: title ( JText :: _ ( $ isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE' ) , 'langmanager.png' ) ; if ( $ isNew && $ canDo -> get ( 'core.create' ) ) { JToolBarHelper :: save ( 'language.save' ) ; } if ( ! $ isNew && $ canDo -> get ( 'core.edit' ) ) { JToolBarHelper :: apply ( 'language.apply' ) ; JToolBarHelper :: save ( 'language.save' ) ; } if ( $ canDo -> get ( 'core.create' ) ) { JToolBarHelper :: save2new ( 'language.save2new' ) ; } if ( $ isNew ) { JToolBarHelper :: cancel ( 'language.cancel' ) ; } else { JToolBarHelper :: cancel ( 'language.cancel' , 'JTOOLBAR_CLOSE' ) ; } JToolBarHelper :: divider ( ) ; JToolBarHelper :: help ( 'JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .
// If a new item, can save. //If an existing item, allow to Apply and Save. // If an existing item, can save to a copy only if we have create rights.