add doi action and template

This commit is contained in:
Li Jianxuan 2013-04-21 13:03:53 +00:00
parent 9fb68755a7
commit 8122670e12
4 changed files with 215 additions and 41 deletions

View File

@ -3515,6 +3515,16 @@ class Admin_DataController extends Zend_Controller_Action
}//fund
public function doiAction()
{
$this->_helper->layout->setLayout('administry');
$ac = $this->_getParam('ac');
$submit = $this->_getParam('submit');
include_once("data/Doi.php");
$fund = new Doi($this->db);
}//doi
//发送邀请专家的邮件
public function sendMailToExpert($pid,$name,$email,$code,$test=0)
{

View File

@ -0,0 +1,164 @@
<?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="/admin/data">数据管理</a>');
$this->breadcrumb('DOI');
$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="span2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<li class="active"><a href="/admin/data/fund/">所有项目</a></li>
<li><a href="/admin/data/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="/admin/data/fund/ac/formd/uuid/<?= $this->md['uuid'] ?>"><i class="icon-plus"></i>为此数据添加项目</a>
<?php }else{ ?>
<a class="pull-right btn" href="/admin/data/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="/admin/data/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='/admin/data/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='/admin/data/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 : "/admin/data/fund/ac/del"
}
<?php }else{ ?>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/fund/ac/mdfunddel/uuid/<?= $this->md['uuid'] ?>"
}
<?php } ?>
</script>

View File

@ -1,21 +1,22 @@
<ul>
<li class="title">数据管理</li>
<li><a href="/admin/data/md">元数据管理</a></li>
<li><a href="/admin/data/newdata">新建元数据</a></li>
<li><a href="/admin/data/author">数据作者管理</a></li>
<li><a href="/admin/data/version">数据版本管理</a></li>
<li><a href="/admin/data/comment">数据反馈管理</a></li>
<li><a href="/admin/data/reference">数据文献管理</a></li>
<li><a href="/admin/data/attachments">数据附件管理</a></li>
<!--
<li><a href="/admin/data/import">上传元数据文件</a></li>
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li> -->
<li><a href="/admin/data/datafileimport">导入数据目录</a></li>
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
<li><a href="/admin/data/feature">特色推荐</a></li>
<li><a href="/admin/data/source">项目来源管理</a></li>
<li><a href="/admin/data/project">汇交计划</a></li>
<li><a href="/admin/data/fund">支持项目</a></li>
<ul>
<li class="title">数据管理</li>
<li><a href="/admin/data/md">元数据管理</a></li>
<li><a href="/admin/data/newdata">新建元数据</a></li>
<li><a href="/admin/data/author">数据作者管理</a></li>
<li><a href="/admin/data/version">数据版本管理</a></li>
<li><a href="/admin/data/comment">数据反馈管理</a></li>
<li><a href="/admin/data/reference">数据文献管理</a></li>
<li><a href="/admin/data/attachments">数据附件管理</a></li>
<!--
<li><a href="/admin/data/import">上传元数据文件</a></li>
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li> -->
<li><a href="/admin/data/datafileimport">导入数据目录</a></li>
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
<li><a href="/admin/data/feature">特色推荐</a></li>
<li><a href="/admin/data/source">项目来源管理</a></li>
<li><a href="/admin/data/project">汇交计划</a></li>
<li><a href="/admin/data/fund">支持项目</a></li>
<li><a href="/admin/data/doi">DOI</a></li>
</ul>

View File

@ -1,21 +1,20 @@
<?php
class Doi
{
private $db; //传入PDO对象.
private $auth = NULL; //Zend_Auth 对象
//使用到的公共变量
public $tbl_user = "users";
function __construct($db,Zend_Auth $auth=NULL)
{
$this->db = $db;
$this->auth = $auth;
}
function _create()
{
}
}
<?php
class Doi
{
private $db; //传入PDO对象.
private $auth = NULL; //Zend_Auth 对象
//使用到的公共变量
public $tbl_user = "users";
function __construct($db)
{
$this->db = $db;
}
function _create()
{
}
}