function display($tpl = null) { JHTML::stylesheet('falang.css', 'administrator/components/com_falang/assets/css/'); $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_FALANG_TITLE') . ' :: ' . JText::_('COM_FALANG_TITLE_MANAGEMENT')); // Set toolbar items for the page JToolBarHelper::title(JText::_('COM_FALANG_TITLE_MANAGEMENT'), 'manage'); // JToolBarHelper::custom( 'cpanel.show', 'joomfish', 'joomfish', 'CONTROL PANEL' , false ); JToolBarHelper::help('screen.manage', true); JSubMenuHelper::addEntry(JText::_('COM_FALANG_CONTROL_PANEL'), 'index.php?option=com_falang'); JSubMenuHelper::addEntry(JText::_('COM_FALANG_TRANSLATION'), 'index.php?option=com_falang&task=translate.overview'); JSubMenuHelper::addEntry(JText::_('COM_FALANG_ORPHANS'), 'index.php?option=com_falang&task=translate.orphans'); // JSubMenuHelper::addEntry(JText::_('Manage Translations'), 'index.php?option=com_falang&task=manage.overview', true); // JSubMenuHelper::addEntry(JText::_('Statistics'), 'index.php?option=com_falang&task=statistics.overview', false); // JSubMenuHelper::addEntry(JText::_('Language Configuration'), 'index.php?option=com_falang&task=languages.show', false); JSubMenuHelper::addEntry(JText::_('COM_FALANG_CONTENT_ELEMENTS'), 'index.php?option=com_falang&task=elements.show', false); JSubMenuHelper::addEntry(JText::_('COM_FALANG_HELP_AND_HOWTO'), 'index.php?option=com_falang&task=help.show', false); $this->panelStates = $this->get('PanelStates'); $this->contentInfo = $this->get('ContentInfo'); $this->publishedTabs = $this->get('PublishedTabs'); $this->assignRef('panelStates', $this->panelStates); $this->assignRef('contentInfo', $this->contentInfo); $this->assignRef('publishedTabs', $this->publishedTabs); JHTML::_('behavior.tooltip'); parent::display($tpl); }
function display($tpl = null) { $document = JFactory::getDocument(); // browser title $document->setTitle(JText::_('COM_FALANG_TITLE') . ' :: ' . JText::_('COM_FALANG_TITLE_CONTENT_ELEMENTS')); // set page title JToolBarHelper::title(JText::_('COM_FALANG_TITLE_CONTENT_ELEMENTS'), 'extension'); $layout = $this->getLayout(); if (method_exists($this, $layout)) { $this->{$layout}($tpl); } else { $this->addToolbar(); } parent::display($tpl); }
/** * Control Panel display function * * @param template $tpl */ public function display($tpl = null) { JHTML::stylesheet('falang.css', 'administrator/components/com_falang/assets/css/'); $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_FALANG_TITLE') . ' :: ' . JText::_('COM_FALANG_CONTROL_PANEL')); // Set toolbar items for the page JToolBarHelper::title(JText::_('COM_FALANG_TITLE') . ' :: ' . JText::_('COM_FALANG_HEADER'), 'falang'); JToolBarHelper::preferences('com_falang', '580', '750'); JToolBarHelper::help('screen.cpanel', true); if (FALANG_J30) { JHtmlSidebar::addEntry(JText::_('COM_FALANG_CONTROL_PANEL'), 'index.php?option=com_falang', true); JHtmlSidebar::addEntry(JText::_('COM_FALANG_TRANSLATION'), 'index.php?option=com_falang&task=translate.overview'); JHtmlSidebar::addEntry(JText::_('COM_FALANG_ORPHANS'), 'index.php?option=com_falang&task=translate.orphans'); JHtmlSidebar::addEntry(JText::_('COM_FALANG_CONTENT_ELEMENTS'), 'index.php?option=com_falang&task=elements.show', false); JHtmlSidebar::addEntry(JText::_('COM_FALANG_HELP_AND_HOWTO'), 'index.php?option=com_falang&task=help.show', false); $this->sidebar = JHtmlSidebar::render(); } else { JSubMenuHelper::addEntry(JText::_('COM_FALANG_CONTROL_PANEL'), 'index.php?option=com_falang', true); JSubMenuHelper::addEntry(JText::_('COM_FALANG_TRANSLATION'), 'index.php?option=com_falang&task=translate.overview'); JSubMenuHelper::addEntry(JText::_('COM_FALANG_ORPHANS'), 'index.php?option=com_falang&task=translate.orphans'); JSubMenuHelper::addEntry(JText::_('COM_FALANG_CONTENT_ELEMENTS'), 'index.php?option=com_falang&task=elements.show', false); JSubMenuHelper::addEntry(JText::_('COM_FALANG_HELP_AND_HOWTO'), 'index.php?option=com_falang&task=help.show', false); } $this->panelStates = $this->get('PanelStates'); $this->contentInfo = $this->get('ContentInfo'); $this->performanceInfo = $this->get('PerformanceInfo'); $this->assignRef('panelStates', $this->panelStates); $this->assignRef('contentInfo', $this->contentInfo); $this->assignRef('performanceInfo', $this->performanceInfo); //version // Get current version available $version = new FalangVersion(); $this->assignRef('currentVersion', $version->getVersionShort()); //get latest version $updateInformation = $this->getUpdateInformation(); $this->assignRef('latestVersion', $updateInformation['latest']); $js = "var progress_msg = '" . JText::_('COM_FALANG_CPANEL_CHECK_PROGRESS') . "';"; $document->addScriptDeclaration($js); $document->addScript('components/com_falang/assets/js/cpanel.js'); JHTML::_('behavior.tooltip'); parent::display($tpl); }
function preview($tpl = null) { // hide the sub menu $this->_hideSubmenu(); parent::display($tpl); }
/** * Load a template file -- This is a special implementation that tries to find the files within the distribution help * dir first. There localized versions of these files can be stored! * * @access public * @param string $tpl The name of the template source file ... * automatically searches the template paths and compiles as needed. * @return string The output of the the template script. */ function loadTemplate($tpl = null) { global $mainframe, $option; // clear prior output $this->_output = null; $file = $this->_layout; // clean the file name $file = preg_replace('/[^A-Z0-9_\\.-]/i', '', $file); // Get Help URL jimport('joomla.language.help'); $filetofind = JHelp::createURL($file, true); $this->_template = JPath::find(JPATH_ADMINISTRATOR, $filetofind); if ($this->_template != false) { // unset so as not to introduce into template scope unset($tpl); unset($file); // never allow a 'this' property if (isset($this->this)) { unset($this->this); } // start capturing output into a buffer ob_start(); // include the requested template filename in the local scope // (this will execute the view logic). include $this->_template; // done with the requested template; get the buffer and // clear it. $this->_output = ob_get_contents(); ob_end_clean(); return $this->_output; } else { return parent::loadTemplate($tpl); } }