#494, 实现数据的参考文献支持
This commit is contained in:
parent
37233cf6a1
commit
b1eccdd196
|
@ -949,7 +949,7 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
} //添加
|
} //添加
|
||||||
|
|
||||||
else if($show){
|
else if($show){
|
||||||
$sql = "select mr.id as mdid,mr.refid,r.reference,md.title,md.uuid FROM mdref mr
|
$sql = "select mr.id as mdid,mr.refid,r.reference,md.title,md.uuid,mr.place FROM mdref mr
|
||||||
left join metadata md on md.uuid=mr.uuid
|
left join metadata md on md.uuid=mr.uuid
|
||||||
left join reference r on r.id=mr.refid
|
left join reference r on r.id=mr.refid
|
||||||
where mr.uuid='$show';
|
where mr.uuid='$show';
|
||||||
|
|
|
@ -39,7 +39,10 @@ if($this->type == 'dc')
|
||||||
<input type="text" name="link" id="link" value=""></dd>
|
<input type="text" name="link" id="link" value=""></dd>
|
||||||
<dt id="reftype-label"><label class="required">文献类型</label></dt>
|
<dt id="reftype-label"><label class="required">文献类型</label></dt>
|
||||||
<dd id="reftype-element">
|
<dd id="reftype-element">
|
||||||
<label for="reftype-0"><input type="radio" name="reftype" id="reftype-0" value="0" checked="checked">作者文献</label><br /><label for="reftype-1"><input type="radio" name="reftype" id="reftype-1" value="1">用户文献</label></dd>
|
<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>
|
||||||
|
</dd>
|
||||||
<dt id="submit-label"> </dt><dd id="submit-element">
|
<dt id="submit-label"> </dt><dd id="submit-element">
|
||||||
<input type="submit" name="submit" id="submitbutton" value="发送"></dd></dl></form>
|
<input type="submit" name="submit" id="submitbutton" value="发送"></dd></dl></form>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
|
@ -1,27 +1,50 @@
|
||||||
<?php
|
<?php
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
$this->breadcrumb('特色推荐管理</a>');
|
$this->breadcrumb('数据文献管理</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div id="leftPanel">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<div id="message">
|
<div id="message">
|
||||||
<?php if ($this->msg) : ?>
|
<?php if ($this->msg) : ?>
|
||||||
<p><?php echo $this->msg; ?></p>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<p><?php echo $msg; ?></p>
|
<p><?php echo $msg; ?></p>
|
||||||
<?php endforeach;endif; ?>
|
<?php endforeach;endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<a href="/admin/data/reference/add/1">添加新的数据文献</a>
|
<a href="/admin/data/reference/add/1">添加新的数据文献</a>
|
||||||
<?= $this->form; ?>
|
| <a href="/admin/data/reference/add/1/type/dc">添加数据中心文献</a>
|
||||||
|
| <a href="/admin/data/reference/import/1">导入数据文献文件</a>
|
||||||
|
| <a href="/admin/data/reference/show/e31f5ea7-a4af-4ae3-9ac1-1a84132c4338">查看数据中心文献</a>
|
||||||
|
<?php
|
||||||
|
if($this->type == 'dc')
|
||||||
|
{?>
|
||||||
|
<form id="Reference" enctype="application/x-www-form-urlencoded" action="/admin/data/reference/add/1/" method="post"><dl class="zend_form">
|
||||||
|
<input type="hidden" name="uuid" id="uuid" value="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338" readonly="readonly">
|
||||||
|
<dt id="reference-label"><label for="reference" class="required">文献</label></dt>
|
||||||
|
<dd id="reference-element">
|
||||||
|
<input type="text" name="reference" id="reference" value=""></dd>
|
||||||
|
<dt id="link-label"><label for="link" class="optional">URL(optional)</label></dt>
|
||||||
|
<dd id="link-element">
|
||||||
|
<input type="text" name="link" id="link" value=""></dd>
|
||||||
|
<dt id="reftype-label"><label class="required">文献类型</label></dt>
|
||||||
|
<dd id="reftype-element">
|
||||||
|
<label for="reftype-0"><input type="radio" name="reftype" id="reftype-0" value="0" checked="checked">作者文献</label><br />
|
||||||
|
<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>
|
||||||
|
</dd>
|
||||||
|
<dt id="submit-label"> </dt><dd id="submit-element">
|
||||||
|
<input type="submit" name="submit" id="submitbutton" value="发送"></dd></dl></form>
|
||||||
|
<?php }
|
||||||
|
else ?><?= $this->form; ?>
|
||||||
</div>
|
</div>
|
|
@ -22,7 +22,7 @@ class ReferenceForm extends Zend_Form
|
||||||
$link->setLabel('URL(optional)')
|
$link->setLabel('URL(optional)')
|
||||||
->addFilter('StringTrim');
|
->addFilter('StringTrim');
|
||||||
$reftype=new Zend_Form_Element_Radio('reftype');
|
$reftype=new Zend_Form_Element_Radio('reftype');
|
||||||
$reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献'))->setValue(0);
|
$reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献','2'=>'数据的参考文献'))->setValue(0);
|
||||||
|
|
||||||
$submit = new Zend_Form_Element_Submit('submit');
|
$submit = new Zend_Form_Element_Submit('submit');
|
||||||
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');
|
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');
|
||||||
|
|
Loading…
Reference in New Issue