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

70 lines
2.1 KiB
PHTML
Raw Permalink 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);
2013-04-09 13:06:08 +00:00
$this->breadcrumb()->setSeparator(' > ');
2013-04-17 01:56:37 +00:00
$this->headLink()->appendStylesheet('/css/news.css');
?>
<div class="row">
<div class="span3">
2013-04-09 12:52:14 +00:00
<div class="bs-review-nav sidebar-nav">
2013-04-09 13:06:08 +00:00
<ul class="nav nav-list bs-review-sidenav">
2013-04-09 12:52:14 +00:00
<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]);}
2013-04-09 12:52:14 +00:00
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">
2013-04-09 12:52:14 +00:00
<ul class="media-list">
<?php
if(count($this->paginator))
{
foreach ($this->paginator as $v)
{
2013-04-09 13:06:08 +00:00
$description = "";
2013-04-09 12:52:14 +00:00
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'];
2013-04-09 13:06:08 +00:00
}
?>
<li class="media">
<?php if(!empty($v['image'])) : ?>
2013-04-09 13:29:21 +00:00
<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>
2013-04-09 13:06:08 +00:00
<?php endif; ?>
2013-04-09 12:52:14 +00:00
<div class="media-body">
2013-04-09 13:06:08 +00:00
<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>
2013-04-09 12:52:14 +00:00
<p><?php echo $description; ?></p>
</div>
2013-04-09 13:06:08 +00:00
</li>
2013-04-09 12:52:14 +00:00
<?php
}
}
else
{
echo '暂无数据';
}
?>
</ul>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
2013-04-09 13:06:08 +00:00
</div>