westdc-zf1/application/default/views/scripts/author/accept.phtml

95 lines
3.7 KiB
PHTML

<?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">
<p>请输入元数据标题关键字进行搜索</p>
<form id="datasearch" class="search_form" action="/author/accept/ac/search">
<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 id="datalist">
<?php
if (count($this->paginator)):
echo "<ul>";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<li>
<a href="/data/<?php echo $item['uuid'];?>" target="_blank" class="title"><?php echo $item['title'];?></a>
<?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="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>">修改元数据</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></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>
<!-- //页面内容 -->
<script>
$('#wapper').width($('body').width()-300);
function apply(uuid){
$.ajax({
'type':"POST",
'url':'/author/apply',
'data':'ac=apply&m=send&uuid='+uuid,
'success':function(data){
if (isObject(data))
{
if(typeof(data.error)!='undefined')
{alert(data.error);}
else{alert('请重试');}
}
else{ alert('出现错误,请稍候');}
$('#data_'+uuid).html('');
},
'beforeSend':function(){
$('#data_'+uuid).html('<img src="/images/ajax-load-small.gif" />正在处理...');
},
'timeout': 30000,
'error': function(){
alert('处理中出现问题,请重试');
$('#data_'+uuid).html('');
}
});
}
function isObject(obj){if(typeof(obj)=='object'){return true;}else if(typeof(obj)!='object'){return false;}else{return false;}}
</script>