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