修改了后台新闻中心的UI,完善了部分功能

This commit is contained in:
Li Jianxuan 2011-12-22 09:00:29 +00:00
parent 4cbf169e01
commit 57482c9844
8 changed files with 363 additions and 600 deletions

View File

@ -7,7 +7,6 @@ class Admin_NewsController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');//新UI
} }
function postDispatch() function postDispatch()
{ {
@ -118,7 +117,9 @@ class Admin_NewsController extends Zend_Controller_Action
$id = $this->_request->getParam('id'); $id = $this->_request->getParam('id');
if($id>0) if($id>0)
{ {
$sql = "select id,title,pubtime,typeid from news_archives where id=$id"; $sql = "SELECT arc.id,arc.title,arc.pubtime,arc.typeid,cat.url,cat.id as typeid from news_archives arc
LEFT JOIN news_catlog cat ON arc.typeid=cat.id
WHERE arc.id=$id";
$rs = $this->db->query($sql); $rs = $this->db->query($sql);
$rows = $rs->fetch(); $rows = $rs->fetch();
@ -273,7 +274,6 @@ class Admin_NewsController extends Zend_Controller_Action
$types = $re->fetchAll(); $types = $re->fetchAll();
$this->view->types=$types; $this->view->types=$types;
} }
function archiveseditAction() function archiveseditAction()
@ -330,16 +330,8 @@ class Admin_NewsController extends Zend_Controller_Action
'; ';
} }
else else
{
if(!empty($pubtimer))
{ {
$pubtime = strtotime($pubtime); $pubtime = strtotime($pubtime);
}
else
{
$pubtime = time();
}
$date=array( $date=array(
'title' => $title, 'title' => $title,
'writer' => $writer, 'writer' => $writer,
@ -399,22 +391,9 @@ class Admin_NewsController extends Zend_Controller_Action
} }
}// 文章编辑 }// 文章编辑
function deleteAction(){
}//文章删除
/*
<div class="box box-info">Info box sample</div>
<div class="box box-warning">Warning box sample</div>
<div class="box box-error">Error box sample</div>
<div class="box box-error-msg">
<ol>
<li>Credit card number entered is invalid</li>
<li>Credit card verification number must be a valid number</li>
</ol>
</div>
<div class="box box-success">Success box sample</div>
*/
} }

View File

