merge heihedata branch r5102 - r5109 into trunk
This commit is contained in:
parent
fb7a73ad8e
commit
62e50fb6ea
|
@ -499,13 +499,13 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
}//search
|
||||
else{
|
||||
|
||||
$sql = "SELECT md.*,s.viewed,g.id as gid,gen.id as genid,st.status as mdstatus,ds.id as datasetid,dataspatial.id as stid FROM metadata md
|
||||
$sql = "SELECT md.*,s.viewed,g.id as gid,gen.id as genid,st.status as mdstatus,ds.id as datasetid,spatial.stid as stid FROM metadata md
|
||||
LEFT JOIN mdstat s ON md.uuid=s.uuid
|
||||
LEFT JOIN geonetworkmetadata g ON g.uuid=md.uuid
|
||||
LEFT JOIN mdstatus st ON md.uuid=st.uuid
|
||||
LEFT JOIN dataset ds ON md.uuid=ds.uuid
|
||||
left join en.geonetworkmetadata gen on gen.uuid=md.uuid
|
||||
left join dataspatial on dataspatial.uuid=md.uuid
|
||||
left join (select count(uuid) as stid,uuid from dataspatial group by uuid) as spatial on spatial.uuid=md.uuid
|
||||
ORDER BY md.id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
|
@ -4078,7 +4078,7 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
}else{
|
||||
$this->view->data['doi'] = $metadata['doi'];
|
||||
$this->view->data['info'] = $doi->data_process_out($this->view->data);
|
||||
if(empty($this->view->data['ts_published']))
|
||||
//if(empty($this->view->data['ts_published']))
|
||||
{
|
||||
$this->view->data['title'] = $metadata['title'];
|
||||
$this->view->data['title_en'] = $metadata['title_en'];
|
||||
|
|
|
@ -12,11 +12,6 @@ class IndexController extends Zend_Controller_Action
|
|||
|
||||
function indexAction()
|
||||
{
|
||||
//数据通讯
|
||||
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
|
||||
$this->view->newsletter=$l->getLast();
|
||||
$name=basename($this->view->newsletter,'.pdf');
|
||||
list(,$this->view->newsletterno)=explode("_",$name);
|
||||
//统计数据
|
||||
$sql='select (select count(*) from users) as usernum,(select count(*) from metadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
|
||||
$row=$this->db->fetchRow($sql);
|
||||
|
@ -38,9 +33,6 @@ class IndexController extends Zend_Controller_Action
|
|||
//特色推荐
|
||||
$sql="select * from datafeature order by id desc";
|
||||
$this->view->feature=$this->db->fetchRow($sql);
|
||||
//特色数据集
|
||||
$sql="select * from datasetcd order by random()";
|
||||
$this->view->datasetcd=$this->db->fetchRow($sql);
|
||||
//下载最多数据(top 5)
|
||||
$sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
|
||||
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||
|
|
|
@ -37,19 +37,43 @@ h3.gs_rt{font-size:110%;}
|
|||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<?php if ($md->citation) : ?>
|
||||
<?php if ($this->mcitation && (count($this->mcitation)>1)) : ?>
|
||||
<hr />
|
||||
<h4><i class="icon-eye-open text-success"></i>本数据要求的多篇文献引用</h4>
|
||||
<ol>
|
||||
<?php foreach($this->mcitation as $ref) :
|
||||
if (empty($ref->link))
|
||||
{
|
||||
echo '<li>'.$ref->reference;
|
||||
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>查看</a>';
|
||||
if(!empty($ref->attid)) {
|
||||
echo ' <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>下载</a>';
|
||||
}
|
||||
echo "</li>";
|
||||
}
|
||||
else
|
||||
echo '<li>'.$ref->reference.'<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>查看</a> <a href="'.$ref->link.'"><i class="icon-download text-success"></i>下载</a></li>';
|
||||
endforeach;
|
||||
?>
|
||||
</ol>
|
||||
<?php else: ?>
|
||||
|
||||
<?php if (($md->citation) || (count($this->mcitation)==1)) :
|
||||
if (!$md->citation || (count($this->mcitation)==1)) $md->citation=$this->mcitation[0]->reference;
|
||||
?>
|
||||
<hr />
|
||||
<h4><i class="icon-quote-left muted"></i>本数据引用方式<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-23.html" ><i class="icon-comment"></i>数据引用帮助</a></h4>
|
||||
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?><span class="label label-info">文章的引用</span>
|
||||
<?php endif; echo $this->escape($md->citation);?></p>
|
||||
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
|
||||
<p><span class="label label-info">数据的引用</span>
|
||||
<?php
|
||||
echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.$md->publish_year.'. doi:'.$md->doi;
|
||||
echo ' ['.substr($md->author_en,1,-1).'. '.$md->title_en.'. '.$md->publisher_en.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi.']';
|
||||
<?php endif; echo $this->escape($md->citation);if (strpos($md->citation,$md->datadoi)) : ?>
|
||||
(下载引用:<a href="/service/ris/lang/cn/uuid/<?php echo $md->uuid; ?>">RIS格式</a> | <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS英文格式</a> | <a href="/service/bibtex/lang/cn/uuid/<?php echo $md->uuid; ?>">Bibtex格式</a> | <a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex英文格式</a>)
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
|
||||
<p><span class="label label-info">数据的引用</span><?php
|
||||
echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi;
|
||||
echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi.']';
|
||||
?> (下载引用:<a href="/service/ris/lang/cn/uuid/<?php echo $md->uuid; ?>">RIS格式</a> | <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS英文格式</a> | <a href="/service/bibtex/lang/cn/uuid/<?php echo $md->uuid; ?>">Bibtex格式</a> | <a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex英文格式</a>)</p>
|
||||
<?php endif;
|
||||
endif; if ($this->ref) : ?>
|
||||
<?php endif; endif; endif; if ($this->ref) : ?>
|
||||
<hr />
|
||||
<h4><i class="icon-eye-open text-success"></i>相关文献(作者推荐)</h4>
|
||||
<ol>
|
||||
|
|
Loading…
Reference in New Issue