修改新闻界面
This commit is contained in:
parent
2005bbb88e
commit
f2349b58a0
|
@ -108,6 +108,7 @@ class ArchivesController extends Zend_Controller_Action
|
|||
|
||||
$this->view->url = $row['code'];
|
||||
$this->view->title = $row['title'];
|
||||
$this->view->type=$type;
|
||||
|
||||
$category = new ArchiveCategory($this->db);
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
if(!empty($this->infos['keyword'])) $keyword = $this->infos['keyword']; else $keyword = $this->infos['title'];
|
||||
$this->headMeta()->appendName('keywords', $keyword);
|
||||
$this->headMeta()->appendName('description', mb_substr($this->infos['description'],0,180,'utf-8'));
|
||||
$this->headLink()->appendStylesheet('/css/mdreview.css');
|
||||
?>
|
||||
<style>
|
||||
td{word-break:break-all;word-wrap:break-word;overflow:hidden;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<ul class="nav nav-list">
|
||||
<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))
|
||||
{
|
||||
|
@ -26,7 +25,7 @@ td{word-break:break-all;word-wrap:break-word;overflow:hidden;}
|
|||
{
|
||||
$haed = "";
|
||||
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
|
||||
echo '<li><a href="'.$v['url'].'">'.$haed.$v['title'].'</a></li>';
|
||||
echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
|
||||
$haed = "";
|
||||
}
|
||||
}
|
||||
|
@ -41,20 +40,16 @@ td{word-break:break-all;word-wrap:break-word;overflow:hidden;}
|
|||
<?php foreach($this->mdinfo as $v){ ?>
|
||||
<div class="info">相关数据:《<a href="/data/<?= $v['uuid']?>"><?= $v['title']?></a>》</div>
|
||||
<?php } } ?>
|
||||
<div class="archive_content">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="media">
|
||||
<?php
|
||||
if(!empty($this->infos['image']))
|
||||
{
|
||||
echo '<div id="archive_img" class="text-center"><img src="'.$this->infos['image'].'" class="img-polaroid" /></div>';
|
||||
echo ' <a class="pull-left" href="#"><img class="media-object" src="'.$this->infos['image'].'" data-src="holder.js/128x128" /></a>';
|
||||
}
|
||||
?>
|
||||
<div class="media-body">
|
||||
<?php echo $this->infos['body'];?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,11 +5,13 @@ $this->headTitle()->setSeparator(' - ');
|
|||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('新闻中心');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headLink()->appendStylesheet('/css/mdreview.css');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<ul class="nav nav-list">
|
||||
<div class="sidebar-nav bs-review-nav">
|
||||
<ul class="nav nav-list bs-review-sidenav">
|
||||
<li class="active"><a href="/archies"><i class="icon-chevron-right"></i>新闻中心</a></li>
|
||||
<?php
|
||||
if(count($this->types))
|
||||
{
|
||||
|
@ -17,7 +19,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
{
|
||||
$haed = "";
|
||||
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
|
||||
echo '<li><a href="'.$v['url'].'">'.$haed.$v['title'].'</a></li>';
|
||||
echo '<li><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
|
||||
$haed = "";
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +38,8 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
<div class="list-content">
|
||||
<ul class="unstyled">
|
||||
<?php foreach($v['list'] as $arc){?>
|
||||
<li><a href="<?= $arc['url']?>"><?= $arc['title'] ?></a></li>
|
||||
<li><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small>
|
||||
<a href="<?= $arc['url']?>"><?= $arc['title'] ?></a></li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -6,11 +6,13 @@ $this->breadcrumb('<a href="/">首页</a>');
|
|||
$this->breadcrumb('<a href="/archives/">新闻中心</a>');
|
||||
$this->breadcrumb($this->title);
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headLink()->appendStylesheet('/css/mdreview.css');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<div class="well sidebar-nav">
|
||||
<ul class="nav nav-list">
|
||||
<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))
|
||||
{
|
||||
|
@ -18,7 +20,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
{
|
||||
$haed = "";
|
||||
if(!empty($v[$this->deepField])) {$haed = str_repeat(' ',$v[$this->deepField]);}
|
||||
echo '<li><a href="'.$v['url'].'">'.$haed.$v['title'].'</a></li>';
|
||||
echo '<li'.($v['code']==$this->type?' class="active"':'').'><a href="'.$v['url'].'"><i class="icon-chevron-right"></i>'.$haed.$v['title'].'</a></li>';
|
||||
$haed = "";
|
||||
}
|
||||
}
|
||||
|
@ -27,33 +29,33 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
</div>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div class="archives_list">
|
||||
<ul class="unstyled">
|
||||
<ul class="media-list">
|
||||
<?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)
|
||||
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 : '.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>';
|
||||
?>
|
||||
<li class="media">
|
||||
<?php if(!empty($v['image'])) : ?>
|
||||
<a class="pull-left" href="#"><img class="media-object" 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
|
||||
|
@ -62,7 +64,6 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue