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