调整对象模式
This commit is contained in:
parent
557b667f04
commit
4fbbb80f1c
|
@ -31,7 +31,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<div id="ItemSummary">
|
||||
<div id="category">
|
||||
<ul><?php foreach($this->category as $cat): ?>
|
||||
<li><a href="/heihe/category/code/<?php echo $cat['code'];?>"><?php echo $this->escape($cat['name_zh']);?></a></li>
|
||||
<li><a href="/heihe/category/code/<?php echo $cat->code;?>"><?php echo $this->escape($cat->name_zh);?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -39,15 +39,15 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
$kt='';
|
||||
$i=0;
|
||||
foreach($this->keys as $cg) :
|
||||
if ($kt==$cg['keytype']) :
|
||||
if ($kt==$cg->keytype) :
|
||||
$i+=1;
|
||||
else :
|
||||
if (!empty($kt)) echo '</ul></div>';
|
||||
$kt=$cg['keytype'];
|
||||
$kt=$cg->keytype;
|
||||
$i=0;
|
||||
endif;
|
||||
if ($i==0) echo '<div id="'.$cg['keytype'].'"><ul>';
|
||||
echo '<li><a href="/heihe/tag/key/'.urlencode($cg['keyword']).'">'.$cg['keyword'].'</a></li>';
|
||||
if ($i==0) echo '<div id="'.$cg->keytype.'"><ul>';
|
||||
echo '<li><a href="/heihe/tag/key/'.urlencode($cg->keyword).'">'.$cg->keyword.'</a></li>';
|
||||
endforeach;
|
||||
echo '</ul></div>';
|
||||
?>
|
||||
|
@ -56,7 +56,7 @@ echo '</ul></div>';
|
|||
<?php if ($this->series): ?>
|
||||
<div id="series">
|
||||
<ul><?php foreach($this->series as $serie): ?>
|
||||
<li><a href="/data/series/id/<?php echo $serie['id']; ?>"> <?php echo $this->escape($serie['name']);?></a></li>
|
||||
<li><a href="/data/series/id/<?php echo $serie->id; ?>"> <?php echo $this->escape($serie->name);?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -121,24 +121,24 @@ $party_zh=array('resourceProvider'=>'资源提供者','custodian'=>'维护者','
|
|||
$r='';
|
||||
$i=0;
|
||||
foreach($this->authors as $k=>$author) :
|
||||
if ($author['role']!=$r)
|
||||
if ($author->role!=$r)
|
||||
{
|
||||
$r=$author['role'];
|
||||
$r=$author->role;
|
||||
$i=0;
|
||||
if ($k>0) echo '</li>';
|
||||
echo '<li>'.$party_zh[$author['role']].':';
|
||||
echo '<li>'.$party_zh[$author->role].':';
|
||||
}
|
||||
if ($i>0) echo ',';
|
||||
$i+=1;
|
||||
if (!empty($author['email']) && $r!='principalInvestigator')
|
||||
echo '<a href="mailto:'.$author['email'].'">';
|
||||
echo '<strong title="'.$author['organisation'].'">';
|
||||
if (!empty($author['individual']))
|
||||
echo $author['individual'];
|
||||
if (!empty($author->email) && $r!='principalInvestigator')
|
||||
echo '<a href="mailto:'.$author->email.'">';
|
||||
echo '<strong title="'.$author->organisation.'">';
|
||||
if (!empty($author->individual))
|
||||
echo $author->individual;
|
||||
else
|
||||
echo $author['organisation'];
|
||||
echo $author->organisation;
|
||||
echo '</strong>';
|
||||
if (!empty($author['email'])) echo '</a>';
|
||||
if (!empty($author->email)) echo '</a>';
|
||||
if ($k+1==count($this->authors)) echo '</li>';
|
||||
endforeach;
|
||||
?>
|
||||
|
@ -172,10 +172,10 @@ endforeach;
|
|||
<h2>建议参考文献</h2>
|
||||
<ol>
|
||||
<?php foreach($this->ref as $ref) :
|
||||
if (empty($ref['link']))
|
||||
echo '<li>'.$ref['reference'].'</li>';
|
||||
if (empty($ref->link))
|
||||
echo '<li>'.$ref->reference.'</li>';
|
||||
else
|
||||
echo '<li>'.$ref['reference'].' <a href="'.$ref['link'].'">下载</a></li>';
|
||||
echo '<li>'.$ref->reference.' <a href="'.$ref->link.'">下载</a></li>';
|
||||
endforeach;
|
||||
?>
|
||||
</ol>
|
||||
|
@ -184,7 +184,7 @@ endforeach;
|
|||
<?php
|
||||
if ($this->uselimits) :
|
||||
foreach($this->uselimits as $uselimit) :
|
||||
echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($uselimit['uselimit'])).'</p>';
|
||||
echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($uselimit->uselimit)).'</p>';
|
||||
endforeach;
|
||||
?>
|
||||
<?php else : ?>
|
||||
|
@ -200,14 +200,14 @@ endforeach;
|
|||
<?php if ($this->resources) : ?>
|
||||
<h2>其他在线资源</h2>
|
||||
<ul><?php foreach($this->resources as $link) : ?>
|
||||
<li><a href="<?php echo $link['linkage']; ?>" title="<?php echo $this->escape($link['description']); ?>">
|
||||
<li><a href="<?php echo $link->linkage; ?>" title="<?php echo $this->escape($link->description); ?>">
|
||||
<?php
|
||||
if (!empty($link['name']))
|
||||
echo $this->escape($link['name']);
|
||||
elseif (!empty($link['description']))
|
||||
echo $this->escape($link['description']);
|
||||
if (!empty($link->name))
|
||||
echo $this->escape($link->name);
|
||||
elseif (!empty($link->description))
|
||||
echo $this->escape($link->description);
|
||||
else
|
||||
echo $link['linkage'];
|
||||
echo $link->linkage;
|
||||
?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -21,10 +21,11 @@
|
|||
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||
</h1>
|
||||
<div id="right">
|
||||
|
||||
<div id="ItemSummary">
|
||||
<div id="category">
|
||||
<ul><?php foreach($this->category as $cat): ?>
|
||||
<li><a href="/water/category/code/<?php echo $cat['code'];?>"><?php echo $this->escape($cat['name_zh']);?></a></li>
|
||||
<li><a href="/heihe/category/code/<?php echo $cat->code;?>"><?php echo $this->escape($cat->name_zh);?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -32,15 +33,15 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
$kt='';
|
||||
$i=0;
|
||||
foreach($this->keys as $cg) :
|
||||
if ($kt==$cg['keytype']) :
|
||||
if ($kt==$cg->keytype) :
|
||||
$i+=1;
|
||||
else :
|
||||
if (!empty($kt)) echo '</ul></div>';
|
||||
$kt=$cg['keytype'];
|
||||
$kt=$cg->keytype;
|
||||
$i=0;
|
||||
endif;
|
||||
if ($i==0) echo '<div id="'.$cg['keytype'].'"><ul>';
|
||||
echo '<li><a href="/water/tag/key/'.urlencode($cg['keyword']).'">'.$cg['keyword'].'</a></li>';
|
||||
if ($i==0) echo '<div id="'.$cg->keytype.'"><ul>';
|
||||
echo '<li><a href="/heihe/tag/key/'.urlencode($cg->keyword).'">'.$cg->keyword.'</a></li>';
|
||||
endforeach;
|
||||
echo '</ul></div>';
|
||||
?>
|
||||
|
@ -49,7 +50,7 @@ echo '</ul></div>';
|
|||
<?php if ($this->series): ?>
|
||||
<div id="series">
|
||||
<ul><?php foreach($this->series as $serie): ?>
|
||||
<li><a href="/data/series/id/<?php echo $serie['id']; ?>"> <?php echo $this->escape($serie['name']);?></a></li>
|
||||
<li><a href="/data/series/id/<?php echo $serie->id; ?>"> <?php echo $this->escape($serie->name);?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -96,9 +97,9 @@ else
|
|||
</ul>
|
||||
<div id="linkurl">
|
||||
<?php if (!$md->datatype) : ?>
|
||||
<a href="/water/download/uuid/<?php echo $md->uuid; ?>"><img src="/images/download.png" title="直接下载" /></a>
|
||||
<a href="/heihe/download/uuid/<?php echo $md->uuid; ?>"><img src="/images/download.png" title="直接下载" /></a>
|
||||
<?php endif; ?>
|
||||
<a href="/water/order/uuid/<?php echo $md->uuid; ?>"><img src="/images/order.png" title="免费!离线申请此数据(在线数据和离线数据都可申请)"/></a>
|
||||
<a href="/heihe/order/uuid/<?php echo $md->uuid; ?>"><img src="/images/order.png" title="免费!离线申请此数据(在线数据和离线数据都可申请)"/></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -114,37 +115,40 @@ $party_zh=array('resourceProvider'=>'资源提供者','custodian'=>'维护者','
|
|||
$r='';
|
||||
$i=0;
|
||||
foreach($this->authors as $k=>$author) :
|
||||
if ($author['role']!=$r)
|
||||
if ($author->role!=$r)
|
||||
{
|
||||
$r=$author['role'];
|
||||
$r=$author->role;
|
||||
$i=0;
|
||||
if ($k>0) echo '</li>';
|
||||
echo '<li>'.$party_zh[$author['role']].':';
|
||||
echo '<li>'.$party_zh[$author->role].':';
|
||||
}
|
||||
if ($i>0) echo ',';
|
||||
$i+=1;
|
||||
if (!empty($author['email']) && $r!='principalInvestigator')
|
||||
echo '<a href="mailto:'.$author['email'].'">';
|
||||
echo '<strong title="'.$author['organisation'].'">';
|
||||
if (!empty($author['individual']))
|
||||
echo $author['individual'];
|
||||
if (!empty($author->email) && $r!='principalInvestigator')
|
||||
echo '<a href="mailto:'.$author->email.'">';
|
||||
echo '<strong title="'.$author->organisation.'">';
|
||||
if (!empty($author->individual))
|
||||
echo $author->individual;
|
||||
else
|
||||
echo $author['organisation'];
|
||||
echo $author->organisation;
|
||||
echo '</strong>';
|
||||
if (!empty($author['email'])) echo '</a>';
|
||||
if (!empty($author->email)) echo '</a>';
|
||||
if ($k+1==count($this->authors)) echo '</li>';
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
<hr />
|
||||
<ul>
|
||||
<li>元数据更新时间:<?php print date('Y-m-d',strtotime($md->ts_created)); ?> <a href="/water/xml/uuid/<?php echo $md->uuid;?>"><img src="/images/xml.gif" alt="查看XML源文件"></a></li>
|
||||
<!--<li><a href="/data/detail/id/<?php echo $md->id;?>">详细元数据</a></li>-->
|
||||
<li>元数据更新时间:<?php print date('Y-m-d',strtotime($md->ts_created)); ?>
|
||||
<a href="/heihe/xml/uuid/<?php echo $md->uuid;?>"><img src="/images/xml.gif" alt="查看XML源文件"></a>
|
||||
<a href="/data/doc/uuid/<?php echo $md->uuid; ?>"><img src="/images/doc-icon.png" alt="Word doc格式"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="left">
|
||||
|
||||
<div id="ImageViewer"><img src="/data/thumb/id/<?php echo $md->id;?>" /> </div>
|
||||
<div id="abstract">
|
||||
<p>
|
||||
|
@ -152,9 +156,8 @@ endforeach;
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div id="cite">
|
||||
<hr />
|
||||
<?php if ($md->citation) : ?>
|
||||
<h2>本数据引用方式</h2>
|
||||
<p><?php echo $this->escape($md->citation);?></p>
|
||||
|
@ -163,10 +166,10 @@ endforeach;
|
|||
<h2>建议参考文献</h2>
|
||||
<ol>
|
||||
<?php foreach($this->ref as $ref) :
|
||||
if (empty($ref['link']))
|
||||
echo '<li>'.$ref['reference'].'</li>';
|
||||
if (empty($ref->link))
|
||||
echo '<li>'.$ref->reference.'</li>';
|
||||
else
|
||||
echo '<li>'.$ref['reference'].' <a href="'.$ref['link'].'">下载</a></li>';
|
||||
echo '<li>'.$ref->reference.' <a href="'.$ref->link.'">下载</a></li>';
|
||||
endforeach;
|
||||
?>
|
||||
</ol>
|
||||
|
@ -175,7 +178,7 @@ endforeach;
|
|||
<?php
|
||||
if ($this->uselimits) :
|
||||
foreach($this->uselimits as $uselimit) :
|
||||
echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($uselimit['uselimit'])).'</p>';
|
||||
echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($uselimit->uselimit)).'</p>';
|
||||
endforeach;
|
||||
?>
|
||||
<?php else : ?>
|
||||
|
@ -191,14 +194,14 @@ endforeach;
|
|||
<?php if ($this->resources) : ?>
|
||||
<h2>其他在线资源</h2>
|
||||
<ul><?php foreach($this->resources as $link) : ?>
|
||||
<li><a href="<?php echo $link['linkage']; ?>" title="<?php echo $link['description']; ?>">
|
||||
<li><a href="<?php echo $link->linkage; ?>" title="<?php echo $this->escape($link->description); ?>">
|
||||
<?php
|
||||
if (!empty($link['name']))
|
||||
echo $link['name'];
|
||||
elseif (!empty($link['description']))
|
||||
echo $link['description'];
|
||||
if (!empty($link->name))
|
||||
echo $this->escape($link->name);
|
||||
elseif (!empty($link->description))
|
||||
echo $this->escape($link->description);
|
||||
else
|
||||
echo $link['linkage'];
|
||||
echo $link->linkage;
|
||||
?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue