fix the bug in author contorller
This commit is contained in:
parent
d2e3a4ad33
commit
bb4eacce87
|
@ -1595,14 +1595,11 @@ class AuthorController extends Zend_Controller_Action
|
|||
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($uuid));
|
||||
$rows = $sth->fetchAll();
|
||||
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(10);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
include_once("helper/view.php");
|
||||
view::addPaginator($rows,$this->view,$this->_request);
|
||||
$this->view->datas = $rows;
|
||||
}else{
|
||||
$this->view->error = "参数有误";
|
||||
}
|
||||
|
|
|
@ -26,10 +26,12 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
|
||||
<div>
|
||||
<h2>根据已有数据创建元数据</h2>
|
||||
<div class="input-append">
|
||||
<form id="datasearch" class="search_form" action="/author/newdata/ac/add-by-data">
|
||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo '<ul class="unstyled">';
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
|
@ -21,7 +20,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
echo $this->error;
|
||||
}
|
||||
?>
|
||||
<h3><a href="/data/<?php echo $this->paginator[0]['uuid']; ?>"><?php echo $this->paginator[0]['title']; ?></a> </h3>
|
||||
<h3><a href="/data/<?php echo $this->datas[0]['uuid']; ?>"><?php echo $this->datas[0]['title']; ?></a> </h3>
|
||||
<div class="well">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
|
|
Loading…
Reference in New Issue