69 lines
1.9 KiB
PHTML
69 lines
1.9 KiB
PHTML
|
<?php
|
||
|
$config = Zend_Registry::get('config');
|
||
|
$this->headTitle($config->title->site);
|
||
|
$this->headTitle('News');
|
||
|
$this->headTitle()->setSeparator(' - ');
|
||
|
$this->headLink()->appendStylesheet('/css/news.css');
|
||
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||
|
$this->breadcrumb('<a href="/">Home</a>');
|
||
|
$this->breadcrumb('<a href="/news">News</a>');
|
||
|
$this->breadcrumb($this->title);
|
||
|
$this->breadcrumb()->setSeparator(' > ');
|
||
|
?>
|
||
|
<div class="full center clear" id="body">
|
||
|
<div class="w300 Lfloat clear">
|
||
|
<div class="tbox">
|
||
|
<div class="title">Navigation</div>
|
||
|
<div class="content navmenu">
|
||
|
<ul>
|
||
|
<?php
|
||
|
if(count($this->types))
|
||
|
{
|
||
|
foreach($this->types as $k=>$v)
|
||
|
{
|
||
|
echo '<li><a href="/news/'.$v['url'].'">'.$v['title'].'</a></li>';
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
</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)
|
||
|
{
|
||
|
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="/news/'.$v['url'].'/archive-'.$v['id'].'.html" class="more">(more)</a>';
|
||
|
}else{
|
||
|
$description = $v['description'];
|
||
|
}
|
||
|
echo '<li>
|
||
|
<a href="/news/'.$v['url'].'/archive-'.$v['id'].'.html" class="title">'.$v['title'].'</a><br />
|
||
|
<small>TIME : '.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>
|