/** * Displays the xtpl, either echo or returning the contents * * @param echo bool echo or return contents * */ function display($echo = true) { $str = parent::display(); $strend = parent::displayEnd(); $this->xtpl->parse($this->main_block); if ($echo) { echo $str; $this->xtpl->out($this->main_block); echo $strend; } else { return $str . $this->xtpl->text() . $strend; } }
/** * Displays the xtpl, either echo or returning the contents * * @param end bool display the ending of the listview data (ie MassUpdate) * */ function display($end = true) { if (!$this->should_process) { return $GLOBALS['app_strings']['LBL_SEARCH_POPULATE_ONLY']; } global $app_strings, $sugar_version, $sugar_flavor, $server_unique_key, $currentModule, $app_list_strings; $this->ss->assign('moduleListSingular', $app_list_strings["moduleListSingular"]); $this->ss->assign('moduleList', $app_list_strings['moduleList']); $this->ss->assign('data', $this->data['data']); $this->ss->assign('query', $this->data['query']); $this->ss->assign('sugar_info', array("sugar_version" => $sugar_version, "sugar_flavor" => $sugar_flavor)); $this->data['pageData']['offsets']['lastOffsetOnPage'] = $this->data['pageData']['offsets']['current'] + count($this->data['data']); $this->ss->assign('pageData', $this->data['pageData']); $navStrings = array('next' => $app_strings['LNK_LIST_NEXT'], 'previous' => $app_strings['LNK_LIST_PREVIOUS'], 'end' => $app_strings['LNK_LIST_END'], 'start' => $app_strings['LNK_LIST_START'], 'of' => $app_strings['LBL_LIST_OF']); $this->ss->assign('navStrings', $navStrings); $displayEmptyDataMessages = TRUE; //TODO: Cleanup, better logic for which modules are exempt from the new messaging. $modulesExemptFromEmptyDataMessages = array('WorkFlow', 'ContractTypes', 'OAuthKeys', 'TimePeriods'); if (isset($GLOBALS['moduleTabMap'][$currentModule]) && $GLOBALS['moduleTabMap'][$currentModule] == 'Administration' || isset($GLOBALS['adminOnlyList'][$currentModule]) || in_array($currentModule, $modulesExemptFromEmptyDataMessages)) { $displayEmptyDataMessages = FALSE; } $this->ss->assign('displayEmptyDataMesssages', $displayEmptyDataMessages); $str = parent::display(); $strend = $this->displayEnd(); return $str . $this->ss->fetch($this->tpl) . ($end ? $strend : ''); }
/** * Displays the xtpl, either echo or returning the contents * * @param end bool display the ending of the listview data (ie MassUpdate) * */ function display($end = true) { if (!$this->should_process) { return $GLOBALS['app_strings']['LBL_SEARCH_POPULATE_ONLY']; } global $app_strings; $this->ss->assign('data', $this->data['data']); $this->data['pageData']['offsets']['lastOffsetOnPage'] = $this->data['pageData']['offsets']['current'] + count($this->data['data']); $this->ss->assign('pageData', $this->data['pageData']); $navStrings = array('next' => $app_strings['LNK_LIST_NEXT'], 'previous' => $app_strings['LNK_LIST_PREVIOUS'], 'end' => $app_strings['LNK_LIST_END'], 'start' => $app_strings['LNK_LIST_START'], 'of' => $app_strings['LBL_LIST_OF']); $this->ss->assign('navStrings', $navStrings); $str = parent::display(); $strend = parent::displayEnd(); return $str . $this->ss->fetch($this->tpl) . ($end ? '<br><br>' . $strend : ''); }