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

75 lines
2.2 KiB
PHTML
Raw Normal View History

<?php
2012-04-12 04:06:58 +00:00
$this->headTitle($this->config->title->site);
$this->headTitle('新闻中心');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/news.css');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/news">新闻中心</a>');
$this->breadcrumb($this->title);
$this->breadcrumb()->setSeparator(' > ');
?>
<div class="full center clear" id="body">
<div class="w300 Lfloat clear">
<div class="tbox">
2012-04-12 04:06:58 +00:00
<div class="title">新闻分类</div>
<div class="content navmenu">
<ul>
<?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="/news/'.$v['code'].'">'.$haed.$v['title'].'</a></li>';
$haed = "";
}
}
?>
</ul>
</div>
</div>
</div>
<div class="Rfloat clear" id="archives_list">
<div class="archives_list">
<ul>
<?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)
{
2012-11-27 03:57:27 +00:00
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="/news/'.$v['code'].'/archive-'.$v['id'].'.html" class="more">(more)</a>';
}else{
$description = $v['description'];
}
2012-11-05 08:39:15 +00:00
echo '<li>';
if(!empty($v['image']))
{
echo '<img src="'.$v['image'].'" style="max-height:200px;float:left;" />';
}
2012-11-27 03:57:27 +00:00
echo '<a href="/news/'.$v['code'].'/archive-'.$v['id'].'.html" class="title">'.$v['title'].'</a><br />
<small>TIME&nbsp;:&nbsp;'.date("Y-m-d H:i",strtotime( $v['ts_published'] )).'</small>
<p>'.$description.'</p>
</li>';
}
}
else
{
echo '暂无数据';
}
?>
</ul>
</div>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
<script>
$('#archives_list').width($('#body').width()-320);
</script>