添加了数据中心文献的功能

This commit is contained in:
Li Jianxuan 2013-11-05 02:23:49 +00:00
parent 3cd2e16766
commit 8c3d9cf760
3 changed files with 17 additions and 9 deletions

View File

@ -1154,15 +1154,13 @@ class Admin_DataController extends Zend_Controller_Action
} }
$this->view->reference = $reference; $this->view->reference = $reference;
$this->view->page = $this->_getParam('page');
$this->view->pagelimit = 12;
//文献首页 //文献首页
if(empty($ac)) if(empty($ac))
{ {
$this->view->referenceType = $reference->referenceType(); $this->view->referenceType = $reference->referenceType();
$this->view->page = $this->_getParam('page');
$this->view->pagelimit = 12;
view::addPaginator($reference->fetchReferences(),$this, $this->view->pagelimit); view::addPaginator($reference->fetchReferences(),$this, $this->view->pagelimit);
$this->view->years = $reference->countByYear(); $this->view->years = $reference->countByYear();
return true; return true;
@ -1170,23 +1168,25 @@ class Admin_DataController extends Zend_Controller_Action
else if ($ac == "water") else if ($ac == "water")
{ {
$this->view->referenceType = $reference->referenceType(); $this->view->referenceType = $reference->referenceType();
view::addPaginator($reference->fetchThemeReferences('water'),$this,10); view::addPaginator($reference->fetchThemeReferences('water'),$this,$this->view->pagelimit);
return true; return true;
} }
else if ($ac == "westdc") else if ($ac == "westdc")
{ {
$this->view->referenceType = $reference->referenceType(); $this->view->referenceType = $reference->referenceType();
view::addPaginator($reference->fetchWestdcReferences(),$this,10); view::addPaginator($reference->fetchWestdcReferences(),$this,$this->view->pagelimit);
return true; return true;
} }
else if ($ac == "todo") else if ($ac == "todo")
{ {
$this->view->referenceType = $reference->referenceType(); $this->view->referenceType = $reference->referenceType();
view::addPaginator($reference->fetchTodoReferences(),$this,10); view::addPaginator($reference->fetchTodoReferences(),$this,$this->view->pagelimit);
return true; return true;
} }
unset($this->view->reference); unset($this->view->reference);
unset($this->view->page);
unset($this->view->pagelimit);
//添加 //添加
if($ac == "add") if($ac == "add")
@ -1411,7 +1411,10 @@ class Admin_DataController extends Zend_Controller_Action
$risData = $risOutput->processArrayDataToRisData($preData); $risData = $risOutput->processArrayDataToRisData($preData);
$risText = $risOutput->output($risData); $risText = $risOutput->output($risData);
view::Dump($risText);
echo "<pre>";
echo $risText;
echo "</pre>";
} }
}//ris output }//ris output

View File

@ -15,6 +15,7 @@
<label class="control-label" for="inputUuid">元数据UUID</label> <label class="control-label" for="inputUuid">元数据UUID</label>
<div class="controls"> <div class="controls">
<input type="text" name="uuid" id="inputUuid" placeholder="UUID"> <input type="text" name="uuid" id="inputUuid" placeholder="UUID">
<span class="help-block"><a href="javascript:void(0);" onclick="$(this).parent('span').prev('input').val('e31f5ea7-a4af-4ae3-9ac1-1a84132c4338')">设为数据中心文献</a></span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">

View File

@ -38,6 +38,10 @@ table thead tr th {background:#EBF2F6;}
<?= $this->msg ?> <?= $this->msg ?>
<?php } else{ ?> <?php } else{ ?>
<?php if($this->ac == 'westdc'){ ?>
<button type="button" class="btn btn-success" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
<?php } ?>
<?php if(!empty($this->years)) { ?> <?php if(!empty($this->years)) { ?>
<?php foreach($this->years as $k=>$v){ ?> <?php foreach($this->years as $k=>$v){ ?>
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a> <a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>