添加数据的多文献引用方式,hiwater定制

This commit is contained in:
wlx 2013-06-16 16:34:41 +00:00
parent 0c27367b7a
commit f865c0289e
6 changed files with 41 additions and 6 deletions

View File

@ -42,6 +42,7 @@ if($this->type == 'dc')
<label for="reftype-0"><input type="radio" name="reftype" id="reftype-0" value="0" checked="checked">作者文献</label>
<label for="reftype-1"><input type="radio" name="reftype" id="reftype-1" value="1">用户文献</label>
<label for="reftype-2"><input type="radio" name="reftype" id="reftype-2" value="2">数据的参考文献</label>
<label for="reftype-3"><input type="radio" name="reftype" id="reftype-3" value="3">作者要求的文献引用方式(多篇)</label>
</dd>
<dt id="submit-label">&#160;</dt><dd id="submit-element">
<input type="submit" name="submit" id="submitbutton" value="发送"></dd></dl></form>

View File

@ -609,6 +609,10 @@ class DataController extends Zend_Controller_Action
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1";
$sql=$this->db->quoteInto($sql,$uuid);
$this->view->userref=$this->db->fetchAll($sql);
//多篇引用形式hiwater
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=3 order by m.place";
$sql=$this->db->quoteInto($sql,$uuid);
$this->view->mcitation=$this->db->fetchAll($sql);
//相关用户
$sql="select p.email,p.individual,p.organisation,r.role from role r left join responsible p on r.resid=p.id where r.uuid=? order by r.role,r.id";
$this->view->authors=$this->db->fetchAll($sql,array($uuid));

View File

@ -26,7 +26,9 @@
<textarea class="full" style="height:40px;" id="ref" name="ref"></textarea><br />
<input type="hidden" name="uuid" value="<?php echo $this->uuid;?>" />
<input type="radio" id="reftype" name="reftype" value="0" checked />数据作者的文献
<input type="radio" id="reftype" name="reftype" value="1" />数据用户的文献<br />
<input type="radio" id="reftype" name="reftype" value="1" />数据用户的文献
<input type="radio" id="reftype" name="reftype" value="2" />数据的直接参考文献
<input type="radio" id="reftype" name="reftype" value="3" />作者要求的多篇引用文献<br />
<label>数据上传:</label>
<div><input id="file_upload" name="Filedata" type="file" /></div>
<div id="datalist"></div>

View File

@ -35,7 +35,21 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
</p>
</div>
<div>
<div>
<?php if ($this->mcitation) : ?>
<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.'</li>';
else
echo '<li>'.$ref->reference.' <a href="'.$ref->link.'"><i class="icon-download text-success"></i>下载</a></li>';
endforeach;
?>
</ol>
<?php else: ?>
<?php if ($md->citation) : ?>
<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>
@ -49,7 +63,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
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>

View File

@ -33,7 +33,21 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
</p>
</div>
<div>
<div>
<?php if ($this->mcitation) : ?>
<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.'</li>';
else
echo '<li>'.$ref->reference.' <a href="'.$ref->link.'"><i class="icon-download text-success"></i>下载</a></li>';
endforeach;
?>
</ol>
<?php else: ?>
<?php if ($md->citation) : ?>
<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>
@ -47,7 +61,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
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>

View File

@ -22,7 +22,7 @@ class ReferenceForm extends Zend_Form
$link->setLabel('URL(optional)')
->addFilter('StringTrim');
$reftype=new Zend_Form_Element_Radio('reftype');
$reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献','2'=>'数据的参考文献'))->setValue(0);
$reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献','2'=>'数据的参考文献','3'=>'作者要求的文献引用方式(多篇)'))->setValue(0);
$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');