@ -2,57 +2,38 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/static/js/jquery.dataTables.min.js'); $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目管理');
?> ?>
<style>
.listingDetails{position:absolute;width:650px;}
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;}
</style>
<div id="leftPanel">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?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; ?>
<!-- Page title --> <table id="report" class="stylized full" style="width:650px;">
<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/>
<?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> <thead>
<tr> <tr>
<th width="50%">栏目名称</th> <th width="80%">栏目名称</th>
<th width="50%">栏目管理</th> <th width="20%" style="vertical-align:top;">栏目管理</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
if(is_array($this->catlogs)) if(is_array($this->catlogs))
{ {
@ -60,14 +41,13 @@
{ {
echo ' echo '
<tr> <tr>
<td class="title"> <td>
<div id="paddiv'.$v['id'].'"> <div id="paddiv'.$v['id'].'">
<a id="titlebtn'.$v['id'].'"><b>'.$v['title'].'</b></a> <a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
<div class="listingDetails"> <div class="listingDetails">
<div class="pad"> <div class="pad">
<b>编辑栏目</b> <b>编辑栏目</b> <a href="javascript:;" class="closepad" style="float:right">关闭</a>
<form id="editform'.$v['id'].'" method="post" action="#"> <form id="editform'.$v['id'].'" method="post" action="#">
<fieldset> <fieldset>
<legend>栏目信息</legend> <legend>栏目信息</legend>
@ -126,28 +106,18 @@
?> ?>
</tbody> </tbody>
</table> </table>
<hr/> </div>
<a href="/admin/news/catlog/add/1" class="btn"><span class="icon icon-add">&nbsp;</span>添加新栏目</a>
</section>
<!-- End of Left column/section -->
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript"> <script type="text/javascript">
$('#nav_news').addClass("current");
$(document).ready(function(){ $(document).ready(function(){
/* setup navigation, content boxes, etc... */ $('.title').bind('click', function() {
Administry.setup(); $('.pad').css('display','none');
/* expandable rows */ $(this).next('.listingDetails').children('.pad').show();
Administry.expandableRows(); });
$('.closepad').bind('click', function() {
$('.pad').css('display','none');
});
}); });
function showpad(id){ function showpad(id){
$('#titlebtn'+id).click(); $('#titlebtn'+id).click();

View File

@ -2,36 +2,27 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/static/js/jquery.tagInput.min.js'); $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/static/js/jquery.wysiwyg.min.js'); $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('栏目添加');
?> ?>
<div id="leftPanel">
<!-- Page title --> <?= $this->partial('news/left.phtml'); ?>
<div id="pagetitle"> </div>
<div class="wrapper"> <div id="rightPanel">
<h1>新闻中心</h1> <?php if ($this->msg or $this->messages) :?>
<!-- Quick search box --> <div id="message">
<form action="" method="get"><input class="" type="text" id="q" name="q" /></form> <?php if ($this->msg) : ?>
</div> <p><?php echo $this->msg; ?></p>
</div> <?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<!-- End of Page title --> <p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
<!-- Page content --> </div>
<div id="page"> <?php endif; ?>
<!-- Wrapper --> <h3>添加栏目</h3>
<div class="wrapper"> <form id="sampleform" method="post" action="#">
<!-- 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>
<form id="sampleform" method="post" action="#">
<fieldset> <fieldset>
<legend>栏目信息</legend> <legend>栏目信息</legend>
@ -65,20 +56,5 @@
</fieldset> </fieldset>
</form> </form>
</div>
<hr/>
</section>
<!-- End of Left column/section -->
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript">
$('#nav_news').addClass("current");
</script>

View File

@ -1,32 +1,7 @@
<div id="rightmenu"> <ul>
<header> <li class="title">新闻中心</li>
<h3>新闻中心管理</h3> <li><a href="/admin/news/catlog">栏目管理</a></li>
</header> <li><a href="/admin/news/catlog/add/1">栏目添加</a></li>
<dl class="first"> <li><a href="/admin/news/newslist">新闻管理</a></li>
<li><a href="/admin/news/newsadd">新闻发布</a></li>
<dt><img width="16" height="16" alt="" SRC="/static/img/90.png"></dt> </ul>
<dd><a href="/admin/news/catlog">栏目管理</a></dd>
<dd class="last">创建、编辑、删除栏目</dd>
<dt><img width="16" height="16" alt="" SRC="/static/img/27.png"></dt>
<dd><a href="/admin/news/newslist">新闻管理</a></dd>
<dd class="last">查看、编辑、搜索、删除新闻</dd>
<dt><img width="16" height="16" alt="" SRC="/static/img/21.png"></dt>
<dd><a href="/admin/news/newsadd">发布新闻</a></dd>
<dd class="last">为网站发布一篇新闻</dd>
</dl>
</div>
<div class="content-box">
<header>
<h3>Tips</h3>
</header>
<section>
<dl>
<dt>在栏目编辑中,再次点击“编辑”按钮可以关闭栏目编辑窗口</dt>
<dd><a href="/admin/news/catlog">去试试</a></dd>
<dt>新闻添加中可以直接上传图片</dt>
<dd><a href="/admin/news/newsadd">去试试</a></dd>
</dl>
</section>
</div>

View File

@ -2,10 +2,15 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/static/js/jquery.tagInput.min.js'); $this->headScript()->appendFile('/static/js/jquery.tagInput.min.js');
$this->headScript()->appendFile('/static/js/kindeditor-min.js'); $this->headScript()->appendFile('/static/js/kindeditor-min.js');
$this->headScript()->appendFile('/static/js/kindlang/zh_CN.js'); $this->headScript()->appendFile('/static/js/kindlang/zh_CN.js');
$this->headLink()->appendStylesheet('/static/css/kindskin/default/default.css'); $this->headLink()->appendStylesheet('/static/css/kindskin/default/default.css');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('新闻添加');
?> ?>
<?php <?php
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
@ -16,6 +21,20 @@
$realname = $user->realname; $realname = $user->realname;
} }
?> ?>
<style>
.tagInput {}
.tagInputDiv {display:none;background-color:white;position:absolute;overflow:auto;border:1px solid lightgray;margin-top:-1px;}
.tagInputLine {color:black;font-weight:normal;padding:4px;}
.tagInputSel {background-color:gray;color:white;}
.tagInputLineTag {min-width:150px;display:inline-block;}
.tagInputLineFreq {min-width:50px;text-align:right;display:inline-block;float:right;}
.tagInputSuggestedTags {font-size: 11px;}
.tagInputSuggestedTags .label{display:block;background:0 none;color:#666;padding:0;margin-top:4px;}
.tagInputSuggestedTagList{}
.tagInputSuggestedTagList .tag{ padding:1px 4px;cursor:pointer;display:inline-block;margin:2px 1px;border:1px solid #bbb;}
.tagInputSuggestedTagList span.tag:hover{background-color:#bbb;color:#fff;}
.tagInputSuggestedTagList .tagUsed{border:1px solid #999;background-color:#999;color:#fff;}
</style>
<script type="text/javascript"> <script type="text/javascript">
/* sample tags */ /* sample tags */
var tags=[ var tags=[
@ -24,10 +43,6 @@ var tags=[
]; ];
$(document).ready(function(){ $(document).ready(function(){
/* setup navigation, content boxes, etc... */
Administry.setup();
KindEditor.ready(function(K) { KindEditor.ready(function(K) {
editor=K.create('textarea[name="body"]', { editor=K.create('textarea[name="body"]', {
cssPath : '/static/js/plugins/code/prettify.css', cssPath : '/static/js/plugins/code/prettify.css',
@ -51,41 +66,12 @@ $(document).ready(function(){
}); });
}); });
</script> </script>
<!-- Page title --> <div id="leftPanel">
<div id="pagetitle"> <?= $this->partial('news/left.phtml'); ?>
<div class="wrapper"> </div>
<h1>新闻中心</h1> <div id="rightPanel">
<!-- 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'); ?>
<div class="content-box">
<header>
<h3>新闻标签</h3>
</header>
<section>
输入Tag标签多个用半角逗号 “ , ”隔开每个Tag标签长度小于6个汉字
<p><textarea id="keyword" class="small full" name="keyword"></textarea></p>
</section>
</div>
</aside>
<!-- End of Right column/section -->
<!-- Left column/section -->
<section class="column width6"> <section class="column width6">
<h3>发布新闻</h3>
<form name="form" id="archivesadd" method="post" action="#"> <form name="form" id="archivesadd" method="post" action="#">
<fieldset> <fieldset>
@ -161,15 +147,18 @@ $(document).ready(function(){
</fieldset> </fieldset>
</form> </form>
<div class="content-box">
<header>
<h3>新闻标签</h3>
</header>
<section>
输入Tag标签多个用半角逗号 " , "隔开每个Tag标签长度小于6个汉字
<p><textarea id="keyword" class="small full" name="keyword"></textarea></p>
</section>
</div>
</section> </section>
<!-- End of Left column/section --> <!-- End of Left column/section -->
</div>
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$('#nav_news').addClass("current"); $('#nav_news').addClass("current");

View File

@ -2,101 +2,25 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/static/js/jquery.tagInput.min.js'); $this->breadcrumb('<a href="/admin">后台首页</a>');
$this->headScript()->appendFile('/static/js/kindeditor-min.js'); $this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->headScript()->appendFile('/static/js/kindlang/zh_CN.js'); $this->breadcrumb('新闻发布');
$this->headLink()->appendStylesheet('/static/css/kindskin/default/default.css'); $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
?> ?>
<?php <div id="leftPanel">
$auth = Zend_Auth::getInstance(); <?= $this->partial('news/left.phtml'); ?>
if($auth->hasIdentity()) </div>
{ <div id="rightPanel">
$user = $auth->getIdentity(); <h3><?php echo $this->title;?></h3>
$uname=$user->username; <ul>
$realname = $user->realname; <li><a href="/news/<?php echo $this->infos['url']; ?>/archive-<?php echo $this->infos['id']; ?>.html" target="_blank">查看文章</a></li>
} <li><a href="/admin/news/newslist">返回文章列表</a></li>
?> <li><a href="/admin/news/newsedit/id/<?php echo $this->infos['id']; ?>">更改文章</a></li>
<script type="text/javascript"> <li><a href="/admin/news/newsadd">发表新文章</a></li>
/* sample tags */
var tags=[
{tag:"冻土",freq:30},{tag:"寒旱所",freq:25}, {tag:"大气",freq:10},{tag:"高原",freq:4},
{tag:"西部",freq:3},{tag:"地理",freq:8}, {tag:"环境",freq:3},{tag:"地质",freq:20}
];
$(document).ready(function(){
/* setup navigation, content boxes, etc... */
Administry.setup();
KindEditor.ready(function(K) {
editor=K.create('textarea[name="body"]', {
cssPath : '/static/js/plugins/code/prettify.css',
uploadJson : '/plugins/upload_json.php',
fileManagerJson : '/plugins/file_manager_json.php',
allowFileManager : true
});
});
/* tag input field */
$("#keyword").tagInput({
tags:tags,
//jsonUrl:"tags.json",
sortBy:"frequency",
suggestedTags:["冻土", "寒旱所", "大气", "高原", "西部", "环境"],
tagSeparator:",",
autoFilter:true,
autoStart:false,
//suggestedTagsPlaceHolder:$("#suggested"),
boldify:true
});
});
</script>
<!-- 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><?php echo $this->title;?></h3>
<ul>
<li><a href="">查看文章</a></li>
<li><a href="">返回文章列表</a></li>
<li><a href="">更改文章</a></li>
<li><a href="">发表新文章</a></li>
<li>页面将自动跳转至文章列表页</li> <li>页面将自动跳转至文章列表页</li>
</ul> </ul>
</section>
<!-- End of Left column/section -->
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript"> <script type="text/javascript">
$(function(){ setTimeout("self.location='/admin/news/newslist/typeid/<?php echo $this->infos['typeid'];?>'",5000);
$('#nav_news').addClass("current");
});
setTimeout("self.location='/admin/news/list/typeid/<?php echo $this->view->typeid;?>'",500);
</script> </script>
</li>

View File

@ -2,10 +2,15 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/static/js/jquery.tagInput.min.js'); $this->headScript()->appendFile('/static/js/jquery.tagInput.min.js');
$this->headScript()->appendFile('/static/js/kindeditor-min.js'); $this->headScript()->appendFile('/static/js/kindeditor-min.js');
$this->headScript()->appendFile('/static/js/kindlang/zh_CN.js'); $this->headScript()->appendFile('/static/js/kindlang/zh_CN.js');
$this->headLink()->appendStylesheet('/static/css/kindskin/default/default.css'); $this->headLink()->appendStylesheet('/static/css/kindskin/default/default.css');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('新闻编辑');
?> ?>
<?php <?php
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
@ -24,10 +29,6 @@ var tags=[
]; ];
$(document).ready(function(){ $(document).ready(function(){
/* setup navigation, content boxes, etc... */
Administry.setup();
KindEditor.ready(function(K) { KindEditor.ready(function(K) {
editor=K.create('textarea[name="body"]', { editor=K.create('textarea[name="body"]', {
cssPath : '/static/js/plugins/code/prettify.css', cssPath : '/static/js/plugins/code/prettify.css',
@ -51,38 +52,11 @@ $(document).ready(function(){
}); });
}); });
</script> </script>
<!-- Page title --> <div id="leftPanel">
<div id="pagetitle"> <?= $this->partial('news/left.phtml'); ?>
<div class="wrapper"> </div>
<h1>新闻中心</h1> <div id="rightPanel">
<!-- Quick search box --> <section class="column width6">
<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'); ?>
<div class="content-box">
<header>
<h3>新闻标签</h3>
</header>
<section>
输入Tag标签多个用半角逗号 “ , ”隔开每个Tag标签长度小于6个汉字
<p><textarea id="keyword" class="small full" name="keyword"><?php echo $this->ev['keyword']; ?></textarea></p>
</section>
</div>
</aside>
<!-- End of Right column/section -->
<!-- Left column/section -->
<section class="column width6">
<h3>发布新闻</h3> <h3>发布新闻</h3>
@ -164,19 +138,10 @@ $(document).ready(function(){
</fieldset> </fieldset>
</form> </form>
</section> </section>
<!-- End of Left column/section --> </div>
</div>
<!-- End of Wrapper -->
</div>
<!-- End of Page content -->
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$('#nav_news').addClass("current");
$("#pubtimeturn").click( function () { $("#pubtimeturn").click( function () {
if($(this).is(":checked")) if($(this).is(":checked"))
{ {

View File

@ -2,57 +2,51 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/static/js/jquery.dataTables.min.js'); $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
$this->breadcrumb('新闻列表');
?> ?>
<style>
.listingDetails{position:absolute;width:650px;}
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;}
</style>
<div id="leftPanel">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?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; ?>
<!-- Page title --> <div>
<div id="pagetitle"> <a href="javascript:;">按栏目查看</a>
<div class="wrapper"> &nbsp;
<h1>新闻中心</h1> <a href="/admin/news/newslist">所有新闻列表</a>
<!-- 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>
<div id="page">
<!-- Wrapper -->
<div class="wrapper">
<!-- Right column/section --> <?php if ($this->msg or $this->messages) :?>
<aside class="column width2 first"> <div class="box box-info">
<?= $this->partial('news/left.phtml'); ?> <?php if ($this->msg) : ?>
</aside>
<!-- End of Right column/section -->
<!-- Left column/section -->
<section class="column width6">
<h3>新闻列表</h3>
<hr/>
<div>
<a href="javascript:;">按栏目查看</a>
&nbsp;
<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 echo $this->msg; ?>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?> <?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<?php echo $msg; ?> <?php echo $msg; ?>
<?php endforeach;endif; ?> <?php endforeach;endif; ?>
<script language="javascript"> <script language="javascript">
setTimeout('$(".box-info").remove()',5000); setTimeout('$(".box-info").remove()',5000);
</script> </script>
</div> </div>
<?php endif; ?> <?php endif; ?>
<table id="report" class="stylized full" style=""> <table id="report" class="stylized full" style="width:650px;">
<thead> <thead>
<tr> <tr>
<th width="50%">新闻标题</th> <th width="50%">新闻标题</th>
@ -68,12 +62,12 @@
{ {
echo ' echo '
<tr> <tr>
<td class="title"> <td>
<div id="paddiv'.$v['id'].'"> <div id="paddiv'.$v['id'].'">
<a id="titlebtn'.$v['id'].'"><b>'.$v['title'].'</b></a> <a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
<div class="listingDetails"> <div class="listingDetails">
<div class="pad"> <div class="pad">
<b>详细信息</b> <b>详细信息</b> <a href="javascript:;" class="closepad" style="float:right">关闭</a>
<p>作者:'.$v['writer'].'</p> <p>作者:'.$v['writer'].'</p>
<p>关键词:'.$v['keyword'].'</p> <p>关键词:'.$v['keyword'].'</p>
<p>描述:'.$v['description'].'</p> <p>描述:'.$v['description'].'</p>
@ -87,7 +81,7 @@
<td><a href="/admin/news/newslist/type/'.$v['typeid'].'">'.$v['catlog'].'</a></td> <td><a href="/admin/news/newslist/type/'.$v['typeid'].'">'.$v['catlog'].'</a></td>
<td> <td>
<a href="/admin/news/newsedit/id/'.$v['id'].'"><b>编辑</b></a> <a href="/admin/news/newsedit/id/'.$v['id'].'"><b>编辑</b></a>
<a href="/admin/news/catlog/delete/'.$v['id'].'" onclick="return confirm(\'是否确定删除该栏目\')">删除</a></td> <a href="/admin/news/delete/'.$v['id'].'" onclick="return confirm(\'是否确定删除该栏目\')">删除</a></td>
</tr> </tr>
'; ';
} }
@ -101,30 +95,21 @@
?> ?>
</tbody> </tbody>
</table> </table>
<div class="pagenavi"><?= $this->paginator; ?></div>
<hr/> </div>
<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"> <script type="text/javascript">
$('#nav_news').addClass("current");
$(document).ready(function(){ $(document).ready(function(){
/* setup navigation, content boxes, etc... */ $('.title').bind('click', function() {
Administry.setup(); $('.pad').css('display','none');
/* expandable rows */ $(this).next('.listingDetails').children('.pad').show();
Administry.expandableRows(); });
$('.closepad').bind('click', function() {
$('.pad').css('display','none');
});
}); });
function showpad(id){ function showpad(id){
$('#titlebtn'+id).click(); $('#titlebtn'+id).click();
} }
</script> </script>