增加了数据作者管理的非iframe视图
This commit is contained in:
parent
77d114725d
commit
574baab0b2
|
@ -2288,9 +2288,17 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
|
|
||||||
|
|
||||||
if($ac == "edit")
|
if($ac == "edit")
|
||||||
|
{
|
||||||
|
|
||||||
|
$window = $this->_getParam('window');
|
||||||
|
|
||||||
|
if($window == "iframe")
|
||||||
{
|
{
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer('author-edit-iframe');
|
||||||
|
}else{
|
||||||
$this->_helper->viewRenderer('author-edit');
|
$this->_helper->viewRenderer('author-edit');
|
||||||
|
}
|
||||||
|
|
||||||
$uuid = $this->_getParam('uuid');
|
$uuid = $this->_getParam('uuid');
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>作者管理</title>
|
||||||
|
<link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
|
||||||
|
<script src='/static/js/jquery-1.7.2.min.js' type="text/javascript"></script>
|
||||||
|
<script type="text/javascript" src="/js/jquery.colorbox-min.js"></script>
|
||||||
|
<link href="/css/author.css" media="screen" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="/static/js/uploadify/uploadify.css" media="screen" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="/css/colorbox.css" media="screen" rel="stylesheet" type="text/css" />
|
||||||
|
<style>
|
||||||
|
#loading{margin:0px;border:none;height:50px;width:98%;background:url(/static/img/colorbox-images/loading.gif) center center no-repeat;display:none;position:absolute;left:0px;top:0px;overflow:hidden;background:#ccc;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- 页面内容 -->
|
||||||
|
<div id="warpper">
|
||||||
|
<div id="loading" class="info info-box"></div>
|
||||||
|
<div id="datalist">
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
if(isset($this->authors))
|
||||||
|
{
|
||||||
|
foreach($this->authors as $v)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<li id="author_<?php echo $v['id'] ;?>">
|
||||||
|
<p><?php echo $v['realname']; ?> [ <?php echo $v['username']; ?> ]</p>
|
||||||
|
<p><span id="status_<?php echo $v['id'] ;?>"><?php if($v['status']==1) {echo "已认证";} if($v['status']==0) {echo "已申请";} if($v['status']==-1) {echo "已拒绝";} ?></span> |
|
||||||
|
<a href="javascript:;" onclick="remove(<?php echo $v['id'] ;?>)">移除该作者</a>
|
||||||
|
<span id="statusChange_<?php echo $v['id'] ;?>"><?php if($v['status']<1) {?> <a href="javascript:;" onclick="update(<?php echo $v['id'] ;?>)">认证该用户</a> <?php }?></span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<?php } } ?>
|
||||||
|
</ul></div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
||||||
|
<script>
|
||||||
|
function update(id){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/author/',
|
||||||
|
'data':'ac=update&id='+id,
|
||||||
|
'success':function(data){
|
||||||
|
if (data!=null)
|
||||||
|
{
|
||||||
|
if(typeof(data.error)!='undefined')
|
||||||
|
{Alert(data.error);return false;}
|
||||||
|
if(data.msg!=null)
|
||||||
|
{Alert(data.msg);}
|
||||||
|
if(typeof(data.updated)!='undefined')
|
||||||
|
{$('#status_'+data.updated).html('已认证');$('#statusChange_'+data.updated).html('');}
|
||||||
|
}else{
|
||||||
|
Alert('处理中出现错误');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function remove(id){
|
||||||
|
if(confirm('确实要删除吗?')==false)
|
||||||
|
{return false;}
|
||||||
|
$.ajax({
|
||||||
|
type:"POST",
|
||||||
|
url:'/admin/data/author',
|
||||||
|
data:'ac=del&id='+id,
|
||||||
|
success:function(data){
|
||||||
|
if (data!=null)
|
||||||
|
{
|
||||||
|
if(typeof(data.error)!='undefined')
|
||||||
|
{Alert(data.error);return false;}
|
||||||
|
if(typeof(data.deleted)!='undefined')
|
||||||
|
{$('#author_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
||||||
|
}else{
|
||||||
|
Alert('处理中出现错误');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#loading').css("opacity","0.2");
|
||||||
|
$('#loading').ajaxComplete(function() {
|
||||||
|
$(this).css('display','none');
|
||||||
|
});
|
||||||
|
$('#loading').ajaxSend(function() {
|
||||||
|
$(this).css('display','block');
|
||||||
|
});
|
||||||
|
$("#loading").ajaxError(function() {
|
||||||
|
$(this).css('display','none');
|
||||||
|
Alert('请求超时或服务器开小差了,请刷新页面后重试');
|
||||||
|
});
|
||||||
|
function Alert(html){
|
||||||
|
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,22 +1,25 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<?php
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
$this->headTitle($this->config->title->site);
|
||||||
<head>
|
$this->headTitle($this->config->title->author);
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
$this->headTitle()->setSeparator(' - ');
|
||||||
<title>作者管理</title>
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||||
<script src='/static/js/jquery-1.7.2.min.js' type="text/javascript"></script>
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||||
<script type="text/javascript" src="/js/jquery.colorbox-min.js"></script>
|
$this->headLink()->appendStylesheet('/css/author.css');
|
||||||
<link href="/css/author.css" media="screen" rel="stylesheet" type="text/css"/>
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
<link href="/static/js/uploadify/uploadify.css" media="screen" rel="stylesheet" type="text/css" />
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
<link href="/css/colorbox.css" media="screen" rel="stylesheet" type="text/css" />
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
<style>
|
$this->breadcrumb('数据作者管理');
|
||||||
#loading{margin:0px;border:none;height:50px;width:98%;background:url(/static/img/colorbox-images/loading.gif) center center no-repeat;display:none;position:absolute;left:0px;top:0px;overflow:hidden;background:#ccc;}
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
</style>
|
?>
|
||||||
</head>
|
<!-- 左侧导航 -->
|
||||||
<body>
|
<div id="leftPanel">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<!-- //左侧导航 -->
|
||||||
|
|
||||||
<!-- 页面内容 -->
|
<!-- 页面内容 -->
|
||||||
<div id="warpper">
|
<div id="rightPanel">
|
||||||
<div id="loading" class="info info-box"></div>
|
<div id="loading" class="info info-box"></div>
|
||||||
<div id="datalist">
|
<div id="datalist">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -96,6 +99,3 @@ function Alert(html){
|
||||||
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -39,7 +39,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </p>
|
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a> </p>
|
||||||
<p>
|
<p>
|
||||||
<?php if ($item['c']) : ?>
|
<?php if ($item['c']) : ?>
|
||||||
作者数量 :<span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span> | <a href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>" class="iframe">作者管理</a> |
|
作者数量 :<span id="sumAuthor_<?php echo $item['id'];?>"><?php echo $item['c']; ?></span> | <a href="/admin/data/author/ac/edit/uuid/<?php echo $item['uuid']; ?>/window/iframe" class="iframe">作者管理</a> |
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<span id="addauthor_<?php echo $item['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">添加作者</a></span>
|
<span id="addauthor_<?php echo $item['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $item['id']; ?>,'<?php echo $item['uuid']; ?>')">添加作者</a></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue