[render 渲染分页html]
@param  [type] $total_count [总记录数]
@return [type]              [description]
15795
public function render($total_count=null)
    {
        if ($this->hasPages()) {
            if (!empty($total_count)) {
                if ($this->simple) {
                    return sprintf('<nav aria-label="Page navigation" class="text-center"><ul class="pagination"><li><i class="count">共'. ceil($total_count/config('manage_rows_num')) .'页，每页'. config('manage_rows_num') .'条数据</i></li>%s %s<li><i class="count">跳转到</i></li><li><form action="" class="search-form" method="get"><input type="text" class="go_page" value="'. input('page') .'" style="width:35px;"><input type="submit" name="page" class="go" value="GO" /></form></li></ul></nav>', $this->getPreviousButton(), $this->getNextButton());
                } else {
                    return sprintf('<nav aria-label="Page navigation" class="text-center"><ul class="pagination"><li><i class="count">共'. ceil($total_count/config('manage_rows_num')) .'页，每页'. config('manage_rows_num') .'条数据</i></li>%s %s %s<li><i class="count">跳转到</i></li><li><form action="" class="search-form" method="get"><input type="text" name="page" class="go_page" value="'. input('page') .'" style="width:35px;"><input type="submit" class="go" value="GO" /></form></li></ul></nav>', $this->getPreviousButton(), $this->getLinks(), $this->getNextButton());
                }
            } else {
                if ($this->simple) {
                    return sprintf('<nav aria-label="Page navigation" class="text-center"><ul class="pagination">%s %s %s</ul></nav>', $this->getPreviousButton(), $this->getNextButton());
                } else {
                    return sprintf('<nav aria-label="Page navigation" class="text-center"><ul class="pagination">%s %s %s</ul></nav>', $this->getPreviousButton(), $this->getLinks(), $this->getNextButton());
                }
            }
            
        }

    }
1262413
public function render($_template)
    {
        $level = ob_get_level();
        ob_start();
        try {
            $this->renderUncompiled($_template->source, $_template);
            return ob_get_clean();
        }
        catch (Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
            throw $e;
        }
    }
624734
public function render() {
		$tabsList = new ListUnordered();
		$tabsList->setSeparator('');
		$tabsList->addClass('debug-bar');
		$tabsList->id = 'debug-elements';
		
		$panels = '';
		
		foreach ($this->info as $info) {
			$tabElement = $this->createTab($info);
			
			if (! $info->isEmpty()) {
				$id = 'debug-panel-' . substr(md5(rand(0, 1000) . $info->getName()), 24);
			
				$tabElement->addClass('withpanel clickable');
				$tabElement->setAttr('data-panel-id', $id);
				
				$panelTag = $this->createPanel($info);
				$panelTag->id = $id;
				
				$panels .= $panelTag->render();
			}
			
			$tabsList->addElement($tabElement);
		}
		
		$styleTag  = new Tag('style', $this->getAsset('bar.css'));
		$scriptTag = new Script($this->getAsset('bar.js'));
		
		$wrapperTag = new Tag('div', $tabsList->render(), 'debug-bar-wrapper');
		$debugTag   = new Tag('div', $panels . $wrapperTag->render(), 'debug-main');
		
		return $styleTag->render() . $scriptTag->render() . $debugTag->render();
	}
1080689
public function _render()
    {
        $ret = $this->prepend;
        if ($this->library) {
            $ret .= $this->library;
        } else {
            if ($this->str) {
                $ret .= "$('#".$this->owner->getJSID()."')";
            }
        }
        $ret .= $this->str;

        if ($this->enclose === true) {
            if ($this->preventDefault) {
                $ret = 'function(ev,ui){ev.preventDefault();ev.stopPropagation(); '.$ret.'}';
            } else {
                $ret = 'function(ev,ui){'.$ret.'}';
            }
        } elseif ($this->enclose) {
            $ret = ($this->library ?: "$('#".$this->owner->getJSID()."')").
                    ".bind('".$this->enclose."',function(ev,ui){ev.preventDefault();ev.stopPropagation(); ".$ret.'})';
        }

        if (@$this->debug) {
            echo "<font color='blue'>".htmlspecialchars($ret).';</font><br/>';
            $this->debug = false;
        }

        return $ret;
    }
570385
function render() {
  var content = $($.parseHTML(template));
  var compiler = Handlebars.compile(content.filter("#layout").html());

  Handlebars.registerPartial({
    leftPanel: content.filter("#left-panel").html(),
    rightPanel: content.filter("#right-panel").html(),
    transactionList: content.filter("#transaction-list").html(),
    transactionDetails: content.filter("#transaction-details").html(),
    transactionOther: content.filter("#transaction-other").html(),
  });

  // Adds selected class to selected transaction item.
  Handlebars.registerHelper('isSelected', function(options) {
    var resp =
      (this.business === dataView.selectedTransaction.business) ?
      "selected" : "";
    return options.fn(resp);
  });

  // Returns fake detail monthly total.
  Handlebars.registerHelper('monthlyTotal', function(options) {
    var total = toCurrency(parseFloat(this.selectedTransaction.amount) * 12);
    return options.fn(total);
  });

  // Returns fake detail yearly total.
  Handlebars.registerHelper('yearlyTotal', function(options) {
    var total = toCurrency(parseFloat(this.selectedTransaction.amount) * 40);
    return options.fn(total);
  });

  var html = compiler(dataView);
  $("#demo-app").html(html);

  addClickHandler();
}
347420
public function iterNextPage($count = 3)
    {
        if ($this->getPage() == 1 && $this->getPagesCount() >= $count * 2) {
            $count *= 2;
        }
        $pages = [];
        foreach (range(1, $count) as $i) {
            $page = $this->getPage() + $i;
            if ($page <= $this->getPagesCount()) {
                $pages[] = $page;
            }
        }

        return $pages;
    }
