* Fix bug of get dynamic count.
This commit is contained in:
@@ -3730,6 +3730,8 @@ class execution extends control
|
||||
$actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, 50, 'all', 'all', $executionID, $date, $direction);
|
||||
$dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
|
||||
|
||||
if(empty($recTotal)) $recTotal = count($dateGroups) < 2 ? count($actions) : $this->action->getDynamicCount();
|
||||
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
|
||||
/* Assign. */
|
||||
@@ -3743,7 +3745,7 @@ class execution 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();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* The action->dynamic view file of dashboard module of ZenTaoPMS.
|
||||
* The dynamic view file of execution 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 <chunsheng@cnezsoft.com>
|
||||
* @package dashboard
|
||||
* @version $Id: action->dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
|
||||
* @package execution
|
||||
* @version $Id: dynamic.html.php 1477 2011-03-01 15:25:50Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
@@ -107,8 +107,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', "executionID=$executionID&type=$type¶m=$param&recTotal=0&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
|
||||
$nextLink = $hasNext ? inlink('dynamic', "executionID=$executionID&type=$type¶m=$param&recTotal=0&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
|
||||
$preLink = $hasPre ? inlink('dynamic', "executionID=$executionID&type=$type¶m=$param&recTotal={$recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
|
||||
$nextLink = $hasNext ? inlink('dynamic', "executionID=$executionID&type=$type¶m=$param&recTotal={$recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
|
||||
?>
|
||||
<?php if($hasPre or $hasNext):?>
|
||||
<div id="mainActions" class='main-actions'>
|
||||
|
||||
Reference in New Issue
Block a user