示例#1
0
 /**
  * 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;
     $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 : '');
 }