westdc-zf1/application/default/views/scripts/archives/list.phtml

68 lines
1.9 KiB
PHTML
Raw Normal View History

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('新闻中心');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/archives/">新闻中心</a>');
$this->breadcrumb($this->title);
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="row">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<?php
if(count($this->types))
{
foreach($this->types as $k=>$v)
{
$haed = "";
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
echo '<li><a href="'.$v['url'].'">'.$haed.$v['title'].'</a></li>';
$haed = "";
}
}
?>
</ul>
</div>
</div>
<div class="span9">
<div class="archives_list">
<ul class="unstyled">
<?php
if(count($this->paginator))
{
foreach ($this->paginator as $v)
{
$description = "";
if(empty($v['description']))
{
$description = "No description";
}else if (mb_strlen($v['description'])>160)
{
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="'.$v['url'].'" class="more">(more)</a>';
}else{
$description = $v['description'];
}
echo '<li style="overflow:hidden;border-bottom:1px dashed #ccc;"><small class="pull-right">TIME&nbsp;:&nbsp;'.date("Y-m-d H:i",strtotime( $v['ts_published'] )).'</small>';
if(!empty($v['image']))
{
echo '<img src="'.$v['image'].'" style="max-height:60px;float:left;" />';
}
echo '<h4><a href="'.$v['url'].'" class="title">'.$v['title'].'</a></h4>
<p>'.$description.'</p>
</li>';
}
}
else
{
echo '暂无数据';
}
?>
</ul>
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>