merge heihedata branch r3794 to r3799.
This commit is contained in:
parent
4ab527d6d0
commit
aa2a230753
|
@ -3667,11 +3667,11 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
{
|
||||
$this->view->uuid = $uuid;
|
||||
$this->view->data = $doi->view($uuid);
|
||||
if(empty($this->view->data))
|
||||
{
|
||||
include('data/Metadata.php');
|
||||
$md = new Metadata($this->db);
|
||||
$metadata = $md->view($uuid);
|
||||
if(empty($this->view->data))
|
||||
{
|
||||
$this->view->data = array(
|
||||
'uuid'=>$uuid,
|
||||
'title'=>$metadata['title'],
|
||||
|
@ -3682,6 +3682,7 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
'publisher_en'=>'Cold and Arid Regions Science Data Center at Lanzhou',
|
||||
);
|
||||
}else{
|
||||
$this->view->data['doi'] = $metadata['doi'];
|
||||
$this->view->data['info'] = $doi->data_process_out($this->view->data);
|
||||
}
|
||||
}else{
|
||||
|
|
|
@ -586,6 +586,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$search=$this->_request->getParam('search');
|
||||
$filter['keyword'] = $this->_request->getParam('keyword');
|
||||
$filter['code'] = $this->_request->getParam('code');
|
||||
$filter['order'] = $this->_request->getParam('order');
|
||||
$filter['sort'] = $this->_request->getParam('sort');
|
||||
|
||||
$review = new Review($this->db);
|
||||
if(!empty($search) && !empty($filter))
|
||||
|
@ -593,6 +595,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
$rows = $review->adminReviews($filter);
|
||||
$this->view->keyword = $filter['keyword'];
|
||||
$this->view->code = $filter['code'];
|
||||
}if(!empty($filter))
|
||||
{
|
||||
$rows = $review->adminReviews($filter);
|
||||
}else{
|
||||
$rows = $review->adminReviews();
|
||||
}
|
||||
|
|
|
@ -56,8 +56,10 @@ table thead tr th {background:#EBF2F6;}
|
|||
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
|
||||
<td><?= $item['doi'] ?></td>
|
||||
<td>
|
||||
<?php if(empty($item['ts_submitted'])) {?>
|
||||
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
||||
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
||||
<?php } ?>
|
||||
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">验证</a>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
</td>
|
||||
|
|
|
@ -36,7 +36,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
|||
<table class="table table-bordered table-hover"><thead>
|
||||
<tr>
|
||||
<th width='600'>元数据标题</th>
|
||||
<th width='120'>负责编辑</th>
|
||||
<th width='120'>责任编辑</th>
|
||||
<th width='120'>接收时间</th>
|
||||
<th width='180'>操作</th>
|
||||
</tr></thead>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
$this->breadcrumb('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendModel($this,'sfadmin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
|
@ -50,10 +51,27 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="width:13px;"><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||
<th width='500'>元数据标题</th>
|
||||
<th width='80'>状态</th>
|
||||
<th>接收时间</th>
|
||||
<th>作者</th>
|
||||
<th width='500'>元数据标题<br />
|
||||
<a href="?order=title&sort=desc" data-order="title" data-sort="desc">↑</a>
|
||||
<a href="?order=title&sort=asc" data-order="title" data-sort="asc">↓</a>
|
||||
</th>
|
||||
<th width='80'>
|
||||
状态<br />
|
||||
<a href="?order=status&sort=desc" data-order="status" data-sort="desc">↑</a>
|
||||
<a href="?order=status&sort=asc" data-order="status" data-sort="asc">↓</a>
|
||||
</th>
|
||||
<th>意见<br />
|
||||
<a href="?order=reviews&sort=desc" data-order="reviews" data-sort="desc">↑</a>
|
||||
<a href="?order=reviews&sort=asc" data-order="reviews" data-sort="asc">↓</a>
|
||||
</th>
|
||||
<th>接收时间<br />
|
||||
<a href="?order=ts_accepted&sort=desc" data-order="ts_accepted" data-sort="desc">↑</a>
|
||||
<a href="?order=ts_accepted&sort=asc" data-order="ts_accepted" data-sort="asc">↓</a>
|
||||
</th>
|
||||
<th>投稿人<br />
|
||||
<a href="?order=author&sort=desc" data-order="author" data-sort="desc">↑</a>
|
||||
<a href="?order=author&sort=asc" data-order="author" data-sort="asc">↓</a>
|
||||
</th>
|
||||
<th width="300">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -75,6 +93,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
|||
if($item['status'] == 4) echo "专家反馈";
|
||||
if($item['status'] == 5) echo "已发布";
|
||||
?></td>
|
||||
<td style="text-align:center"><a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>"><?= $item['reviews'] ?></a></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||
<td><?= $item['author']?></td>
|
||||
<td>
|
||||
|
@ -97,41 +116,6 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
|||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var sfadmin = {
|
||||
def_data_tag : 'tbody',
|
||||
def_select_input : '.select_item',
|
||||
init: function() {
|
||||
$('.select_rows').click(function () {
|
||||
var tableid = $(this).data(sfadmin.def_data_tag);
|
||||
$('#'+tableid).find(sfadmin.def_select_input).attr('checked', this.checked);
|
||||
});
|
||||
sfadmin.ajax.error();
|
||||
},
|
||||
getSelected : function(tableid){
|
||||
if(tableid == "")
|
||||
{
|
||||
dom = $(sfadmin.def_select_input + ':checked');
|
||||
}else{
|
||||
dom = $(sfadmin.def_select_input + ':checked', '#'+tableid);
|
||||
}
|
||||
datas = new Array();
|
||||
dom.each(function(index, element) {
|
||||
datas.push($(this).val());
|
||||
});
|
||||
return datas;
|
||||
},
|
||||
ajax : {
|
||||
error : function(){
|
||||
$(document).ajaxError(function(event, request, settings) {
|
||||
sfadmin.Alert("请求中发生错误");
|
||||
})
|
||||
}
|
||||
},
|
||||
Alert : function(content){
|
||||
$.colorbox({width:'50%',html:'<div class="ajax_error"><div class="text"><h2>'+content+'</h2></div></div>'});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(e) {
|
||||
$('.version').click(function(){
|
||||
$(this).getversion({'id':$(this).attr('rel')});
|
||||
|
@ -167,6 +151,37 @@ function getids(){
|
|||
return data;
|
||||
}
|
||||
|
||||
(function( $ ){
|
||||
|
||||
$.fn.changeorder = function( options ) {
|
||||
|
||||
var settings = $.extend( {
|
||||
order:'',
|
||||
srt: '',
|
||||
}, options);
|
||||
|
||||
var methods = {
|
||||
change : function(dom)
|
||||
{
|
||||
href = window.location.href + "?order="+settings.order+'&sort';
|
||||
}
|
||||
}
|
||||
|
||||
this.each(function() {
|
||||
|
||||
settings.order = $(this).data('order');
|
||||
settings.srt = $(this).data('sort');
|
||||
|
||||
if( settings.order == '' || settings.srt == "")
|
||||
{
|
||||
alert('参数错误');
|
||||
}
|
||||
|
||||
methods.change(this);
|
||||
});
|
||||
};
|
||||
})( jQuery );
|
||||
|
||||
(function( $ ){
|
||||
|
||||
$.fn.getversion = function( options ) {
|
||||
|
|
|
@ -64,12 +64,13 @@ class Review extends Zend_Controller_Plugin_Abstract
|
|||
}
|
||||
|
||||
//后台我负责的评审
|
||||
function adminReviews($filter = "",$order="")
|
||||
function adminReviews($filter = "")
|
||||
{
|
||||
include_once('helper/view.php');
|
||||
$uid = view::User('id');
|
||||
$uid = \view::User('id');
|
||||
|
||||
$wheresql = array();
|
||||
$ordersql = array();
|
||||
|
||||
$wheresql[] = " m.status in (1,2,3,4) ";
|
||||
$wheresql[] = " u.id=$uid ";
|
||||
|
@ -82,6 +83,16 @@ class Review extends Zend_Controller_Plugin_Abstract
|
|||
{
|
||||
$wheresql[] = " s.sourceid=".$filter['code']." ";
|
||||
}
|
||||
if(isset($filter['order']) && !empty($filter['order']))
|
||||
{
|
||||
$sort = "DESC";
|
||||
if(isset($filter['sort']) && !empty($filter['sort']) && in_array( strtolower($filter['sort']),array('desc','asc')))
|
||||
{
|
||||
$sort = $filter['sort'];
|
||||
}
|
||||
$ordersql[] = " {$filter['order']} $sort ";
|
||||
|
||||
}
|
||||
|
||||
if(count($wheresql)>0)
|
||||
{
|
||||
|
@ -90,15 +101,23 @@ class Review extends Zend_Controller_Plugin_Abstract
|
|||
$wheresql = "";
|
||||
}
|
||||
|
||||
$sql = "select m.id,g.id as gid, md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid,md.author,m.ts_accepted
|
||||
if(count($ordersql)>0)
|
||||
{
|
||||
$ordersql = " ORDER BY ".join(',',$ordersql);
|
||||
}else{
|
||||
$ordersql = " ORDER BY m.status desc,m.ts_accepted desc ";
|
||||
}
|
||||
|
||||
$sql = "select m.id,g.id as gid, md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid,md.author,m.ts_accepted,count(r.id) as reviews
|
||||
FROM mdstatus m
|
||||
right join metadata md on md.uuid=m.uuid
|
||||
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||
left join users u on u.id=m.userid
|
||||
left join datasource s on s.uuid=md.uuid
|
||||
left join mdreview r ON r.uuid=md.uuid
|
||||
$wheresql
|
||||
order by m.status desc,m.ts_accepted desc";
|
||||
|
||||
GROUP BY m.id,g.id, md.uuid,md.title,u.username,u.realname,m.status,md.id,md.author,m.ts_accepted
|
||||
$ordersql";
|
||||
$re = $this->db->query($sql);
|
||||
$rows = $re->fetchAll();
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
var sfadmin = {
|
||||
def_data_tag : 'tbody',
|
||||
def_select_input : '.select_item',
|
||||
init: function() {
|
||||
$('.select_rows').click(function () {
|
||||
var tableid = $(this).data(sfadmin.def_data_tag);
|
||||
$('#'+tableid).find(sfadmin.def_select_input).attr('checked', this.checked);
|
||||
});
|
||||
sfadmin.ajax.error();
|
||||
},
|
||||
getSelected : function(tableid){
|
||||
if(tableid == "")
|
||||
{
|
||||
dom = $(sfadmin.def_select_input + ':checked');
|
||||
}else{
|
||||
dom = $(sfadmin.def_select_input + ':checked', '#'+tableid);
|
||||
}
|
||||
datas = new Array();
|
||||
dom.each(function(index, element) {
|
||||
datas.push($(this).val());
|
||||
});
|
||||
return datas;
|
||||
},
|
||||
ajax : {
|
||||
error : function(){
|
||||
$(document).ajaxError(function(event, request, settings) {
|
||||
sfadmin.Alert("请求中发生错误");
|
||||
})
|
||||
}
|
||||
},
|
||||
setCookie : function (name,value){
|
||||
var Days = 30;
|
||||
var exp = new Date(); //new Date("December 31, 9998");
|
||||
exp.setTime(exp.getTime() + Days*24*60*60*1000);
|
||||
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
|
||||
},
|
||||
getCookie : function (name){
|
||||
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
|
||||
if(arr != null) return unescape(arr[2]); return null;
|
||||
},
|
||||
delCookie : function(name){
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() - 1);
|
||||
var cval=getCookie(name);
|
||||
if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
|
||||
},
|
||||
Alert : function(content){
|
||||
$.colorbox({width:'50%',html:'<div class="ajax_error"><div class="text"><h2>'+content+'</h2></div></div>'});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue