#443 在前后台添加了计划下载功能,前台添加了“我负责的计划”

This commit is contained in:
Li Jianxuan 2013-01-05 07:19:40 +00:00
parent 4f0f8e3ad2
commit 15f85d7950
3 changed files with 42 additions and 47 deletions

View File

@ -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 ?>"

View File

@ -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(

View File

@ -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'])
{ ?> { ?>