#443 在前后台添加了计划下载功能,前台添加了“我负责的计划”
This commit is contained in:
parent
4f0f8e3ad2
commit
15f85d7950
|
@ -44,6 +44,9 @@
|
||||||
<a class="iframe" href="/admin/data/project/ac/showexpert/id/<?= $item['id'];?>">查看跟踪专家</a> |
|
<a class="iframe" href="/admin/data/project/ac/showexpert/id/<?= $item['id'];?>">查看跟踪专家</a> |
|
||||||
<a href="/admin/data/project/ac/upload/pid/<?= $item['id']?>" class="iframe">上传计划</a> |
|
<a href="/admin/data/project/ac/upload/pid/<?= $item['id']?>" class="iframe">上传计划</a> |
|
||||||
<a href="javascript:void(0);" onclick="changeStatus(<?= $item['id'];?>,<?= $item['status']?>)">状态修改</a>
|
<a href="javascript:void(0);" onclick="changeStatus(<?= $item['id'];?>,<?= $item['status']?>)">状态修改</a>
|
||||||
|
<?php if(!empty($item['attachid'])) { ?>
|
||||||
|
| <a href="/service/attach/id/<?= $item['attachid'];?>">下载</a>
|
||||||
|
<?php } ?>
|
||||||
</p>
|
</p>
|
||||||
<p id="inviteFrom_<?= $item['id'];?>" style="display:none;">
|
<p id="inviteFrom_<?= $item['id'];?>" style="display:none;">
|
||||||
<input type="text" id="expert_name_<?= $item['id'];?>" value="<?= $this->input_NameDefaultVal ?>"
|
<input type="text" id="expert_name_<?= $item['id'];?>" value="<?= $this->input_NameDefaultVal ?>"
|
||||||
|
|
|
@ -487,16 +487,16 @@ class HeiheController extends DataController
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
$uuid = $row['uuid'];
|
$uuid = $row['uuid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//检查元数据错误
|
//检查元数据错误
|
||||||
$iso=new ISO19115();
|
$iso=new ISO19115();
|
||||||
@$iso->loadXML($row['xml']);
|
@$iso->loadXML($row['xml']);
|
||||||
if ($iso->validate())
|
if ($iso->validate())
|
||||||
{
|
{
|
||||||
$data=array("error"=>"元数据导入过程中发现错误。<br />".implode("<br />",$iso->error));
|
$data=array("error"=>"元数据导入过程中发现错误。<br />".implode("<br />",$iso->error));
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
@ -523,7 +523,7 @@ class HeiheController extends DataController
|
||||||
umask($old);
|
umask($old);
|
||||||
}
|
}
|
||||||
|
|
||||||
//$path = $row1['homedir'];
|
//$path = $row1['homedir'];
|
||||||
$path = '/var/www/westdc.westgis.ac.cn/data/heihe_upload/'.$uuid.'/';
|
$path = '/var/www/westdc.westgis.ac.cn/data/heihe_upload/'.$uuid.'/';
|
||||||
|
|
||||||
//delete dataset & datafile records
|
//delete dataset & datafile records
|
||||||
|
@ -653,13 +653,13 @@ class HeiheController extends DataController
|
||||||
);
|
);
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//安全检查: uuid必须是当前用户且为新建数据
|
//安全检查: uuid必须是当前用户且为新建数据
|
||||||
$sql="select * from geonetworkmetadata where uuid=? and uuid not in (select uuid from metadata) and owner=?";
|
$sql="select * from geonetworkmetadata where uuid=? and uuid not in (select uuid from metadata) and owner=?";
|
||||||
$sth=$this->db->prepare($sql);
|
$sth=$this->db->prepare($sql);
|
||||||
$sth->execute(array($uuid,$u_id));
|
$sth->execute(array($uuid,$u_id));
|
||||||
$row=$sth->fetch();
|
$row=$sth->fetch();
|
||||||
if (empty($row))
|
if (empty($row))
|
||||||
{
|
{
|
||||||
$data = array(
|
$data = array(
|
||||||
'error'=>"参数错误"
|
'error'=>"参数错误"
|
||||||
|
@ -766,6 +766,8 @@ class HeiheController extends DataController
|
||||||
$ac = $this->_getParam('ac');
|
$ac = $this->_getParam('ac');
|
||||||
$invite = $this->_getParam('invite');
|
$invite = $this->_getParam('invite');
|
||||||
|
|
||||||
|
$heihe = new Heihe($this->db);
|
||||||
|
|
||||||
$auth = Zend_Auth::getInstance();
|
$auth = Zend_Auth::getInstance();
|
||||||
if($auth->hasIdentity())
|
if($auth->hasIdentity())
|
||||||
{
|
{
|
||||||
|
@ -774,7 +776,7 @@ class HeiheController extends DataController
|
||||||
$this->view->user_email = $user_email = $user->email;
|
$this->view->user_email = $user_email = $user->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($ac) || $ac == "index")
|
if(empty($ac) || $ac == "index" || $ac == 'my')
|
||||||
{
|
{
|
||||||
$this->_helper->viewRenderer('project-index');
|
$this->_helper->viewRenderer('project-index');
|
||||||
|
|
||||||
|
@ -798,6 +800,11 @@ class HeiheController extends DataController
|
||||||
$this->view->searchKeyword = $q;
|
$this->view->searchKeyword = $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($ac == "my")
|
||||||
|
{
|
||||||
|
$wheresql[] = " email='$user_email' ";
|
||||||
|
}
|
||||||
|
|
||||||
if(count($wheresql)>0)
|
if(count($wheresql)>0)
|
||||||
{
|
{
|
||||||
$wheresql = join(" AND ",$wheresql);
|
$wheresql = join(" AND ",$wheresql);
|
||||||
|
@ -817,7 +824,7 @@ class HeiheController extends DataController
|
||||||
|
|
||||||
foreach ($rows as $k=>$v)
|
foreach ($rows as $k=>$v)
|
||||||
{
|
{
|
||||||
$rows[$k]['status'] = $this->replacestatus($v['status']);
|
$rows[$k]['status'] = $heihe->getStatus($v['status']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
@ -839,7 +846,7 @@ class HeiheController extends DataController
|
||||||
|
|
||||||
foreach ($rows as $k=>$v)
|
foreach ($rows as $k=>$v)
|
||||||
{
|
{
|
||||||
$rows[$k]['status'] = $this->replacestatus($v['status']);
|
$rows[$k]['status'] = $heihe->getStatus($v['status']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
@ -860,7 +867,7 @@ class HeiheController extends DataController
|
||||||
|
|
||||||
foreach ($rows as $k=>$v)
|
foreach ($rows as $k=>$v)
|
||||||
{
|
{
|
||||||
$rows[$k]['status'] = $this->replacestatus($v['status']);
|
$rows[$k]['status'] = $heihe->getStatus($v['status']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
@ -881,7 +888,7 @@ class HeiheController extends DataController
|
||||||
|
|
||||||
foreach ($rows as $k=>$v)
|
foreach ($rows as $k=>$v)
|
||||||
{
|
{
|
||||||
$rows[$k]['status'] = $this->replacestatus($v['status']);
|
$rows[$k]['status'] = $heihe->getStatus($v['status']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
@ -1065,30 +1072,6 @@ class HeiheController extends DataController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function replacestatus($status)
|
|
||||||
{
|
|
||||||
if($status == 0)
|
|
||||||
{
|
|
||||||
return "计划未提交";
|
|
||||||
}
|
|
||||||
if($status == 1)
|
|
||||||
{
|
|
||||||
return "计划未审核";
|
|
||||||
}
|
|
||||||
if($status == 2)
|
|
||||||
{
|
|
||||||
return "跟踪专家审核";
|
|
||||||
}
|
|
||||||
if($status == 3)
|
|
||||||
{
|
|
||||||
return "跟踪专家通过";
|
|
||||||
}
|
|
||||||
if($status == 4)
|
|
||||||
{
|
|
||||||
return "数据委员会通过";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function genRandomString($len)
|
function genRandomString($len)
|
||||||
{
|
{
|
||||||
$chars = array(
|
$chars = array(
|
||||||
|
|
|
@ -26,6 +26,7 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
<div id="tabs-controller">
|
<div id="tabs-controller">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/">所有项目</a></li>
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/">所有项目</a></li>
|
||||||
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/my">我负责的</a></li>
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/submitting">正在提交</a></li>
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/submitting">正在提交</a></li>
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/unsubmit">未提交</a></li>
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/unsubmit">未提交</a></li>
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/submit">已提交</a></li>
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/projects/ac/submit">已提交</a></li>
|
||||||
|
@ -49,7 +50,15 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<p><span class="title"><?php echo $item['title'];?></span></p>
|
<p><span class="title"><?php echo $item['title'];?></span></p>
|
||||||
<p>编号:<label><?= $item['code'];?></label> | 负责人:<?= $item['name'];?> | 开始时间:<?= $item['pstart'];?> | 状态:<?= $item['status'];?></p>
|
<p>
|
||||||
|
编号:<label><?= $item['code'];?></label> |
|
||||||
|
负责人:<?= $item['name'];?> |
|
||||||
|
开始时间:<?= $item['pstart'];?> |
|
||||||
|
状态:<?= $item['status'];?>
|
||||||
|
<?php if(!empty($item['attachid'])) { ?>
|
||||||
|
| <a href="/service/attach/id/<?= $item['attachid'];?>">下载</a>
|
||||||
|
<?php } ?>
|
||||||
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if($this->user_email == $item['email'])
|
if($this->user_email == $item['email'])
|
||||||
{ ?>
|
{ ?>
|
||||||
|
|
Loading…
Reference in New Issue