diff --git a/module/my/control.php b/module/my/control.php
index 77fc446418..6062f97f31 100755
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -1566,7 +1566,7 @@ EOF;
* @access public
* @return void
*/
- public function dynamic($type = 'today', $recTotal = 0, $date = '', $direction = 'next', $originTotal = 0)
+ public function dynamic($type = 'today', $recTotal = 0, $date = '', $direction = 'next')
{
/* Save session. */
$uri = $this->app->getURI(true);
@@ -1612,12 +1612,14 @@ EOF;
$actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $orderBy, 50, 'all', 'all', 'all', $date, $direction);
$dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
+ if(empty($recTotal)) $recTotal = count($dateGroups) < 2 ? count($actions) : $this->action->getDynamicCount();
+
/* Assign. */
- $this->view->type = $type;
- $this->view->orderBy = $orderBy;
- $this->view->dateGroups = $dateGroups;
- $this->view->direction = $direction;
- $this->view->originTotal = count($dateGroups, 1) - count($dateGroups);
+ $this->view->type = $type;
+ $this->view->orderBy = $orderBy;
+ $this->view->dateGroups = $dateGroups;
+ $this->view->direction = $direction;
+ $this->view->recTotal = $recTotal;
$this->display();
}
diff --git a/module/my/view/dynamic.html.php b/module/my/view/dynamic.html.php
index 1e17fa3a4d..0188838827 100644
--- a/module/my/view/dynamic.html.php
+++ b/module/my/view/dynamic.html.php
@@ -20,7 +20,7 @@
if($period == $type)
{
$active = 'btn-active-text';
- $label .= "
{$originTotal}";
+ $label .= "
{$recTotal}";
}
echo html::a(inlink('dynamic', "type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
@@ -102,8 +102,8 @@ $firstDate = date('Y-m-d', strtotime($firstAction->originalDate) + 24 * 3600);
$lastDate = substr($action->originalDate, 0, 10);
$hasPre = $this->action->hasPreOrNext($firstDate, 'pre');
$hasNext = $this->action->hasPreOrNext($lastDate, 'next');
-$preLink = $hasPre ? inlink('dynamic', "type=$type&recTotal=0&date=" . strtotime($firstDate) . '&direction=pre&originTotal=' . $originTotal) : 'javascript:;';
-$nextLink = $hasNext ? inlink('dynamic', "type=$type&recTotal=0&date=" . strtotime($lastDate) . '&direction=next&originTotal=' . $originTotal) : 'javascript:;';
+$preLink = $hasPre ? inlink('dynamic', "type={$type}&recTotal={$recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
+$nextLink = $hasNext ? inlink('dynamic', "type={$type}&recTotal={$recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
diff --git a/module/product/control.php b/module/product/control.php
index bb9fd3f95a..102cc13b16 100755
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -878,6 +878,8 @@ class product extends control
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, 50, $productID, 'all', 'all', $date, $direction);
$dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
+ if(empty($recTotal)) $recTotal = count($dateGroups) < 2 ? count($actions) : $this->action->getDynamicCount();
+
/* Assign. */
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->dynamic;
$this->view->userIdPairs = $this->loadModel('user')->getPairs('noletter|nodeleted|noclosed|useid');
@@ -890,7 +892,7 @@ class product extends control
$this->view->param = $param;
$this->view->dateGroups = $dateGroups;
$this->view->direction = $direction;
- $this->view->recTotal = count($dateGroups, 1) - count($dateGroups);
+ $this->view->recTotal = $recTotal;
$this->display();
}
diff --git a/module/product/view/dynamic.html.php b/module/product/view/dynamic.html.php
index 7c8df358d6..37bbfc2623 100755
--- a/module/product/view/dynamic.html.php
+++ b/module/product/view/dynamic.html.php
@@ -1,12 +1,12 @@
dynamic view file of dashboard module of ZenTaoPMS.
+ * The dynamic view file of product module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang
- * @package dashboard
- * @version $Id: action->dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
+ * @package product
+ * @version $Id: dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
* @link http://www.zentao.net
*/
?>
@@ -105,8 +105,8 @@ $firstDate = date('Y-m-d', strtotime($firstAction->originalDate) + 24 * 3600);
$lastDate = substr($action->originalDate, 0, 10);
$hasPre = $this->action->hasPreOrNext($firstDate, 'pre');
$hasNext = $this->action->hasPreOrNext($lastDate, 'next');
-$preLink = $hasPre ? inlink('dynamic', "productID=$productID&type=$type¶m=$param&recTotal=0&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
-$nextLink = $hasNext ? inlink('dynamic', "productID=$productID&type=$type¶m=$param&recTotal=0&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
+$preLink = $hasPre ? inlink('dynamic', "productID=$productID&type=$type¶m=$param&recTotal={$recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
+$nextLink = $hasNext ? inlink('dynamic', "productID=$productID&type=$type¶m=$param&recTotal={$recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
diff --git a/module/project/control.php b/module/project/control.php
index 34f97d38b3..f8fa91219c 100755
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1034,6 +1034,8 @@ class project extends control
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, 50, 'all', $projectID, 'all', $date, $direction);
$dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
+ if(empty($recTotal)) $recTotal = count($dateGroups) < 2 ? count($actions) : $this->action->getDynamicCount();
+
$project = $this->project->getByID($projectID);
/* Assign. */
@@ -1047,7 +1049,7 @@ class project extends control
$this->view->param = $param;
$this->view->dateGroups = $dateGroups;
$this->view->direction = $direction;
- $this->view->recTotal = count($dateGroups, 1) - count($dateGroups);
+ $this->view->recTotal = $recTotal;
$this->display();
}
diff --git a/module/project/view/dynamic.html.php b/module/project/view/dynamic.html.php
index 6fedb51d7a..7f7389fbfc 100755
--- a/module/project/view/dynamic.html.php
+++ b/module/project/view/dynamic.html.php
@@ -1,12 +1,12 @@
dynamic view file of dashboard module of ZenTaoPMS.
+ * The dynamic view file of project module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang
- * @package dashboard
- * @version $Id: action->dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
+ * @package project
+ * @version $Id: dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
* @link http://www.zentao.net
*/
?>
@@ -106,8 +106,8 @@ $firstDate = date('Y-m-d', strtotime($firstAction->originalDate) + 24 * 3600);
$lastDate = substr($action->originalDate, 0, 10);
$hasPre = $this->action->hasPreOrNext($firstDate, 'pre');
$hasNext = $this->action->hasPreOrNext($lastDate, 'next');
-$preLink = $hasPre ? inlink('dynamic', "projectID=$projectID&type=$type¶m=$param&recTotal=0&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
-$nextLink = $hasNext ? inlink('dynamic', "projectID=$projectID&type=$type¶m=$param&recTotal=0&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
+$preLink = $hasPre ? inlink('dynamic', "projectID=$projectID&type=$type¶m=$param&recTotal={$recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
+$nextLink = $hasNext ? inlink('dynamic', "projectID=$projectID&type=$type¶m=$param&recTotal={$recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
diff --git a/module/user/control.php b/module/user/control.php
index 551037b2d5..38a6039f52 100755
--- a/module/user/control.php
+++ b/module/user/control.php
@@ -1239,11 +1239,13 @@ class user extends control
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, 50, 'all', 'all', 'all', $date, $direction);
$dateGroups = $this->action->buildDateGroup($actions, $direction, $period);
+ if(empty($recTotal)) $recTotal = count($dateGroups) < 2 ? count($actions) : $this->action->getDynamicCount();
+
/* Assign. */
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic;
$this->view->type = $period;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
- $this->view->recTotal = count($dateGroups, 1) - count($dateGroups);
+ $this->view->recTotal = $recTotal;
$this->view->user = $user;
$this->view->dateGroups = $dateGroups;
$this->view->direction = $direction;
diff --git a/module/user/view/dynamic.html.php b/module/user/view/dynamic.html.php
index d0d2b90a37..941b6260a6 100644
--- a/module/user/view/dynamic.html.php
+++ b/module/user/view/dynamic.html.php
@@ -1,12 +1,12 @@
dynamic view file of dashboard module of ZenTaoPMS.
+ * The dynamic view file of user module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang
- * @package dashboard
- * @version $Id: action->dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
+ * @package user
+ * @version $Id: dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
* @link http://www.zentao.net
*/
?>
@@ -76,8 +76,8 @@ $firstDate = date('Y-m-d', strtotime($firstAction->originalDate) + 24 * 3600);
$lastDate = substr($action->originalDate, 0, 10);
$hasPre = $this->action->hasPreOrNext($firstDate, 'pre');
$hasNext = $this->action->hasPreOrNext($lastDate, 'next');
-$preLink = $hasPre ? inlink('dynamic', "userID={$user->id}&type=$type&recTotal=0&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
-$nextLink = $hasNext ? inlink('dynamic', "userID={$user->id}&type=$type&recTotal=0&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
+$preLink = $hasPre ? inlink('dynamic', "userID={$user->id}&type=$type&recTotal={$recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
+$nextLink = $hasNext ? inlink('dynamic', "userID={$user->id}&type=$type&recTotal={$recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>