add author/fund and fixed a bug in /admin/data/fund
This commit is contained in:
parent
2921d1c5b9
commit
9fb68755a7
|
@ -89,7 +89,11 @@ table thead tr th {background:#EBF2F6;}
|
|||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<?php }else{?>
|
||||
<tr id="DataLine_<?= $item['mfid']?>">
|
||||
<?php }?>
|
||||
<td><?= $item['title'] ?></td>
|
||||
<td><?= $item['fund_id'] ?></td>
|
||||
<td><?= $item['fund_type'] ?></td>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,12 +7,13 @@
|
|||
$this->breadcrumb('<a href="/account/register">用户注册</a>');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="info">
|
||||
<img src="/images/pass_login1.gif" /> 确认服务条款
|
||||
<img src="/images/pass_pic_arrowhead_2.gif" />
|
||||
<img src="/images/pass_login2.gif" /> 填写基本信息
|
||||
<img src="/images/pass_pic_arrowhead_2.gif" />
|
||||
<img src="/images/pass_login3.gif" /> 注册完成
|
||||
|
||||
|
||||
<?php echo $this->form;?></div>
|
||||
<div class="row-fluit">
|
||||
<div class="span12">
|
||||
<img src="/images/pass_login1.gif" /> 确认服务条款
|
||||
<img src="/images/pass_pic_arrowhead_2.gif" />
|
||||
<img src="/images/pass_login2.gif" /> 填写基本信息
|
||||
<img src="/images/pass_pic_arrowhead_2.gif" />
|
||||
<img src="/images/pass_login3.gif" /> 注册完成
|
||||
<?php echo $this->form;?>
|
||||
</div>
|
||||
</div>
|
|
@ -1,73 +1,74 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('我的数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="/author/accept/ac/search">
|
||||
<input class="span2" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>">
|
||||
<button class="btn" type="submit">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo '<ul class="unstyled">';
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li class="well">
|
||||
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank" class="title"><?php echo $item['title'];?></a></h4>
|
||||
<?php if($item['status']==1) : ?>
|
||||
<span class="dtctrlplan">【操作:
|
||||
<a href="/author/inauthor/ac/datalist/uuid/<?php echo $item['uuid']; ?>">申请管理</a> |
|
||||
<a href="/author/comment/ac/view/uuid/<?php echo $item['uuid']; ?>">反馈</a> |
|
||||
<a href="/author/document/uuid/<?php echo $item['uuid']; ?>">文档</a> |
|
||||
<a href="/author/literature/uuid/<?php echo $item['uuid']; ?>">文献</a> |
|
||||
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid']; ?>">添加文献</a> |
|
||||
<a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>" target="_blank">修改元数据</a> |
|
||||
<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">版本</a> |
|
||||
<a href="/author/qa/uuid/<?php echo $item['uuid']; ?>">QA</a> |
|
||||
<a href="/author/news/uuid/<?php echo $item['uuid']; ?>">新闻</a> |
|
||||
<a href="/author/viewauthors/uuid/<?php echo $item['uuid']; ?>">所有作者</a>
|
||||
<?php if($item['mdstatus']==6) {?>
|
||||
| <a href="/author/delegate/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定将该数据委托至数据中心?');">委托</a>
|
||||
<?php } if($item['mdstatus']==7){ ?>
|
||||
| <a href="/author/delegate/ac/cancel/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定取消该数据的委托?');">取消委托</a>
|
||||
<?php }?> |
|
||||
<a href="/author/sendmail/uuid/<?php echo $item['uuid']; ?>">邮件通知</a>
|
||||
】
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<p><?php echo mb_strlen($item['description'])>400?$this->escape(mb_substr($item['description'],0,400,'UTF-8').'...'):$this->escape($item['description']); ?></p>
|
||||
<p>
|
||||
<?php
|
||||
if ($item['status']==0)
|
||||
{
|
||||
echo '<img src="/images/list_extensions.gif" />您已经申请该数据(如果长时间没有收到回应请联系数据中心)';
|
||||
}
|
||||
?>
|
||||
<span id="data_<?php echo $item['uuid'];?>"></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('我的数据');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="/author/accept/ac/search">
|
||||
<input class="span2" type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>">
|
||||
<button class="btn" type="submit">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo '<ul class="unstyled">';
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li class="well">
|
||||
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank" class="title"><?php echo $item['title'];?></a></h4>
|
||||
<?php if($item['status']==1) : ?>
|
||||
<span class="dtctrlplan">【操作:
|
||||
<a href="/author/inauthor/ac/datalist/uuid/<?php echo $item['uuid']; ?>">申请管理</a> |
|
||||
<a href="/author/comment/ac/view/uuid/<?php echo $item['uuid']; ?>">反馈</a> |
|
||||
<a href="/author/document/uuid/<?php echo $item['uuid']; ?>">文档</a> |
|
||||
<a href="/author/literature/uuid/<?php echo $item['uuid']; ?>">文献</a> |
|
||||
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid']; ?>">添加文献</a> |
|
||||
<a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>" target="_blank">修改元数据</a> |
|
||||
<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">版本</a> |
|
||||
<a href="/author/qa/uuid/<?php echo $item['uuid']; ?>">QA</a> |
|
||||
<a href="/author/news/uuid/<?php echo $item['uuid']; ?>">新闻</a> |
|
||||
<a href="/author/viewauthors/uuid/<?php echo $item['uuid']; ?>">所有作者</a>
|
||||
<?php if($item['mdstatus']==6) {?>
|
||||
| <a href="/author/delegate/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定将该数据委托至数据中心?');">委托</a>
|
||||
<?php } if($item['mdstatus']==7){ ?>
|
||||
| <a href="/author/delegate/ac/cancel/uuid/<?php echo $item['uuid'];?>" onclick="return confirm('是否确定取消该数据的委托?');">取消委托</a>
|
||||
<?php }?> |
|
||||
<a href="/author/sendmail/uuid/<?php echo $item['uuid']; ?>">邮件通知</a> |
|
||||
<a href="/author/fund/ac/formd/uuid/<?php echo $item['uuid']; ?>">支持项目</a>
|
||||
】
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<p><?php echo mb_strlen($item['description'])>400?$this->escape(mb_substr($item['description'],0,400,'UTF-8').'...'):$this->escape($item['description']); ?></p>
|
||||
<p>
|
||||
<?php
|
||||
if ($item['status']==0)
|
||||
{
|
||||
echo '<img src="/images/list_extensions.gif" />您已经申请该数据(如果长时间没有收到回应请联系数据中心)';
|
||||
}
|
||||
?>
|
||||
<span id="data_<?php echo $item['uuid'];?>"></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('申请成为元数据作者');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><a href="/author/fund/">所有项目</a></li>
|
||||
<li class="active"><a href="/author/fund/ac/add">添加新项目</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<div class="alert alert-block alert-error fade in" id="Alert-error-box">
|
||||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||||
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
|
||||
<ul>
|
||||
<?php foreach($this->error as $v) { ?>
|
||||
<li><?= $v ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{ ?>
|
||||
<form class="form-horizontal" method="post">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="title">项目名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title" class="span12" name="title" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="fund_id">编号</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="fund_id" name="fund_id" value="<?= isset($this->data['fund_id']) ? $this->data['fund_id']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="fund_type">类型</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="fund_type" name="fund_type" value="<?= isset($this->data['fund_type']) ? $this->data['fund_type']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="title_en">英文名称</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title_en" name="title_en" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="fund_type_en">英文类型</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="fund_type_en" name="fund_type_en" value="<?= isset($this->data['fund_type_en']) ? $this->data['fund_type_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<?php if(!empty($this->id)) { ?>
|
||||
<input type="hidden" name="id" value=" <?=$this->id?> " />
|
||||
<?php } ?>
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
|
@ -0,0 +1,165 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('申请成为元数据作者');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendPlus($this,'admin_plugin');
|
||||
?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="/author/fund/">所有项目</a></li>
|
||||
<li><a href="/author/fund/ac/add">添加新项目</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(!empty($this->md)) { ?>
|
||||
<div>
|
||||
<?php if(empty($this->ct)) { ?>
|
||||
<a class="btn btn-primary pull-right" href="/author/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>"><i class="icon-plus"></i>为此数据添加项目</a>
|
||||
<?php }else{ ?>
|
||||
<a class="pull-right btn" href="/author/fund/uuid/<?= $this->md['uuid'] ?>">返回</a>
|
||||
<div class="pull-right label label-info">点击“添加此项目”即可将项目添加到元数据</div>
|
||||
<?php } ?>
|
||||
<h3>《<?= $this->md['title'] ?>》 的支持项目</h3>
|
||||
<hr />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?php if(empty($this->AlertType)) $AlertType = "alert-error";else $AlertType = $this->AlertType;?>
|
||||
<div class="alert alert-block fade in <?= $AlertType ?>" id="Alert-error-box">
|
||||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||||
<?php if(!is_array($this->error)) { ?><h4 class="alert-heading"><?= $this->error ?></h4><?php } else { ?>
|
||||
<ul>
|
||||
<?php foreach($this->error as $v) { ?>
|
||||
<li><?= $v ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(!empty($this->msg)) { ?>
|
||||
<div class="alert <?= $this->AlertType;?>">
|
||||
<a data-dismiss="alert" class="close">×</a>
|
||||
<?php echo $this->msg ?>
|
||||
</div>
|
||||
<?php if(!empty($this->jump_url)) { ?>
|
||||
<script language="javascript">setTimeout("self.location='<?php echo $this->jump_url ?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{ ?>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>编号</th>
|
||||
<th>类型</th>
|
||||
<?php if($this->md) { ?>
|
||||
<th width="80">排序</th>
|
||||
<?php }else{ ?>
|
||||
<th>英文标题</th>
|
||||
<th>英文类型</th>
|
||||
<?php } ?>
|
||||
<?php if($this->ct) { ?>
|
||||
<th>添加</th>
|
||||
<?php } ?>
|
||||
<th width="70">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<tr id="DataLine_<?= $item['id']?>">
|
||||
<?php }else{?>
|
||||
<tr id="DataLine_<?= $item['mfid']?>">
|
||||
<?php }?>
|
||||
<td><?= $item['title'] ?></td>
|
||||
<td><?= $item['fund_id'] ?></td>
|
||||
<td><?= $item['fund_type'] ?></td>
|
||||
<?php if($this->md) { ?>
|
||||
<?php if($this->ct) { ?>
|
||||
<td><input type="text" name="order" id="order_<?= $item['id']?>" class="span12" /></td>
|
||||
<?php }else{ ?>
|
||||
<td><input type="text" name="order" id="order_<?= $item['mfid']?>" class="span12" value="<?= $item['place'] ?>" /></td>
|
||||
<?php }?>
|
||||
<?php }else{ ?>
|
||||
<td><?= $item['title_en'] ?></td>
|
||||
<td><?= $item['fund_type_en'] ?></td>
|
||||
<?php } ?>
|
||||
<?php if($this->ct) { ?>
|
||||
<td><a href="javascript:void(0);" class="addtomd" rel="<?= $item['id']?>">添加此项目</a></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
<a href="/author/fund/ac/edit/id/<?= $item['id']?>">编辑</a>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
<?php }else{ ?>
|
||||
<?php if(empty($this->ct)) { ?><a href="javascript:void(0);" class="changeorder" rel="<?= $item['mfid']?>">排序</a> <?php } ?>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['mfid']?>)" id="delbtn_<?= $item['mfid']?>">移除</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
<?php if(!empty($this->ct)) { ?>
|
||||
$('.addtomd').each(function(index, element) {
|
||||
$(this).click(function(){
|
||||
id = $(this).attr('rel');
|
||||
order = $('#order_'+id).val();
|
||||
self.location='/author/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>/id/'+id+'/order/'+ order
|
||||
});
|
||||
});
|
||||
<?php }else{ ?>
|
||||
$('.changeorder').each(function(index, element) {
|
||||
$(this).click(function(){
|
||||
id = $(this).attr('rel');
|
||||
order = $('#order_'+id).val();
|
||||
self.location='/author/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>/mfid/'+id+'/order/'+ order
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
<?php if(empty($this->md)) { ?>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/author/fund/ac/del"
|
||||
}
|
||||
<?php }else{ ?>
|
||||
var info = {
|
||||
btn_prefix : "delbtn_",
|
||||
item_prefix : "DataLine_",
|
||||
url : "/author/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
|
||||
}
|
||||
<?php } ?>
|
||||
</script>
|
|
@ -1,45 +1,45 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('数据申请管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div>
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="/author/inauthor/ac/online">在线下载记录</a></li>
|
||||
<li><a href="/author/inauthor/ac/offline">离线申请记录</a></li>
|
||||
<li class="active"><a href="/author/inauthor/ac/datalist">按数据查看</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<form id="datasearch" class="search_form" action="/author/inauthor/ac/searchdata">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
<div>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo '<ul class="unstyled">';
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li class="well">
|
||||
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></h4>
|
||||
<p>申请次数:<?php echo $item['c'];?> (<a href="/author/inauthor/ac/datalist/uuid/<?php echo $item['uuid'];?>">查看详细</a>)</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('数据申请管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div>
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="/author/inauthor/ac/online">在线下载记录</a></li>
|
||||
<li><a href="/author/inauthor/ac/offline">离线申请记录</a></li>
|
||||
<li class="active"><a href="/author/inauthor/ac/datalist">按数据查看</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>请输入元数据标题关键字进行搜索</p>
|
||||
<form id="datasearch" class="search_form" action="/author/inauthor/ac/searchdata">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
<div>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo '<ul class="unstyled">';
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li class="well">
|
||||
<h4><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></h4>
|
||||
<p>申请次数:<?php echo $item['c'];?> (<a href="/author/inauthor/ac/datalist/uuid/<?php echo $item['uuid'];?>">查看详细</a>)</p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,18 +1,19 @@
|
|||
<div class="sidebar-nav bs-review-nav">
|
||||
<ul class="nav nav-list bs-review-sidenav">
|
||||
<li id="Nav-author-index"><a href="/author/"><i class="icon-chevron-right"></i>介绍</a></li>
|
||||
<li id="Nav-author-newdata"><a href="/author/newdata"><i class="icon-chevron-right"></i>新建数据</a></li>
|
||||
<li id="Nav-author-apply"><a href="/author/apply"><i class="icon-chevron-right"></i>数据认证</a></li>
|
||||
<li id="Nav-author-accept"><a href="/author/accept"><i class="icon-chevron-right"></i>我的数据</a></li>
|
||||
<li id="Nav-author-inauthor"><a href="/author/inauthor"><i class="icon-chevron-right"></i>数据申请管理</a></li>
|
||||
<li id="Nav-author-comment"><a href="/author/comment"><i class="icon-chevron-right"></i>数据反馈管理</a></li>
|
||||
<li id="Nav-author-literature"><a href="/author/literature"><i class="icon-chevron-right"></i>数据文献管理</a></li>
|
||||
<li id="Nav-author-document"><a href="/author/document"><i class="icon-chevron-right"></i>数据文档管理</a></li>
|
||||
<li id="Nav-author-news"><a href="/author/news"><i class="icon-chevron-right"></i>数据新闻管理</a></li>
|
||||
<li id="Nav-author-version"><a href="/author/version"><i class="icon-chevron-right"></i>数据版本管理</a></li>
|
||||
<!--
|
||||
<li><a href="/author/survey">数据调查</a></li>
|
||||
<li><a href="/author/qa">数据QA</a></li> -->
|
||||
<li id="Nav-author-statics"><a href="/author/statics"><i class="icon-chevron-right"></i>信息统计</a></li>
|
||||
</ul>
|
||||
<div class="sidebar-nav bs-review-nav">
|
||||
<ul class="nav nav-list bs-review-sidenav">
|
||||
<li id="Nav-author-index"><a href="/author/"><i class="icon-chevron-right"></i>介绍</a></li>
|
||||
<li id="Nav-author-newdata"><a href="/author/newdata"><i class="icon-chevron-right"></i>新建数据</a></li>
|
||||
<li id="Nav-author-apply"><a href="/author/apply"><i class="icon-chevron-right"></i>数据认证</a></li>
|
||||
<li id="Nav-author-accept"><a href="/author/accept"><i class="icon-chevron-right"></i>我的数据</a></li>
|
||||
<li id="Nav-author-inauthor"><a href="/author/inauthor"><i class="icon-chevron-right"></i>数据申请管理</a></li>
|
||||
<li id="Nav-author-comment"><a href="/author/comment"><i class="icon-chevron-right"></i>数据反馈管理</a></li>
|
||||
<li id="Nav-author-literature"><a href="/author/literature"><i class="icon-chevron-right"></i>数据文献管理</a></li>
|
||||
<li id="Nav-author-document"><a href="/author/document"><i class="icon-chevron-right"></i>数据文档管理</a></li>
|
||||
<li id="Nav-author-news"><a href="/author/news"><i class="icon-chevron-right"></i>数据新闻管理</a></li>
|
||||
<li id="Nav-author-version"><a href="/author/version"><i class="icon-chevron-right"></i>数据版本管理</a></li>
|
||||
<li id="Nav-author-version"><a href="/author/fund"><i class="icon-chevron-right"></i>支持项目</a></li>
|
||||
<!--
|
||||
<li><a href="/author/survey">数据调查</a></li>
|
||||
<li><a href="/author/qa">数据QA</a></li> -->
|
||||
<li id="Nav-author-statics"><a href="/author/statics"><i class="icon-chevron-right"></i>信息统计</a></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,99 +1,94 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('查看数据申请记录');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="wapper">
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
}
|
||||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('查看数据申请记录');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<?php
|
||||
if(!empty($this->error))
|
||||
{
|
||||
echo $this->error;
|
||||
}
|
||||
?>
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/author/inauthor/ac/online">在线下载记录</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/author/inauthor/ac/offline">离线申请记录</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/author/inauthor/ac/datalist">按数据查看</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
<div>
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="/author/inauthor/ac/online">在线下载记录</a></li>
|
||||
<li><a href="/author/inauthor/ac/offline">离线申请记录</a></li>
|
||||
<li class="active"><a href="/author/inauthor/ac/datalist">按数据查看</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<h2>申请记录:".$this->mdtitle."</h2>";
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;
|
||||
if(!empty($item['offa_id'])) :
|
||||
?>
|
||||
<li>
|
||||
echo "<h2>申请记录:".$this->mdtitle."</h2>";
|
||||
echo '<ul class="unstyled">';
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;
|
||||
if(!empty($item['offa_id'])) :
|
||||
?>
|
||||
<li class="well well-small">
|
||||
<p>【离线申请】<?php echo $item['offa_name'];?> (<?php echo $item['offa_email'];?>)</p>
|
||||
<p>申请时间:<?php echo $item['offa_tscreated'];?></p>
|
||||
<p>单位:<?php echo $item['offa_unit'];?></p>
|
||||
<p>项目:<?php echo $item['offa_project'];?></p>
|
||||
<p><span id="ct_<?php echo $item['doid'];?>">
|
||||
<?php if($item['status']==4): echo $item['btns']; endif;?> </span><span id="data_<?php echo $item['doid'];?>"></span></p>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
if(!empty($item['ona_id'])):
|
||||
?>
|
||||
<li>
|
||||
<p>申请时间:<?php echo $item['offa_tscreated'];?></p>
|
||||
<p>单位:<?php echo $item['offa_unit'];?></p>
|
||||
<p>项目:<?php echo $item['offa_project'];?></p>
|
||||
<p><span id="ct_<?php echo $item['doid'];?>">
|
||||
<?php if($item['status']==4): echo $item['btns']; endif;?> </span><span id="data_<?php echo $item['doid'];?>"></span></p>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
if(!empty($item['ona_id'])):
|
||||
?>
|
||||
<li class="well well-small">
|
||||
<p>【在线下载记录】<?php echo $item['ona_name'];?> (<?php echo $item['ona_email'];?>)</p>
|
||||
<p>申请时间:<?php echo $item['ona_tscreated'];?></p>
|
||||
<p>单位:<?php echo $item['ona_unit'];?></p>
|
||||
<p>项目:<?php echo $item['ona_project'];?></p>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
function confirm(uuid,oid){
|
||||
doPD(uuid,"confirm",oid);
|
||||
}
|
||||
function objection(uuid,oid){
|
||||
doPD(uuid,"objection",oid);
|
||||
}
|
||||
function doPD(uuid,pr,oid){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/author/inauthor/ac/offline',
|
||||
'data':'pr='+ pr +'&uuid='+uuid+'&oid='+oid,
|
||||
'success':function(html){
|
||||
$('#ct_'+oid).html(html);$('#data_'+oid).html('');
|
||||
},
|
||||
'beforeSend':function(){
|
||||
$('#data_'+oid).html('<img src="/images/ajax-load-small.gif" />正在处理...');
|
||||
},
|
||||
'timeout': 20000,
|
||||
'error': function(){
|
||||
alert('处理中出现问题,请重试');
|
||||
$('#data_'+oid).html('');
|
||||
}
|
||||
});
|
||||
}
|
||||
<p>申请时间:<?php echo $item['ona_tscreated'];?></p>
|
||||
<p>单位:<?php echo $item['ona_unit'];?></p>
|
||||
<p>项目:<?php echo $item['ona_project'];?></p>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
function confirm(uuid,oid){
|
||||
doPD(uuid,"confirm",oid);
|
||||
}
|
||||
function objection(uuid,oid){
|
||||
doPD(uuid,"objection",oid);
|
||||
}
|
||||
function doPD(uuid,pr,oid){
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':'/author/inauthor/ac/offline',
|
||||
'data':'pr='+ pr +'&uuid='+uuid+'&oid='+oid,
|
||||
'success':function(html){
|
||||
$('#ct_'+oid).html(html);$('#data_'+oid).html('');
|
||||
},
|
||||
'beforeSend':function(){
|
||||
$('#data_'+oid).html('<img src="/images/ajax-load-small.gif" />正在处理...');
|
||||
},
|
||||
'timeout': 20000,
|
||||
'error': function(){
|
||||
alert('处理中出现问题,请重试');
|
||||
$('#data_'+oid).html('');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -15,29 +15,51 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
|||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
function fetch($uuid = "",$include = true){
|
||||
function fetch($uuid = "",$include = true,$uid=0){
|
||||
if(empty($uuid))
|
||||
{
|
||||
$sql = "SELECT * FROM ".$this->tbl_fund." ORDER BY id DESC";
|
||||
if(empty($uid))
|
||||
{
|
||||
$sql = "SELECT * FROM ".$this->tbl_fund." ORDER BY id DESC";
|
||||
}else{
|
||||
$sql = "SELECT * FROM ".$this->tbl_fund." WHERE userid=$uid ORDER BY id DESC";
|
||||
}
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
return $rows;
|
||||
}else{
|
||||
$wheresql = array();
|
||||
|
||||
if($include)
|
||||
{
|
||||
$sql = "SELECT f.*,mf.place,mf.id as mfid FROM ".$this->tbl_fund." f
|
||||
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
|
||||
WHERE uuid='$uuid'
|
||||
ORDER BY mf.place DESC";
|
||||
$wheresql[] = " mf.uuid='$uuid' ";
|
||||
}else{
|
||||
$fids = $this->getMdFunds($uuid);
|
||||
if(count($fids)>0)
|
||||
{
|
||||
$fids = ' WHERE f.id NOT IN ('.join(",",$fids).')';
|
||||
}else{
|
||||
$fids = "";
|
||||
$wheresql[] = ' f.id NOT IN ('.join(",",$fids).')';
|
||||
}
|
||||
$sql = "SELECT f.* FROM ".$this->tbl_fund." f $fids ORDER BY f.id DESC";
|
||||
}
|
||||
if(!empty($uid) && is_int($uid))
|
||||
{
|
||||
$wheresql[] = " f.userid='$uid' ";
|
||||
}
|
||||
|
||||
if(count($wheresql)>0)
|
||||
{
|
||||
$wheresql = " WHERE ".join(" AND ",$wheresql);
|
||||
}else{
|
||||
$wheresql = "";
|
||||
}
|
||||
|
||||
if($include)
|
||||
{
|
||||
$sql = "SELECT f.*,mf.place,mf.id as mfid FROM ".$this->tbl_fund." f
|
||||
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
|
||||
$wheresql
|
||||
ORDER BY mf.place DESC";
|
||||
}else{
|
||||
$sql = "SELECT f.* FROM ".$this->tbl_fund." f $wheresql ORDER BY f.id DESC";
|
||||
}
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
|
@ -52,17 +74,35 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
|||
return $dbh->insert($this->tbl_fund,$data);
|
||||
}
|
||||
|
||||
function update($data,$id)
|
||||
function update($data,$id,$uid=0)
|
||||
{
|
||||
include_once("helper/dbh.php");
|
||||
$dbh = new dbh($this->db);
|
||||
|
||||
if(empty($id))
|
||||
if(!is_numeric($id))
|
||||
{
|
||||
return "参数错误";
|
||||
}
|
||||
|
||||
$state = $dbh->update($this->tbl_fund,$data,"id=$id",true);
|
||||
if(!empty($uid))
|
||||
{
|
||||
if(!is_numeric($uid))
|
||||
{
|
||||
return "参数错误";
|
||||
}
|
||||
$sql = "SELECT * FROM ".$this->tbl_fund." WHERE userid=$uid AND id=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
if(empty($row['id']))
|
||||
{
|
||||
return "您无权修改这条记录";
|
||||
}
|
||||
$condition = " id=$id AND userid=$uid ";
|
||||
}else{
|
||||
$condition = " id=$id ";
|
||||
}
|
||||
|
||||
include_once("helper/dbh.php");
|
||||
$dbh = new dbh($this->db);
|
||||
|
||||
$state = $dbh->update($this->tbl_fund,$data,$condition,true);
|
||||
|
||||
if( $state == true)
|
||||
{
|
||||
|
@ -72,8 +112,29 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
|||
}
|
||||
}
|
||||
|
||||
function delete($id){
|
||||
$sql = "DELETE FROM ".$this->tbl_fund." WHERE id=$id";
|
||||
function delete($id,$uid=0){
|
||||
if(!is_numeric($id))
|
||||
{
|
||||
return "参数错误";
|
||||
}
|
||||
if(!empty($uid))
|
||||
{
|
||||
if(!is_numeric($uid))
|
||||
{
|
||||
return "参数错误";
|
||||
}
|
||||
$sql = "SELECT * FROM ".$this->tbl_fund." WHERE userid=$uid AND id=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
if(empty($row['id']))
|
||||
{
|
||||
return "您无权修改这条记录";
|
||||
}
|
||||
$condition = " id=$id AND userid=$uid ";
|
||||
}else{
|
||||
$condition = " id=$id ";
|
||||
}
|
||||
$sql = "DELETE FROM ".$this->tbl_fund." WHERE $condition";
|
||||
return $this->db->exec($sql);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue