english/administrator/components/com_templates/views/style/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', true);
		$user		= JFactory::getUser();
		$isNew		= ($this->item->id == 0);
		$canDo		= TemplatesHelper::getActions();
		JToolBarHelper::title(
			$isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE')
			: JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager'
		);
		if ($canDo->get('core.edit')) {
			JToolBarHelper::apply('style.apply');
			JToolBarHelper::save('style.save');
		}
		if (!$isNew && $canDo->get('core.create')) {
			JToolBarHelper::save2copy('style.save2copy');
		}
		if (empty($this->item->id))  {
			JToolBarHelper::cancel('style.cancel');
		} else {
			JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE');
		}
		JToolBarHelper::divider();
		$lang = JFactory::getLanguage();
		$help = $this->get('Help');
		if ($lang->hasKey($help->url)) {
			$debug = $lang->setDebug(false);
			$url = JText::_($help->url);
			$lang->setDebug($debug);
		}
		else {
			$url = null;
		}
		JToolBarHelper::help($help->key, false, $url);
	}
protected function addToolbar ( ) { JRequest :: setVar ( 'hidemainmenu' , true ) ; $ user = JFactory :: getUser ( ) ; $ isNew = ( $ this -> item -> id == 0 ) ; $ canDo = TemplatesHelper :: getActions ( ) ; JToolBarHelper :: title ( $ isNew ? JText :: _ ( 'COM_TEMPLATES_MANAGER_ADD_STYLE' ) : JText :: _ ( 'COM_TEMPLATES_MANAGER_EDIT_STYLE' ) , 'thememanager' ) ; if ( $ canDo -> get ( 'core.edit' ) ) { JToolBarHelper :: apply ( 'style.apply' ) ; JToolBarHelper :: save ( 'style.save' ) ; } if ( ! $ isNew && $ canDo -> get ( 'core.create' ) ) { JToolBarHelper :: save2copy ( 'style.save2copy' ) ; } if ( empty ( $ this -> item -> id ) ) { JToolBarHelper :: cancel ( 'style.cancel' ) ; } else { JToolBarHelper :: cancel ( 'style.cancel' , 'JTOOLBAR_CLOSE' ) ; } JToolBarHelper :: divider ( ) ; $ lang = JFactory :: getLanguage ( ) ; $ help = $ this -> get ( 'Help' ) ; if ( $ lang -> hasKey ( $ help -> url ) ) { $ debug = $ lang -> setDebug ( false ) ; $ url = JText :: _ ( $ help -> url ) ; $ lang -> setDebug ( $ debug ) ; } else { $ url = null ; } JToolBarHelper :: help ( $ help -> key , false , $ url ) ; }
Add the page title and toolbar.
Add the page title and toolbar .
// If not checked out, can save the item. // If an existing item, can save to a copy. // Get the help information for the template item.