diff --git a/module/action/model.php b/module/action/model.php index 4be0e25a0e..679ebcb02e 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -611,7 +611,6 @@ class actionModel extends model ->beginIF($this->config->global->flow == 'onlyTask')->andWhere('objectType')->notin('product,productplan,release,story,testcase,testreport,testsuite')->fi() ->beginIF($this->config->global->flow == 'onlyTest')->andWhere('objectType')->notin('project,productplan,release,story,task')->fi() ->orderBy($orderBy) - ->beginIF(!$pager)->limit(30)->fi() ->page($pager) ->fetchAll(); diff --git a/module/block/control.php b/module/block/control.php index 0b54d2875f..bb0e9f2859 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -278,7 +278,11 @@ class block extends control */ public function dynamic() { - $this->view->actions = $this->loadModel('action')->getDynamic('all', 'today'); + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager(0, 30, 1); + + $this->view->actions = $this->loadModel('action')->getDynamic('all', 'today', 'date_desc', $pager); $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->display(); } diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 8d4c5d627e..92206bd748 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -60,7 +60,7 @@ $lang->block->confirmClose = 'Do you want to permanently close this block? $lang->block->remove = 'Remove'; $lang->block->refresh = 'Refresh'; $lang->block->hidden = 'Hide'; -$lang->block->dynamicInfo = "%s %s %s %s %s"; +$lang->block->dynamicInfo = "%s %s %s %s %s"; $lang->block->default['product']['1']['title'] = $lang->productCommon . ' Report'; $lang->block->default['product']['1']['block'] = 'statistic'; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index f4b6a6bf48..a6d6472d6b 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -60,7 +60,7 @@ $lang->block->confirmClose = '确定永久关闭该区块吗?关闭后 $lang->block->remove = '移除'; $lang->block->refresh = '刷新'; $lang->block->hidden = '隐藏'; -$lang->block->dynamicInfo = "%s %s %s %s %s"; +$lang->block->dynamicInfo = "%s %s %s %s %s"; $lang->block->default['product']['1']['title'] = $lang->productCommon . '统计'; $lang->block->default['product']['1']['block'] = 'statistic'; diff --git a/module/block/view/dynamic.html.php b/module/block/view/dynamic.html.php index 523440bf7c..976703d0d5 100644 --- a/module/block/view/dynamic.html.php +++ b/module/block/view/dynamic.html.php @@ -16,7 +16,7 @@ if($action->action == 'login' or $action->action == 'logout' or empty($action->objectLink)) $action->objectName = $action->objectLabel = ''; $class = $action->major ? "class='active'" : ''; echo "
  • "; - printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName); + printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName, $action->objectName); echo "
  • "; $i++; } diff --git a/module/product/control.php b/module/product/control.php index 65b8e45b9c..6dd9b750c1 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -385,6 +385,10 @@ class product extends control $plans = $this->loadModel('productplan')->getList($productID, 0, 'unexpired', null, 'begin'); + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager(0, 30, 1); + $this->view->title = $product->name . $this->lang->colon . $this->lang->product->view; $this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name); $this->view->position[] = $this->lang->product->view; @@ -394,7 +398,7 @@ class product extends control $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->lines = array('') + $this->loadModel('tree')->getLinePairs(); $this->view->branches = $this->loadModel('branch')->getPairs($productID); - $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, $productID); + $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, $productID); $this->view->plans = $plans; $this->display(); diff --git a/module/project/control.php b/module/project/control.php index c064805581..335df13d71 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1389,6 +1389,10 @@ class project extends control list($dateList, $interval) = $this->project->getDateList($project->begin, $project->end, 'noweekend', 0, 'Y-m-d'); $chartData = $this->project->buildBurnData($projectID, $dateList, 'noweekend'); + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager(0, 30, 1); + $this->view->title = $this->lang->project->view; $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); $this->view->position[] = $this->view->title; @@ -1399,7 +1403,7 @@ class project extends control $this->view->planGroups = $this->project->getPlans($products); $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->actions = $this->loadModel('action')->getList('project', $projectID); - $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, 'all', $projectID); + $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->teamMembers = $this->project->getTeamMembers($projectID); $this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);