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

70 lines
2.1 KiB
PHTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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(' > ');
$this->headLink()->appendStylesheet('/css/news.css');
?>
<div class="row">
<div class="span3">
<div class="bs-review-nav sidebar-nav">
<ul class="nav nav-list bs-review-sidenav">
<li><a href="/archives"><i class="icon-chevron-right"></i>新闻中心</a></li>
<?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'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
$haed = "";
}
}
?>
</ul>
</div>
</div>
<div class="span9">
<ul class="media-list">
<?php
if(count($this->paginator))
{
foreach ($this->paginator as $v)
{
$description = "";
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'];
}
?>
<li class="media">
<?php if(!empty($v['image'])) : ?>
<a class="pull-right" href="<?php echo $v['url']; ?>"><img class="media-object span2 img-rounded" data-src="holder.js/64x64" src="<?php echo $v['image']; ?>"></a>
<?php endif; ?>
<div class="media-body">
<h4 class="media-heading">
<small>[<?php echo date("Y-m-d",strtotime( $v['ts_published'] )); ?>]</small>
<a href="<?php echo $v['url']; ?>"><?php echo $v['title']; ?></a>
</h4>
<p><?php echo $description; ?></p>
</div>
</li>
<?php
}
}
else
{
echo '暂无数据';
}
?>
</ul>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>