修改了评审发布时的bug

This commit is contained in:
Li Jianxuan 2012-06-12 03:06:28 +00:00
parent f806355673
commit 0a33209af3
3 changed files with 52 additions and 15 deletions

View File

@ -1788,7 +1788,7 @@ class Admin_DataController extends Zend_Controller_Action
if($row['xml']==$row_geo['data'])
{
$data = array("error"=>$this->alertbox('warning','无须恢复,元数据相同'));
$data = array("error"=>'无须恢复,元数据相同');
$this->jsonexit($data);
return true;
}
@ -1799,11 +1799,11 @@ class Admin_DataController extends Zend_Controller_Action
if($ex)
{
$data = array("error"=>$this->alertbox('ok','恢复成功'));
$data = array("error"=>'恢复成功');
$this->jsonexit($data);
return true;
}else{
$data = array("error"=>$this->alertbox('error','恢复失败,请确认权限后重试'));
$data = array("error"=>'恢复失败,请确认权限后重试');
$this->jsonexit($data);
return true;
}
@ -1811,7 +1811,7 @@ class Admin_DataController extends Zend_Controller_Action
$msg = "恢复失败,请确认权限后重试";
if($this->debug>0)
{$msg .= $e->getMessage();}
$data = array("error"=>$this->alertbox('error',$msg));
$data = array("error"=>$msg);
$this->jsonexit($data);
return true;
}
@ -1836,7 +1836,7 @@ class Admin_DataController extends Zend_Controller_Action
$changelog = $this->_request->getParam('changelog');
if(empty($changelog))
{
$data = array("error"=>$this->alertbox('warning','请输入变更信息'));
$data = array("error"=>'请输入变更信息');
$this->jsonexit($data);
return true;
}
@ -1922,7 +1922,7 @@ class Admin_DataController extends Zend_Controller_Action
}
@$mail->send();
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!'));
$data = array("commited"=>1,"error"=>'该版本已经成功提交,请等待数据中心进一步处理!');
$this->jsonexit($data);
return true;
} else { //说明是已发布的数据且数据不存在评审信息
@ -1958,7 +1958,7 @@ class Admin_DataController extends Zend_Controller_Action
}
@$mail->send();
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功发布!'));
$data = array("commited"=>1,"error"=>'该版本已经成功发布!');
$this->jsonexit($data);
return true;
}
@ -2012,7 +2012,7 @@ class Admin_DataController extends Zend_Controller_Action
}
@$mail->send();
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交并同步,请等待数据中心进一步处理!'));
$data = array("commited"=>1,"error"=>'该版本已经成功提交并同步,请等待数据中心进一步处理!');
$this->jsonexit($data);
return true;
}
@ -2088,7 +2088,7 @@ class Admin_DataController extends Zend_Controller_Action
}
@$mail->send();
*/
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!'));
$data = array("commited"=>1,"error"=>'该版本已经成功提交,请等待数据中心进一步处理!');
$this->jsonexit($data);
return true;
}
@ -2123,7 +2123,7 @@ class Admin_DataController extends Zend_Controller_Action
}
@$mail->send();
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功发布!'));
$data = array("commited"=>1,"error"=>'该版本已经成功发布!');
$this->jsonexit($data);
return true;
}
@ -2131,7 +2131,7 @@ class Admin_DataController extends Zend_Controller_Action
$msg = "提交失败,请确认权限后重试";
if($this->debug>0)
{$msg .= $e->getMessage();}
$data = array("error"=>$this->alertbox('error',$msg));
$data = array("error"=>$msg);
$this->jsonexit($data);
return true;
}
@ -2423,7 +2423,7 @@ class Admin_DataController extends Zend_Controller_Action
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
}//所有作者
else if($ac == "userdatas")
{
@ -2444,6 +2444,41 @@ class Admin_DataController extends Zend_Controller_Action
$this->jsonexit($data);
return true;
}//用户数据
else if($ac == "datas")
{
$this->_helper->viewRenderer('author-datas');
$keywords = $this->_request->getParam('q');
if(!empty($keywords))
$this->view->q = $keywords;
$sql = "select md.id,md.title,md.uuid,count(a.userid) as c from metadata md
left JOIN mdauthor a ON md.uuid=a.uuid
";
if(!empty($keywords))
{
$search=new Search($keywords);
$where=$search->sql_expr(array("md.title"));
$sql.=' WHERE '.$where;
}
$sql .= "GROUP by md.id,md.title,md.uuid,md.ts_created
ORDER BY md.ts_created DESC";
$sth = $this->db->prepare($sql);
$sth-> execute();
$rows = $sth->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}
}//authorAction() 数据作者管理
@ -2564,7 +2599,7 @@ class Admin_DataController extends Zend_Controller_Action
$changelog = $this->_request->getParam('changelog');
if(empty($changelog))
{
$data = array("error"=>$this->alertbox('warning','请输入变更信息'));
$data = array("error"=>'请输入变更信息');
$this->jsonexit($data);
return true;
}
@ -2606,14 +2641,14 @@ class Admin_DataController extends Zend_Controller_Action
}
$mail->send();
$data = array("commited"=>1,"error"=>$this->alertbox('ok','该版本已经成功提交,请等待数据中心进一步处理!'));
$data = array("commited"=>1,"error"=>'该版本已经成功提交,请等待数据中心进一步处理!');
$this->jsonexit($data);
return true;
}catch(Exception $e) {
$msg = "提交失败,请确认权限后重试";
if($this->debug>0)
{$msg .= $e->getMessage();}
$data = array("error"=>$this->alertbox('error',$msg));
$data = array("error"=>$msg);
$this->jsonexit($data);
return true;
}

View File

@ -24,6 +24,7 @@ $this->breadcrumb()->setSeparator(' > ');
<ul>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
</ul>
</div>
<div>

View File

@ -24,6 +24,7 @@ $this->breadcrumb()->setSeparator(' > ');
<ul>
<li class="box-shadow active"><a class="text-shadow" href="/admin/data/author">作者管理</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/list">查看所有数据作者</a></li>
<li class="box-shadow"><a class="text-shadow" href="/admin/data/author/ac/datas">所有数据</a></li>
</ul>
</div>
<div>