2011-10-21 08:12:04 +00:00
|
|
|
<?php
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
$this->headTitle('后台管理');
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
2012-03-27 07:02:36 +00:00
|
|
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
2012-04-09 07:50:57 +00:00
|
|
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
|
|
|
$this->headLink()->appendStylesheet('/css/author.css');
|
2012-11-27 03:57:27 +00:00
|
|
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
2012-04-12 04:04:23 +00:00
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
2012-03-27 07:02:36 +00:00
|
|
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
|
|
|
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
|
|
|
|
$this->breadcrumb('新闻列表');
|
2011-10-21 08:12:04 +00:00
|
|
|
?>
|
2014-09-13 02:18:32 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="hidden-sm hidden-xs col-md-2">
|
|
|
|
<?= $this->partial('news/left.phtml'); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-10 col-sm-12">
|
|
|
|
<?php if ($this->msg or $this->messages) :?>
|
|
|
|
<div id="message" class="alert alert-info">
|
|
|
|
<?php if ($this->msg) : ?>
|
|
|
|
<p><?php echo $this->msg; ?></p>
|
|
|
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
|
|
|
<p><?php echo $msg; ?></p>
|
|
|
|
<?php endforeach;endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="form-group col-md-4 form-inline row-no-padding-left">
|
|
|
|
<select id="navigation" class="form-control">
|
|
|
|
<option value="/admin/news/newslist/type/<?php echo $this->type;?>">按栏目查看</option>
|
|
|
|
<?php
|
|
|
|
if(count($this->types))
|
|
|
|
{
|
|
|
|
foreach($this->types as $v)
|
|
|
|
{
|
|
|
|
$haed="";
|
|
|
|
if(!empty($v[$this->deepField])) {$haed = str_repeat('-',$v[$this->deepField]);}
|
|
|
|
if($this->type == $v['id'])
|
|
|
|
echo '<option value="/admin/news/newslist/type/'.$v['id'].'" selected="selected">'
|
|
|
|
.$haed
|
|
|
|
.$v['title'].'</option>';
|
|
|
|
else
|
|
|
|
echo '<option value="/admin/news/newslist/type/'.$v['id'].'">'.$haed.$v['title'].'</option>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<a class="btn btn-primary" href="/admin/news/newslist">所有新闻列表</a>
|
|
|
|
</div>
|
|
|
|
<table id="report" class="stylized table table-bordered table-striped table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th width="50%">新闻标题</th>
|
|
|
|
<th width="15%">栏目</th>
|
|
|
|
<th width="15%">状态</th>
|
|
|
|
<th width="20%">新闻管理</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
if(count($this->paginator))
|
|
|
|
{
|
|
|
|
$list = "";
|
|
|
|
foreach ($this->paginator as $v)
|
|
|
|
{
|
|
|
|
$list .= '
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="'.$v['type_url'].'"><b>'.$v['type_title'].'</b></a>
|
|
|
|
</td>
|
|
|
|
<td>';
|
|
|
|
if($v['ts_published']<time() and $v['is_pub']>0)
|
|
|
|
{
|
|
|
|
$list.="已发布";
|
|
|
|
}
|
|
|
|
if($v['ts_published']>time() and $v['is_pub']>0)
|
|
|
|
{
|
|
|
|
$list.= date('Y-m-d H:i',$v['ts_published']) . '发布';
|
|
|
|
}
|
|
|
|
if($v['is_pub']==0)
|
|
|
|
{
|
|
|
|
$list.="草稿";
|
|
|
|
}
|
|
|
|
if($v['is_pub']<0)
|
|
|
|
{
|
|
|
|
$list.="未发布";
|
|
|
|
}
|
|
|
|
$list .= '</td>
|
|
|
|
<td>
|
|
|
|
<a href="'.$v['url'].'">浏览</a>
|
|
|
|
<a href="/admin/news/newsedit/id/'.$v['id'].'"><b>编辑</b></a>
|
|
|
|
<a href="/admin/news/delete/id/'.$v['id'].'" onclick="return confirm(\'是否确定删除该文章\')">删除</a></td>
|
|
|
|
</tr>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
echo $list;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
echo '
|
|
|
|
<tr><td>暂无数据</td><td></td></tr>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
|
|
</div>
|
2012-03-27 07:02:36 +00:00
|
|
|
</div>
|
2011-10-21 08:12:04 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
2012-03-27 07:02:36 +00:00
|
|
|
$('.title').bind('click', function() {
|
2012-04-09 07:50:57 +00:00
|
|
|
$.colorbox({'innerWidth':'50%','html':$(this).next('.listingDetails').children('.pad').html()});
|
2012-03-27 07:02:36 +00:00
|
|
|
});
|
2013-06-08 17:24:22 +00:00
|
|
|
$("#navigation").change(function()
|
|
|
|
{
|
|
|
|
window.location.href = $(this).val();
|
|
|
|
});
|
2011-10-21 08:12:04 +00:00
|
|
|
});
|
|
|
|
function showpad(id){
|
|
|
|
$('#titlebtn'+id).click();
|
|
|
|
}
|
2014-09-13 02:18:32 +00:00
|
|
|
</script>
|
|
|
|
<script>$('#divFooter').css('position','absolute');</script>
|