- {$lang->action->dynamic->all} {$allCount}", '', "class='btn btn-link " . ($browseType == 'all' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "browseType=today"), "{$lang->action->dynamic->today}", '', "class='btn btn-link " . ($browseType == 'today' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "browseType=yesterday"), "{$lang->action->dynamic->yesterday}", '', "class='btn btn-link " . ($browseType == 'yesterday' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "browseType=thisweek"), "{$lang->action->dynamic->thisWeek}", '', "class='btn btn-link " . ($browseType == 'thisweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "browseType=lastweek"), "{$lang->action->dynamic->lastWeek}", '', "class='btn btn-link " . ($browseType == 'lastweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "browseType=thismonth"), "{$lang->action->dynamic->thisMonth}", '', "class='btn btn-link " . ($browseType == 'thismonth' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "browseType=lastmonth"), "{$lang->action->dynamic->lastMonth}", '', "class='btn btn-link " . ($browseType == 'lastmonth' ? 'btn-active-text' : '') . "'");
+ action->periods as $period => $label):?>
+ $label";
+ $active = '';
+ if($period == $browseType)
+ {
+ $active = 'btn-active-text';
+ $label .= " {$pager->recTotal}";
+ }
+ echo html::a(inlink('dynamic', "browseType=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
+
config->global->flow != 'onlyTest'):?>
diff --git a/module/my/control.php b/module/my/control.php
index 550223e11b..d5491d26c3 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -104,7 +104,6 @@ class my extends control
/* Assign. */
$this->view->todos = $this->loadModel('todo')->getList($type, $account, $status, 0, $pager, $sort);
- $this->view->todoCount = $this->todo->getCount();
$this->view->date = (int)$type == 0 ? date(DT_DATE1) : date(DT_DATE1, strtotime($type));
$this->view->type = $type;
$this->view->recTotal = $recTotal;
@@ -568,7 +567,6 @@ class my extends control
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction);
- $this->view->allCount = $this->action->getCount();
$this->view->direction = $direction;
$this->display();
}
diff --git a/module/my/view/dynamic.html.php b/module/my/view/dynamic.html.php
index de99428d74..abf7fa4abe 100644
--- a/module/my/view/dynamic.html.php
+++ b/module/my/view/dynamic.html.php
@@ -13,15 +13,18 @@
+ action->periods as $period => $label):?>
{$lang->action->dynamic->all} {$allCount}", '', "class='btn btn-link " . ($type == 'all' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "type=today"), "{$lang->action->dynamic->today}", '', "class='btn btn-link " . ($type == 'today' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "type=yesterday"), "{$lang->action->dynamic->yesterday}", '', "class='btn btn-link " . ($type == 'yesterday' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "type=thisweek"), "{$lang->action->dynamic->thisWeek}", '', "class='btn btn-link " . ($type == 'thisweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "type=lastweek"), "{$lang->action->dynamic->lastWeek}", '', "class='btn btn-link " . ($type == 'lastweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "type=thismonth"), "{$lang->action->dynamic->thisMonth}", '', "class='btn btn-link " . ($type == 'thismonth' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "type=lastmonth"), "{$lang->action->dynamic->lastMonth}", '', "class='btn btn-link " . ($type == 'lastmonth' ? 'btn-active-text' : '') . "'");
+ $label = "$label";
+ $active = '';
+ if($period == $type)
+ {
+ $active = 'btn-active-text';
+ $label .= " {$pager->recTotal}";
+ }
+ echo html::a(inlink('dynamic', "type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
+
diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php
index 38ba09613f..7b7cce7779 100644
--- a/module/my/view/todo.html.php
+++ b/module/my/view/todo.html.php
@@ -19,8 +19,13 @@
user->account}&status=undone";
- $label = $period == 'all' ? "$label {$todoCount}" : "$label";
- $active = $period == $type ? 'btn-active-text' : '';
+ $label = "$label";
+ $active = '';
+ if($period == $type)
+ {
+ $active = 'btn-active-text';
+ $label .= " {$pager->recTotal}";
+ }
echo html::a(inlink('todo', $vars), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
diff --git a/module/product/control.php b/module/product/control.php
index b6a3d38c6b..e0797ef202 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -204,7 +204,6 @@ class product extends control
$this->view->storyCases = $storyCases;
$this->view->param = $param;
$this->view->products = $this->products;
- $this->view->allCount = $this->story->getCount($productID);
$this->display();
}
@@ -516,7 +515,6 @@ class product extends control
$this->view->param = $param;
$this->view->pager = $pager;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction);
- $this->view->allCount = $this->action->getCount('product', $productID);
$this->view->direction = $direction;
$this->display();
}
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index d3f912a6de..b11e313c33 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -47,7 +47,7 @@
echo '
';
?>
- inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType" . $queryParam), "$menuItem->text" . ($menuItem->name == 'allstory' ? ' ' . $allCount . '' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");?>
+ inlink('browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType" . $queryParam), "$menuItem->text" . ($menuItem->name == $this->session->storyBrowseType ? ' ' . $pager->recTotal . '' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");?>
product->searchStory;?>
diff --git a/module/product/view/dynamic.html.php b/module/product/view/dynamic.html.php
index 09c10f78a6..ca45bdf890 100755
--- a/module/product/view/dynamic.html.php
+++ b/module/product/view/dynamic.html.php
@@ -13,15 +13,18 @@
+ action->periods as $period => $label):?>
{$lang->action->dynamic->all} {$allCount}", '', "class='btn btn-link " . ($type == 'all' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "productID=$productID&type=today"), "{$lang->action->dynamic->today}", '', "class='btn btn-link " . ($type == 'today' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "productID=$productID&type=yesterday"), "{$lang->action->dynamic->yesterday}", '', "class='btn btn-link " . ($type == 'yesterday' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "productID=$productID&type=thisweek"), "{$lang->action->dynamic->thisWeek}", '', "class='btn btn-link " . ($type == 'thisweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "productID=$productID&type=lastweek"), "{$lang->action->dynamic->lastWeek}", '', "class='btn btn-link " . ($type == 'lastweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "productID=$productID&type=thismonth"), "{$lang->action->dynamic->thisMonth}", '', "class='btn btn-link " . ($type == 'thismonth' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "productID=$productID&type=lastmonth"), "{$lang->action->dynamic->lastMonth}", '', "class='btn btn-link " . ($type == 'lastmonth' ? 'btn-active-text' : '') . "'");
+ $label = "$label";
+ $active = '';
+ if($period == $type)
+ {
+ $active = 'btn-active-text';
+ $label .= " {$pager->recTotal}";
+ }
+ echo html::a(inlink('dynamic', "productID=$productID&type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
+
diff --git a/module/project/control.php b/module/project/control.php
index eebaf3c24c..0d6f6a61a3 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1960,7 +1960,6 @@ class project extends control
$this->view->pager = $pager;
$this->view->param = $param;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction);
- $this->view->allCount = $this->action->getCount('project', $projectID);
$this->view->direction = $direction;
$this->display();
}
diff --git a/module/project/view/dynamic.html.php b/module/project/view/dynamic.html.php
index 1553caecb4..ae23f065eb 100755
--- a/module/project/view/dynamic.html.php
+++ b/module/project/view/dynamic.html.php
@@ -13,15 +13,18 @@
- {$lang->action->dynamic->all} {$allCount}", '', "class='btn btn-link " . ($type == 'all' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "projectID=$projectID&type=today"), "{$lang->action->dynamic->today}", '', "class='btn btn-link " . ($type == 'today' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "projectID=$projectID&type=yesterday"), "{$lang->action->dynamic->yesterday}", '', "class='btn btn-link " . ($type == 'yesterday' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "projectID=$projectID&type=thisweek"), "{$lang->action->dynamic->thisWeek}", '', "class='btn btn-link " . ($type == 'thisweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "projectID=$projectID&type=lastweek"), "{$lang->action->dynamic->lastWeek}", '', "class='btn btn-link " . ($type == 'lastweek' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "projectID=$projectID&type=thismonth"), "{$lang->action->dynamic->thisMonth}", '', "class='btn btn-link " . ($type == 'thismonth' ? 'btn-active-text' : '') . "'");
- echo html::a(inlink('dynamic', "projectID=$projectID&type=lastmonth"), "{$lang->action->dynamic->lastMonth}", '', "class='btn btn-link " . ($type == 'lastmonth' ? 'btn-active-text' : '') . "'");
+ action->periods as $period => $label):?>
+ $label";
+ $active = '';
+ if($period == $type)
+ {
+ $active = 'btn-active-text';
+ $label .= " {$pager->recTotal}";
+ }
+ echo html::a(inlink('dynamic', "projectID=$projectID&type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
+
diff --git a/module/story/model.php b/module/story/model.php
index dd4ea94d9e..a7b0c7f00d 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -2614,16 +2614,4 @@ class storyModel extends model
return array($toList, $ccList);
}
-
- /**
- * Get story count.
- *
- * @param int $productID
- * @access public
- * @return int
- */
- public function getCount($productID)
- {
- return $this->dao->select('count(*) as count')->from(TABLE_STORY)->where('deleted')->eq(0)->andWhere('product')->eq($productID)->fetch('count');
- }
}