676906
public function renderChunk($rowsNumber)
    {
        /** @var ActiveDataProvider $dataProvider */
        $dataProvider = $this->grid->dataProvider;
        /** @var \yii\db\ActiveQuery $query */
        $query = $dataProvider->query;

        $result = '';
        if ($this->rowNumber === 0) {
            $result .= $this->renderHeader();
        }
        $rowCount = $this->dataReader->getRowCount();
        for ($i = 0; $i < $rowsNumber || $rowsNumber === -1; $i++) {
            $row = $this->dataReader->read();
            if ($row === false) {
                $this->dataReader = null;
                $result .= $this->renderFooter();
                break;
            }
            $models = $query->populate([$row]);

            $result .= $this->renderRow(reset($models), $this->rowNumber++, $rowCount);
        }
        return $result;
    }
962108
public function render()
    {
        if (!$this->visible) {
            return;
        }

        SwatCellRenderer::render();

        if ($this->value === null && $this->null_display_value !== null) {
            $this->renderNullValue();
        } elseif ($this->value !== null) {
            $locale = SwatI18NLocale::get();

            $value = $this->getDisplayValue();
            $difference = $this->maximum_value - $value;

            $rating_class = floor(10 * min($value, $this->maximum_value));
            $rating_class = 'rating-' . $rating_class;

            $outer_span = new SwatHtmlTag('span');
            $outer_span->class = 'rating ' . $rating_class;
            $outer_span->open();

            $content = str_repeat('★', ceil($value));
            if ($difference > 0) {
                $content .= str_repeat('☆', floor($difference));
            }

            $value_tag = new SwatHtmlTag('span');
            $value_tag->setContent($content);
            $value_tag->class = 'value';
            $value_tag->title = $locale->formatNumber($value, 1);
            $value_tag->display();

            $best_tag = new SwatHtmlTag('span');
            $best_tag->class = 'best';
            $best_tag->title = $locale->formatNumber($this->maximum_value, 1);
            $best_tag->setContent('');
            $best_tag->display();

            $outer_span->close();
        }
    }
829386
private function render() {
		$strings = implode($this->strings);
		
		// Render includes
		foreach ($this->incTemplates as $path => $include) {
			$incOutput = $include->render();
			$path = preg_replace("/\//", "\/", $path);
			$strings = preg_replace("/\{include\s$path\}/", $incOutput, $strings);
		}
		
		// Render if-statements
		foreach ($this->ifTemplates as $key => $sub) {
			foreach ($sub as $iKey => $instance) {
				$str = '';
				
				if ($this->expressions[$key]->evaluate($this->vars)) {
					$str = $instance->render();
				}
				
				$pregKey = preg_quote($key, '/');
				$strings = preg_replace("/\{if:$pregKey:$iKey\}/", $str, $strings);
			}
		}
		
		// Render foreach-loops
		foreach ($this->forTemplates as $key => $sub) {
			foreach ($sub as $iKey => $instance) {
				$tmplGen = '';
				
				if (isset($this->vars[$key]) && is_array($this->vars[$key])) {
					foreach ($this->vars[$key] as $assocArray) {
						foreach ($assocArray as $k => $v)
							$instance->set($k, $v);
						$tmplGen .= $instance->render();
					}
				}
				
				$pregKey = preg_quote($key, '/');
				$strings = preg_replace("/\{for:$pregKey:$iKey\}/", $tmplGen, $strings);
			}
		}
		
		// Render plain old variables
		foreach ($this->vars as $key => $val) {
			if (!is_array($val))
				$strings = preg_replace("/\{$key\}/", $val, $strings);
		}
		
		// Render expressions
		foreach ($this->expressions as $key => $expr) {
			$eval = $expr->evaluate($this->vars);

			// If we're an array, lets insert the number of items in the array.
			if ( is_array( $eval ) ) {
				$eval = count( $eval );
			}

			$pregKey = preg_quote($key, '/');
			
			$strings = preg_replace('/\{'.$pregKey.'\}/', $eval, $strings);
		}
		
		$strings = preg_replace("/\\\{/", '{', $strings);
		$strings = preg_replace("/\\\}/", '}', $strings);

		return $strings;
	}
