diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php
index 397f61d0..001217bf 100644
--- a/application/admin/controllers/ReviewController.php
+++ b/application/admin/controllers/ReviewController.php
@@ -123,6 +123,24 @@ class Admin_ReviewController extends Zend_Controller_Action
}
}//changestatus 更改状态
+ function editorAction()
+ {
+ include_once("helper/view.php");
+ include_once("data/Review.php");
+
+ $this->view->keyword = $keyword = $this->_request->getParam('keyword');
+
+ $review = new Review();
+ if(!empty($keyword))
+ {
+ $filter['keyword'] = $keyword;
+ $data = $review->needEditor($filter);
+ }else{
+ $data = $review->needEditor();
+ }
+
+ \view::addPaginator($data,$this,NULL,20);
+ }
/*
* acceptAction()待审元数据
@@ -191,16 +209,12 @@ class Admin_ReviewController extends Zend_Controller_Action
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
right join metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
- where m.status in (1,2,3,4) order by m.ts_created desc";
+ where m.status in (1,2,3,4)
+ order by m.ts_created desc";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
- $paginator = Zend_Paginator::factory($rows);
- $paginator->setCurrentPageNumber($this->_getParam('page'));
- $paginator->setItemCountPerPage($this->view->config->page->max);
- $paginator->setView($this->view);
- Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
- $this->view->paginator=$paginator;
+ \view::addPaginator($rows,$this,NULL,20);
}//列表
}//acceptAction
diff --git a/application/admin/views/scripts/review/accept.phtml b/application/admin/views/scripts/review/accept.phtml
index 80f06c7c..4f44491d 100644
--- a/application/admin/views/scripts/review/accept.phtml
+++ b/application/admin/views/scripts/review/accept.phtml
@@ -48,7 +48,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
|
- 分配编辑
+ 更改责任编辑
|
diff --git a/application/admin/views/scripts/review/editor.phtml b/application/admin/views/scripts/review/editor.phtml
new file mode 100644
index 00000000..80f06c7c
--- /dev/null
+++ b/application/admin/views/scripts/review/editor.phtml
@@ -0,0 +1,60 @@
+headTitle($this->config->title->site);
+ $this->headTitle('后台管理');
+ $this->headTitle()->setSeparator(' - ');
+ $this->breadcrumb('首页');
+ $this->breadcrumb('后台首页');
+ $this->breadcrumb('元数据评审');
+ $this->breadcrumb()->setSeparator(' > ');
+?>
+
+
+
+ = $this->partial('review/left.phtml'); ?>
+
+
+ msg or $this->messages) :?>
+
+ msg) : ?>
+
msg; ?>
+ messages): foreach($this->messages as $msg): ?>
+
+
+
+
+
+
+
+
+
+
+ 元数据标题 |
+ 责任编辑 |
+ 接收时间 |
+ 操作 |
+
+ paginator)): ?>
+
+ paginator as $item): ?>
+
+ = $item['title']?> |
+ |
+ |
+
+ 分配编辑
+ |
+
+
+
+
+
+
= $this->paginator; ?>
+
+
\ No newline at end of file
diff --git a/application/admin/views/scripts/review/left.phtml b/application/admin/views/scripts/review/left.phtml
index 1937f856..b9ce7de6 100644
--- a/application/admin/views/scripts/review/left.phtml
+++ b/application/admin/views/scripts/review/left.phtml
@@ -1,6 +1,7 @@
元数据评审
- 投稿元数据
+- 分配责任编辑
- 待审元数据
- 我负责的元数据
diff --git a/application/models/data/Review.php b/application/models/data/Review.php
index 7555fb3d..a4452da9 100644
--- a/application/models/data/Review.php
+++ b/application/models/data/Review.php
@@ -9,9 +9,14 @@ class Review extends Zend_Controller_Plugin_Abstract
public $tbl_mdreview = "mdreview";
public $tbl_user = "users";
- function __construct($db)
+ function __construct($db = NULL)
{
- $this->db = $db;
+ if(empty($db))
+ {
+ $this->db = Zend_Registry::get('db');
+ }else{
+ $this->db = $db;
+ }
}
public function events(Zend_EventManager_EventCollection $events = NULL)
@@ -63,6 +68,56 @@ class Review extends Zend_Controller_Plugin_Abstract
return $reviews;
}
+ //需要分配责任编辑的元数据评审
+ function needEditor($filter = "")
+ {
+ $wheresql = array();
+ $ordersql = array();
+
+ $wheresql[] = " m.status in (1,2,3,4) ";
+ $wheresql[] = " (m.userid IS NULL OR u.usertype != 'administrator') ";
+
+
+ if(isset($filter['keyword']) && !empty($filter['keyword']))
+ {
+ $wheresql[] = " (md.title like '%".$filter['keyword']."%' OR u.username LIKE '%".$filter['keyword']."%' OR u.realname LIKE '%".$filter['keyword']."%') ";
+ }
+
+ if(count($wheresql)>0)
+ {
+ $wheresql = " WHERE ".join(" AND ",$wheresql);
+ }else{
+ $wheresql = "";
+ }
+
+ if(isset($filter['order']) && !empty($filter['order']))
+ {
+ $sort = "DESC";
+ if(isset($filter['sort']) && !empty($filter['sort']) && in_array( strtolower($filter['sort']),array('desc','asc')))
+ {
+ $sort = $filter['sort'];
+ }
+ $ordersql[] = " {$filter['order']} $sort ";
+ }
+
+ if(count($ordersql)>0)
+ {
+ $ordersql = " ORDER BY ".join(',',$ordersql);
+ }else{
+ $ordersql = " ORDER BY m.ts_created desc ";
+ }
+
+ $sql = "select m.*,md.title,u.username,u.realname from mdstatus m
+ right join metadata md on md.uuid=m.uuid
+ left join users u on u.id=m.userid
+ $wheresql
+ $ordersql";
+ $re = $this->db->query($sql);
+ $rows = $re->fetchAll();
+
+ return $rows;
+ }
+
//后台我负责的评审
function adminReviews($filter = "")
{
@@ -91,7 +146,6 @@ class Review extends Zend_Controller_Plugin_Abstract
$sort = $filter['sort'];
}
$ordersql[] = " {$filter['order']} $sort ";
-
}
if(count($wheresql)>0)