FIX westdc/westdc-zf1#21, 调整CARD中数据引用逻辑处理

This commit is contained in:
wlx 2015-08-12 16:58:40 +08:00
parent 9c284068bb
commit 6f05dcdb87
6 changed files with 126 additions and 6 deletions

View File

@ -32,7 +32,27 @@ 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-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>

View File

@ -31,8 +31,28 @@ 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-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>
<span class="label label-info">Paper Cite</span>

View File

@ -33,8 +33,28 @@ 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-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>
<span class="label label-info">Paper Cite</span>

View File

@ -32,7 +32,27 @@ 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-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>

View File

@ -32,8 +32,28 @@ 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-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>
<span class="label label-info">Paper Cite</span>

View File

@ -38,8 +38,28 @@ 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-quote-left text-success"></i>Citations<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<ol>
<?php foreach($this->mcitation as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo '<a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo '<a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php elseif (($md->citation) || (count($this->mcitation)==1)) :
if (!$md->citation) $md->citation=$this->mcitation[0]->reference;
?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><span class="label label-info">Data Citation</span>