westdc-zf1/application/admin/views/scripts/news/newslist.phtml

128 lines
3.8 KiB
PHTML

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/static/js/jquery.dataTables.min.js');
?>
<!-- Page title -->
<div id="pagetitle">
<div class="wrapper">
<h1>新闻中心</h1>
<!-- Quick search box -->
<form action="" method="get"><input class="" type="text" id="q" name="q" /></form>
</div>
</div>
<!-- End of Page title -->
<!-- Page content -->
<div id="page">
<!-- Wrapper -->
<div class="wrapper">
<!-- Right column/section -->
<aside class="column width2 first">
<?= $this->partial('news/left.phtml'); ?>
</aside>
<!-- End of Right column/section -->
<!-- Left column/section -->
<section class="column width6">
<h3>新闻列表</h3>
<hr/>
<div>
<a href="/admin/news/newslist">新闻列表</a>
</div>
<?php if ($this->msg or $this->messages) :?>
<div class="box box-info">
<?php if ($this->msg) : ?>
<?php echo $this->msg; ?>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<?php echo $msg; ?>
<?php endforeach;endif; ?>
<script language="javascript">
setTimeout('$(".box-info").remove()',5000);
</script>
</div>
<?php endif; ?>
<table id="report" class="stylized full" style="">
<thead>
<tr>
<th width="50%">新闻标题</th>
<th width="25%">所属栏目</th>
<th width="25%">新闻管理</th>
</tr>
</thead>
<tbody>
<?php
if(count($this->paginator))
{
foreach ($this->paginator as $v)
{
echo '
<tr>
<td class="title">
<div id="paddiv'.$v['id'].'">
<a id="titlebtn'.$v['id'].'"><b>'.$v['title'].'</b></a>
<div class="listingDetails">
<div class="pad">
<b>详细信息</b>
<p>作者:'.$v['writer'].'</p>
<p>关键词:'.$v['keyword'].'</p>
<p>描述:'.$v['description'].'</p>
<p>添加时间:'.date("Y-m-d H:i",$v['writetime']).'</p>
<p>发布时间:'.date("Y-m-d H:i",$v['pubtime']).'</p>
<p>来源:'.$v['source'].'</p>
<p>点击:'.$v['click'].'</p>
</div>
</div></div>
</td>
<td>'.$v['catlog'].'</td>
<td>
<a href="javascript:showpad('.$v['id'].');"><b>编辑</b></a>
<a href="/admin/news/catlog/delete/'.$v['id'].'" onclick="return confirm(\'是否确定删除该栏目\')">删除</a></td>
</tr>
';
}
}
else
{
echo '
<tr><td>暂无数据</td><td></td></tr>
';
}
?>
</tbody>
</table>
<hr/>
<div class="pagenavi"><?= $this->paginator; ?></div>
</section>
<!-- End of Left column/section -->
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript">
$('#nav_news').addClass("current");
$(document).ready(function(){
/* setup navigation, content boxes, etc... */
Administry.setup();
/* expandable rows */
Administry.expandableRows();
});
function showpad(id){
$('#titlebtn'+id).click();
}
</script>