';
$this->xt->displayPartial(GetTemplateName($this->shortTableName, $this->pageType."_".$tabInfo['tabId']));
echo '
';
}
else
{
$this->xt->displayPartial(GetTemplateName($this->shortTableName, $this->pageType."_".$tabInfo['tabId']));
}
}
function displayTabGroup( $startIndex )
{
$tabs = $this->getArrTabs();
$firstTabId = $tabs[ $startIndex ][ 'tabId' ];
$tabGroupId = $tabs[ $startIndex ][ 'tabGroup' ];
if( !$tabGroupId || $tabs[ $startIndex ][ 'nType' ] != TAB_TYPE_TAB )
return;
// display all tabs as secions in PDF mode
if( $this->pdfMode )
{
for( $i = $startIndex ; $i < count($tabs); ++$i )
{
if( $tabGroupId != $tabs[$i]['tabGroup'] )
break;
$this->displaySection( $tabs[$i] );
}
return;
}
// display tab control
if( $this->getLayoutVersion() != BOOTSTRAP_LAYOUT )
{
echo '';
echo '
';
$selected = "selected";
for( $i = $startIndex ; $i < count($tabs); ++$i )
{
if( $tabGroupId != $tabs[$i]['tabGroup'] )
break;
echo '- ';
echo '' . $tabs[$i]['tabName'] . '
';
$selected = "";
}
echo '
';
// display tabs
echo '
';
$firstTab = true;
for( $i = $startIndex ; $i < count($tabs); ++$i )
{
if( $tabGroupId != $tabs[$i]['tabGroup'] )
break;
$layoutClasses = '';
$layout = GetPageLayout( $this->shortTableName, $this->pageType, $tabs[$i]['tabId'] );
if( $layout )
{
$this->AddCSSFile( $layout->getCSSFiles(isRTL(), $this->mobileTemplateMode(), $this->pdfMode != "" ) );
$layoutClasses = ' '.$layout->style." page-".$layout->name;
}
if( !$firstTab )
$layoutClasses.= ' rnr-hidden-tab-panel';
$firstTab = false;
echo '
';
$this->xt->displayPartial(GetTemplateName($this->shortTableName, $this->pageType."_".$tabs[$i]['tabId']));
echo "
";
}
echo '
';
}
else
{
// bootstrap tab control
/*
echo '';
$selected = "active";
for( $i = $startIndex ; $i < count($tabs); ++$i )
{
if( $tabGroupId != $tabs[$i]['tabGroup'] )
break;
$layout = GetPageLayout( $this->shortTableName, $this->pageType, $tabs[$i]['tabId'] );
if( $layout )
{
$this->AddCSSFile( $layout->getCSSFiles(isRTL(), $this->mobileTemplateMode(), $this->pdfMode != "" ) );
}
echo '
';
$this->xt->displayPartial(GetTemplateName($this->shortTableName, $this->pageType."_".$tabs[$i]['tabId']));
echo '
';
$selected = "";
}
echo '
';
}
}
function displayStep( $index )
{
$tabs = $this->getArrTabs();
$tabInfo = $tabs[ $index ];
$hiddenStyle = "";
if( $index != $this->initialStep )
{
$hiddenStyle = 'style="display:none"';
}
$layoutClasses = '';
$layout = GetPageLayout($this->shortTableName, $this->pageType, $tabInfo['tabId']);
if($layout)
{
$layoutClasses = ' '.$layout->style." page-".$layout->name;
$this->AddCSSFile($layout->getCSSFiles(isRTL(), $this->mobileTemplateMode(), $this->pdfMode != ""));
}
echo '';
$this->xt->displayPartial(GetTemplateName($this->shortTableName, $this->pageType."_".$tabInfo['tabId']));
echo '
';
}
/**
* Returns true is the page has multistepped layout
* @return boolean
*/
function isMultistepped()
{
return false;
}
function prepareSteps()
{
if( !$this->isMultistepped() )
return;
$steps = $this->getArrTabs();
if( count($steps) > 1 )
{
$this->xt->assign("prevStepButton", true);
$this->xt->assign("nextStepButton", true);
$this->xt->assign("nextstep_button_attrs", 'id="nextstep' . $this->id . '"');
$this->xt->assign("prevstep_button_attrs", 'id="prevstep' . $this->id . '"');
}
$this->xt->assign("stepnav_attrs", 'id="stepnav' . $this->id . '"');
}
protected function preparePdfControls()
{
if( !$this->viewPdfEnabled )
return;
if( $this->pdfMode )
return;
$this->controlsMap['printPdf'] = array();
$this->xt->assign("pdflink_block", true);
}
function formatReportFieldValue( $field, &$data, $keylink = "" )
{
if( $this->format == "excel" || $this->format == "word")
{
return $this->getExportValue($field, $data, $keylink);
}
return $this->showDBValue($field, $data, $keylink);
}
/**
*
*/
function getMasterTableInfo( $table = "")
{
if( $table == "" )
$table = $this->masterTable;
return $this->getMasterTableInfoByPSet($this->tName, $table, $this->pSet);
}
/**
* @param String tName
* @param String mtName
* @param ProjectSettings pSet
* @return Array
*/
protected function getMasterTableInfoByPSet( $tName, $mtName, $pSet )
{
$masterTablesInfoArr = $pSet->getMasterTablesArr( $tName );
if( !$masterTablesInfoArr )
return array();
foreach( $masterTablesInfoArr as $masterTableData )
{
if( $mtName == $masterTableData['mDataSourceTable'] )
return $masterTableData;
}
return array();
}
/**
* A wrapper for SearchClause::getSearchObject
* @return SearchClause
*/
public function getSearchObject()
{
return SearchClause::getSearchObject( $this->tName, $this->dashTName, $this->sessionPrefix, $this->cipherer, $this->searchSavingEnabled, $this->pSet );
}
public function displayMenu($menuTag, $menuType)
{
if( $menuTag != WELCOME_MENU )
$menuName = $this->pSet->getMenuName($this->xt->template_file, $menuTag, $menuType);
else
$menuName = $menuTag;
$menuStyle = $this->pSet->getMenuStyle($this->xt->template_file, $menuTag, $menuType);
if( $this->isAdminTable() )
$menuName = "adminarea";
$xt = new Xtempl();
$xt->assign("menuName", $menuName);
$xt->assign("menustyle", $menuStyle ? "second" : "main" );
if( $menuType == "quickjump" )
$menuMode = MENU_QUICKJUMP;
else if( $menuType == "horizontal" )
$menuMode = MENU_HORIZONTAL;
else
$menuMode = MENU_VERTICAL;
/* ??? */
if( !$this->isAdminTable() )
{
if( $menuMode != MENU_QUICKJUMP )
{
if( ProjectSettings::isMenuTreelike( $menuName ) )
{
if( MENU_VERTICAL == $menuMode )
$xt->assign("treeLikeTypeMenu",true);
else
$xt->assign("simpleTypeMenu",true);
}
else
{
if( !$this->mobileTemplateMode() )
$xt->assign("simpleTypeMenu",true);
else
$xt->assign("treeLikeTypeMenu",true);
}
}
if($this->pageType == PAGE_MENU && IsAdmin() && !$this->mobileTemplateMode())
$xt->assign("adminarea_link",true);
}
else
{
//Admin Area menu items
$xt->assign("adminAreaTypeMenu",true);
}
$menuRoot = $this->getMenuRoot( $menuName, $menuMode );
MenuItem::setMenuSession();
if($this->getLayoutVersion() == 3 && $menuRoot->isDrillDown() )
{
$peers = $this->prepareActiveMenuBranch( $menuRoot, $xt );
$menuRoot->setCurrMenuElem($xt);
// show only current menu item peers
}
else
{
// call xtempl assign, set session params
$menuRoot->assignMenuAttrsToTempl($xt);
$menuRoot->setCurrMenuElem($xt);
}
$xt->assign("mainmenu_block",true);
$mainmenu = array();
if(isEnableSection508())
$mainmenu["begin"]="