#462, add fund support

This commit is contained in:
wlx 2013-05-14 22:46:45 +00:00
parent 44321d4085
commit c162b5d27a
2 changed files with 24 additions and 8 deletions

View File

@ -97,10 +97,18 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</ul>
<hr />
<?php }?>
<?php if ($md->suppinfo) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<hr />
<?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php if(!empty($this->fund)) : ?>
<ul>
<?php foreach($this->fund as $k=>$v) : ?>
<li><?= $v['fund_type'] ?><?= $v['title'] ?>(项目编号:<?= $v['fund_id']?>) [<?= $v['fund_type_en'] ?>(No. <?= $v['fund_id']?>)]</li>
<?php endforeach; ?>
</ul>
<?php elseif(!empty($md->suppinfo)) : ?>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr />
<?php endif; ?>
<?php if ($this->resources) : ?>
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>

View File

@ -88,10 +88,18 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</ul>
<hr />
<?php }?>
<?php if ($md->suppinfo) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<hr />
<?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php if(!empty($this->fund)) : ?>
<ul>
<?php foreach($this->fund as $k=>$v) : ?>
<li><?= $v['fund_type'] ?><?= $v['title'] ?>(项目编号:<?= $v['fund_id']?>) [<?= $v['fund_type_en'] ?>(No. <?= $v['fund_id']?>)]</li>
<?php endforeach; ?>
</ul>
<?php elseif(!empty($md->suppinfo)) : ?>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr />
<?php endif; ?>
<?php if ($this->resources) : ?>
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>