diff --git a/module/doc/control.php b/module/doc/control.php index 5dce560170..fc1d1f63ec 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -202,12 +202,22 @@ class doc extends control } else { + $data = (array)zget($blockData->content, 'data', array()); + if($type == 'task') + { + foreach($data as $taskID => $task) + { + $task->canView = $this->execution->checkPriv($task->execution); + $data[$taskID] = $task; + } + } + $this->app->loadClass('pager', true); $this->view->idList = (array)zget($blockData->content, 'idList', array()); $this->view->cols = (array)zget($blockData->content, 'cols', array()); - $this->view->data = (array)zget($blockData->content, 'data', array()); - $this->view->pager = new pager(count($this->view->data), 10); + $this->view->data = $data; + $this->view->pager = new pager(count($data), 10); } $this->view->type = $type; diff --git a/module/doc/js/zentaolist.ui.js b/module/doc/js/zentaolist.ui.js index 8d2468d163..aa4fb31f32 100644 --- a/module/doc/js/zentaolist.ui.js +++ b/module/doc/js/zentaolist.ui.js @@ -280,6 +280,18 @@ window.renderCell = function(result, info) if(info.row.data.reviewedDate == '0000-00-00') info.row.data.reviewedDate = ''; } + if(blockType == 'task') + { + if(result) + { + if(info.col.name == 'name' && !info.row.data.canView) + { + result.shift(); + result.push({html: info.row.data.name}); + } + } + } + return result; };