setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' .JText::_('TITLE_Management'));
// Set toolbar items for the page
JToolBarHelper::title(JText::_( 'TITLE_Management' ), 'manage' );
JToolBarHelper::custom( 'cpanel.show', 'joomfish', 'joomfish', 'CONTROL PANEL' , false );
JToolBarHelper::help( 'screen.manage', true);
JSubMenuHelper::addEntry(JText::_('Control Panel'), 'index2.php?option=com_joomfish');
JSubMenuHelper::addEntry(JText::_('Translation'), 'index2.php?option=com_joomfish&task=translate.overview');
JSubMenuHelper::addEntry(JText::_('Orphans'), 'index2.php?option=com_joomfish&task=translate.orphans');
JSubMenuHelper::addEntry(JText::_('Manage Translations'), 'index2.php?option=com_joomfish&task=manage.overview', true);
JSubMenuHelper::addEntry(JText::_('Statistics'), 'index2.php?option=com_joomfish&task=statistics.overview', false);
JSubMenuHelper::addEntry(JText::_('Language Configuration'), 'index2.php?option=com_joomfish&task=languages.show', false);
JSubMenuHelper::addEntry(JText::_('Content elements'), 'index2.php?option=com_joomfish&task=elements.show', false);
JSubMenuHelper::addEntry(JText::_('HELP AND HOWTO'), 'index2.php?option=com_joomfish&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);
}
/**
* This method renders a nice status overview table from the content element files
*
* @param unknown_type $contentelements
*/
function renderOriginalStatusTable($originalStatus, $message='', $langCodes=null) {
$htmlOutput = '';
$htmlOutput = '
';
$htmlOutput .= '| ' .JText::_('Content'). ' | ' .JText::_('table exist'). ' | ' .JText::_('original total'). ' | ' .JText::_('Orphans'). ' | ';
if(is_array($langCodes)) {
foreach ($langCodes as $code) {
$htmlOutput .= '' .$code. ' | ';
}
}
$htmlOutput .= '
';
$ceName = '';
foreach ($originalStatus as $statusRow ) {
$href = 'index2.php?option=com_joomfish&task=overview&act=translate&catid='.$statusRow['catid'];
$htmlOutput .= '';
$htmlOutput .= '| ' .$statusRow['name']. ' | ';
$htmlOutput .= '' .($statusRow['missing_table'] ? JText::_('missing') : JText::_('valid')). ' | ';
$htmlOutput .= '' .$statusRow['total']. ' | ';
$htmlOutput .= '' .$statusRow['orphans']. ' | ';
if(is_array($langCodes)) {
foreach ($langCodes as $code) {
if( array_key_exists('langentry_' .$code, $statusRow)) {
$persentage = intval( ($statusRow['langentry_' .$code]*100) / $statusRow['total'] );
$htmlOutput .= '' .$persentage. '% | ';
} else {
$htmlOutput .= ' | ';
}
}
}
$htmlOutput .= '
';
}
if($message!='') {
$span = 4 + count($langCodes);
$htmlOutput .= '| ' .$message. ' |
';
}
$htmlOutput .= '
';
return $htmlOutput;
}
/**
* This method renders the information page for the copy process
*
* @param unknown_type $contentelements
*/
function renderCopyInformation($original2languageInfo, $message='', $langList=null) {
$htmlOutput = '';
if($message!='') {
$htmlOutput .= '' .$message. '
';
}
$htmlOutput .= '';
return $htmlOutput;
}
/**
* This method renders the information page for the copy process
*
* @param unknown_type $contentelements
*/
function renderCopyProcess($original2languageInfo, $message='') {
$htmlOutput = '';
$htmlOutput = '';
$htmlOutput .= '| ' .JText::_('Content'). ' | ' .JText::_('original total'). ' | ' .JText::_('processed'). ' | ' .JText::_('copied'). ' | ';
$htmlOutput .= '
';
$ceName = '';
foreach ($original2languageInfo as $statusRow ) {
$href = 'index2.php?option=com_joomfish&task=translate.overview&catid='.$statusRow['catid'];
$htmlOutput .= '';
$htmlOutput .= '| ' .$statusRow['name']. ' | ';
$htmlOutput .= '' .$statusRow['total']. ' | ';
$htmlOutput .= '' .$statusRow['processed']. ' | ';
$htmlOutput .= '' .$statusRow['copied']. ' | ';
$htmlOutput .= '
';
}
if($message!='') {
$htmlOutput .= '| ' .$message. ' |
';
}
$htmlOutput .= '
';
return $htmlOutput;
}
}