246289
function renderLast($tag = 'Última') {
        if ($this->total_rows == 0)
            return FALSE;
         
        if ($this->page == $this->max_pages) {
            return $tag;
        } else {
            //return ' <a href="' . $this->php_self . '?page=' . $this->max_pages . '&' . $this->append . '">' . $tag . '</a>';
            $pageno = $this->max_pages;
            return " <a href='javascript:void(0);' OnClick='getdata( $pageno )' title='Última'>$tag</a> ";
        }
    }
1229645
public function pages_render()
	{
		// no links if we only have one page
		if ($this->config['total_pages'] == 1)
		{
			return '';
		}

		$html = '';

		// calculate start- and end page numbers
		$start = $this->config['calculated_page'] - floor($this->config['num_links'] * $this->config['link_offset']);
		$end = $this->config['calculated_page'] + floor($this->config['num_links'] * ( 1 - $this->config['link_offset']));

		// adjust for the first few pages
		if ($start < 1)
		{
			$end -= $start - 1;
			$start = 1;
		}

		// make sure we don't overshoot the current page due to rounding issues
		if ($end < $this->config['calculated_page'])
		{
			$start++;
			$end++;
		}

		// make sure we don't overshoot the total
		if ($end > $this->config['total_pages'])
		{
			$start = max(1, $start - $end + $this->config['total_pages']);
			$end = $this->config['total_pages'];
		}

		for($i = intval($start); $i <= intval($end); $i++)
		{
			if ($this->config['calculated_page'] == $i)
			{
				$html .= str_replace(
				    '{link}',
				    str_replace(array('{uri}', '{page}'), array('#', $i), $this->template['active-link']),
				    $this->template['active']
				);
				$this->raw_results[] = array('uri' => '#', 'title' => $i, 'type' => 'active');
			}
			else
			{
				$html .= str_replace(
				    '{link}',
				    str_replace(array('{uri}', '{page}'), array($this->_make_link($i), $i), $this->template['regular-link']),
				    $this->template['regular']
				);
				$this->raw_results[] = array('uri' => $this->_make_link($i), 'title' => $i, 'type' => 'regular');
			}
		}

		return $html;
	}
1288147
public function get_total_responses_count() {
        global $DB;
        if ($this->grandtotal === null) {
            $this->grandtotal = $DB->count_records_sql($this->countsql, $this->countparams);
        }
        return $this->grandtotal;
    }
239079
public function renderTableBody()
	{
		$data=$this->dataProvider->getData();
		$n=count($data);
		echo "<tbody>\n";

		if($n>0)
		{
			for($row=0;$row<$n;++$row)
				$this->renderTableRow($row);
		}
		else
		{
			echo '<tr><td colspan="'.count($this->columns).'" class="empty">';
			$this->renderEmptyText();
			echo "</td></tr>\n";
		}
		echo "</tbody>\n";
	}
1079734
private void renderTotalsRow() {
        docBuilder.append("12+^|*"+ i18n.getMessage("summary.total")+"*", newLine()).
            append(tableCol(), scenarioTotalizationsCache.getTotalPassedScenarios(), tableCol(), scenarioTotalizationsCache.getTotalFailedScenarios()).
                append(tableCol(), scenarioTotalizationsCache.getTotalScenarios()).
                append(tableCol(), scenarioTotalizationsCache.getTotalPassedSteps(), tableCol(), scenarioTotalizationsCache.getTotalFailedSteps()).
                append(tableCol(), scenarioTotalizationsCache.getTotalSkippedSteps(), tableCol(), scenarioTotalizationsCache.getTotalPendingSteps()).
                append(tableCol(), scenarioTotalizationsCache.getTotalUndefinedSteps(), tableCol(), scenarioTotalizationsCache.getTotalMissingSteps()).
            append(tableCol(), scenarioTotalizationsCache.getTotalSteps(), " 2+", tableCol(), Formatter.formatTime(scenarioTotalizationsCache.getTotalDuration()));
        docBuilder.newLine();
    }
1374208
public function renderBasic() {
        $html = "<textarea rows='$this->rows'";
        $html .= " " . $this->getCompiledAttributes("form-control");
        $html .= ">";
        $html .= $this->value;
        $html .= "</textarea>";
        return $html;
    }
656822
function display_count($text_output) {
    $to_num = ($this->number_of_rows_per_page * $this->current_page_number);
    if ($to_num > $this->number_of_rows) $to_num = $this->number_of_rows;

    $from_num = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

    if ($to_num == 0) {
      $from_num = 0;
    } else {
      $from_num++;
    }

    if ($to_num <= 1) {
      // don't show count when 1
      return '';
    } else {
      return sprintf($text_output, $from_num, $to_num, $this->number_of_rows);
    }
  }
1313042
function renderSummary(totalErrors, totalWarnings) {
  var totalProblems = totalErrors + totalWarnings;
  var renderedText = totalProblems + ' ' + pluralize('problem', totalProblems);

  if (totalProblems !== 0) {
    renderedText += ' (' + totalErrors + ' ' + pluralize('error', totalErrors) + ', ' + totalWarnings + ' ' + pluralize('warning', totalWarnings) + ')';
  }
  return renderedText;
}