修改了分页类中提供的样式
This commit is contained in:
parent
ac2fc22970
commit
505d5a9776
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->data);
|
$this->headTitle($this->config->title->data);
|
||||||
|
|
||||||
$this->headTitle('高级搜索');
|
$this->headTitle('高级搜索');
|
||||||
if (!empty($this->codename)) $this->headTitle($this->codename);
|
if (!empty($this->codename)) $this->headTitle($this->codename);
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
@ -13,7 +12,7 @@ $this->breadcrumb('高级搜索');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api);
|
$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api);
|
||||||
?>
|
?>
|
||||||
<div id='tools'>
|
<div>
|
||||||
<?= $this->partial('data/tools.phtml'); ?>
|
<?= $this->partial('data/tools.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($this->metadata)) :
|
<?php if (!empty($this->metadata)) :
|
||||||
|
|
|
@ -57,50 +57,52 @@ class Pagination
|
||||||
public function getNavigation()
|
public function getNavigation()
|
||||||
{
|
{
|
||||||
if ($this->_itemCount<$this->_pageSize) return '';
|
if ($this->_itemCount<$this->_pageSize) return '';
|
||||||
$navigation = '<div class="PageNavigation">';
|
$navigation = '<div class="pagination" style="line-height:14px">';
|
||||||
$navigation .= "共有".$this->_typestr."<em>$this->_itemCount</em>条 \n";
|
$navigation .= "<ul>";
|
||||||
|
$navigation .= "<li><span>共有".$this->_typestr."<em>$this->_itemCount</em>条</span></li> \n";
|
||||||
|
|
||||||
$pageCote = ceil($this->_currentPage / ($this->_navigationItemCount - 1)) - 1; //当前页处于第几栏分页
|
$pageCote = ceil($this->_currentPage / ($this->_navigationItemCount - 1)) - 1; //当前页处于第几栏分页
|
||||||
$pageCoteCount = ceil($this->_pageCount / ($this->_navigationItemCount - 1)); //总分页栏
|
$pageCoteCount = ceil($this->_pageCount / ($this->_navigationItemCount - 1)); //总分页栏
|
||||||
$pageStart = $pageCote * ($this->_navigationItemCount -1) + 1; //分页栏中起始页
|
$pageStart = $pageCote * ($this->_navigationItemCount -1) + 1; //分页栏中起始页
|
||||||
$pageEnd = $pageStart + $this->_navigationItemCount - 1; //分页栏中终止页
|
$pageEnd = $pageStart + $this->_navigationItemCount - 1; //分页栏中终止页
|
||||||
|
|
||||||
if($this->_pageCount < $pageEnd)
|
if($this->_pageCount < $pageEnd)
|
||||||
{
|
{
|
||||||
$pageEnd = $this->_pageCount;
|
$pageEnd = $this->_pageCount;
|
||||||
}
|
}
|
||||||
if($pageCote > 0) //首页导航
|
if($pageCote > 0) //首页导航
|
||||||
{
|
{
|
||||||
$navigation .= '<a href="'.$this->createHref(1)."\">$this->_firstPageString</a> ";
|
$navigation .= '<li><a href="'.$this->createHref(1)."\">$this->_firstPageString</a></li> ";
|
||||||
}
|
}
|
||||||
if($this->_currentPage != 1) //上一页导航
|
if($this->_currentPage != 1) //上一页导航
|
||||||
{
|
{
|
||||||
$navigation .= '<a href="'.$this->createHref($this->_currentPage-1);
|
$navigation .= '<li><a href="'.$this->createHref($this->_currentPage-1);
|
||||||
$navigation .= "\">$this->_previousPageString</a> ";
|
$navigation .= "\">$this->_previousPageString</a></li> ";
|
||||||
}
|
}
|
||||||
while ($pageStart <= $pageEnd) //构造数字导航区
|
while ($pageStart <= $pageEnd) //构造数字导航区
|
||||||
{
|
{
|
||||||
if($pageStart == $this->_currentPage)
|
if($pageStart == $this->_currentPage)
|
||||||
{
|
{
|
||||||
$navigation .= "<strong>$pageStart</strong> ";
|
$navigation .= '<li class="active"><a href="javascript:;">'.$pageStart.'</a></li> ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$navigation .= '<a href="'.$this->createHref($pageStart)."\">$pageStart</a> ";
|
$navigation .= '<li><a href="'.$this->createHref($pageStart)."\">$pageStart</a></li> ";
|
||||||
}
|
}
|
||||||
$pageStart++;
|
$pageStart++;
|
||||||
}
|
}
|
||||||
if($this->_currentPage != $this->_pageCount) //下一页导航
|
if($this->_currentPage != $this->_pageCount) //下一页导航
|
||||||
{
|
{
|
||||||
$navigation .= '<a href="'.$this->createHref($this->_currentPage+1)."\">$this->_nextPageString</a> ";
|
$navigation .= '<li><a href="'.$this->createHref($this->_currentPage+1)."\">$this->_nextPageString</a></li> ";
|
||||||
}
|
}
|
||||||
if($pageCote < $pageCoteCount-1) //未页导航
|
if($pageCote < $pageCoteCount-1) //未页导航
|
||||||
{
|
{
|
||||||
$navigation .= '<a href="'.$this->createHref($this->_pageCount)."\">$this->_lastPageString</a> ";
|
$navigation .= '<li><a href="'.$this->createHref($this->_pageCount)."\">$this->_lastPageString</a></li> ";
|
||||||
}
|
}
|
||||||
//添加直接导航框
|
//添加直接导航框
|
||||||
$navigation .= '<input type="text" size="3" onkeydown="if(event.keyCode==13){window.location=\' ';
|
$navigation .= '<input type="text" size="3" class="input-mini" onkeydown="if(event.keyCode==13){window.location=\' ';
|
||||||
$navigation .= $this->createHref().'\'+this.value;return false;}" />';
|
$navigation .= $this->createHref().'\'+this.value;return false;}" />';
|
||||||
$navigation .= "</div>";
|
$navigation .= "</ul></div>";
|
||||||
return $navigation;
|
return $navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue