Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-04-01 15:58:39 +08:00
17 changed files with 85 additions and 102 deletions
+1
View File
@@ -1322,6 +1322,7 @@ class block extends control
{
$projectID = $this->session->project;
$this->app->loadLang('execution');
$this->app->loadLang('bug');
$totalData = $this->loadModel('project')->getOverviewList('byId', $projectID, 'id_desc', 1);
$this->view->totalData = $totalData;
+2 -2
View File
@@ -142,7 +142,7 @@ $lang->block->default['waterfall']['project']['7']['params']['type'] = 'all';
$lang->block->default['waterfall']['project']['7']['params']['count'] = '15';
$lang->block->default['waterfall']['project']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['project']['1']['title'] = '项目整体情况';
$lang->block->default['scrum']['project']['1']['title'] = '项目概况';
$lang->block->default['scrum']['project']['1']['block'] = 'scrumoverview';
$lang->block->default['scrum']['project']['1']['grid'] = 8;
@@ -363,7 +363,7 @@ if($config->systemMode == 'new') $lang->block->modules['project']->availableBloc
$lang->block->modules['scrum']['index'] = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks->scrumoverview = '项目整体情况';
$lang->block->modules['scrum']['index']->availableBlocks->scrumoverview = '项目概况';
$lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang->executionCommon . '列表';
$lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang->executionCommon . '总览';
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待测版本';
+2 -2
View File
@@ -141,7 +141,7 @@ $lang->block->default['waterfall']['project']['7']['params']['type'] = 'all';
$lang->block->default['waterfall']['project']['7']['params']['count'] = '15';
$lang->block->default['waterfall']['project']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['project']['1']['title'] = '項目整體情況';
$lang->block->default['scrum']['project']['1']['title'] = '項目概況';
$lang->block->default['scrum']['project']['1']['block'] = 'scrumoverview';
$lang->block->default['scrum']['project']['1']['grid'] = 8;
@@ -355,7 +355,7 @@ $lang->block->modules['project']->availableBlocks->projectteam = '項目人力
$lang->block->modules['scrum']['index'] = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
$lang->block->modules['scrum']['index']->availableBlocks->scrumoverview = '項目整體情況';
$lang->block->modules['scrum']['index']->availableBlocks->scrumoverview = '項目概況';
$lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang->executionCommon . '列表';
$lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang->executionCommon . '總覽';
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待測版本';
+52 -75
View File
@@ -14,80 +14,57 @@
<div class='empty-tip'><?php common::printLink('project', 'create', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary'")?></div>
<?php else:?>
<style>
#totalInvestment {padding-bottom: 5px;}
.overview-title {font-size: 14px; color: #838a9d;}
.extra-tips {font-size: 12px; color: #a1a7b7;}
.progress {margin-bottom: 8px;}
.total-block {padding: 0px 25px;}
.hours-statistics {position: relative; padding: 0px 5px 5px; display: table-cell;text-align: center;}
.hours-statistics > small {display: block; color: #A6AAB8;}
.hours-statistics > span {display: block; color: #3c4353; font-weight: bold;}
.tile-amount {font-size: 20px;}
.table {margin-bottom: 12px;}
.table thead tr th {padding-left: 0; text-align: right; border-bottom: unset;}
.table tbody tr td {padding-left: 0;}
.table tbody tr th {text-align: right;}
</style>
<div class="panel-body conatiner-fluid">
<div class="table-row">
<div class="col-6 tile">
<div class="text-left" id="totalInvestment"><strong><?php echo $lang->block->totalInvestment;?></strong></div>
<div class="table-row">
<div class="col-4 tile">
<div class="overview-title"><i class="icon-program-group icon-group"></i> <?php echo $lang->block->totalPeople;?></div>
<div class="tile-amount">
<?php echo $totalData[$projectID]->teamCount ? html::a($this->createLink('project', 'manageMembers', 'projectID=' . $projectID), $totalData[$projectID]->teamCount) : 0;?>
</div>
</div>
<div class="col-4 tile">
<div class="overview-title"><i class="icon icon-clock"></i> <?php echo $lang->block->consumedHours;?></div>
<div class="tile-amount" title="<?php echo $totalData[$projectID]->consumed . $lang->execution->workHour;?>">
<?php echo $totalData[$projectID]->consumed ? html::a($this->createLink('project', 'index', 'locate=no'), $totalData[$projectID]->consumed . $lang->execution->workHourUnit) : 0;?>
</div>
<div class="tile-info">
<span class="extra-tips"><?php echo $lang->block->estimatedHours . ' ' . $totalData[$projectID]->estimate . $lang->execution->workHour;?></span>
</div>
</div>
<div class="col-4 tile">
<div class="overview-title"><i class="icon icon-cost"></i> <?php echo $lang->block->spent;?></div>
<div class="tile-amount">¥0</div>
<div class="tile-info">
<?php $budget = $totalData[$projectID]->budget != 0 ? zget($lang->project->currencySymbol, $totalData[$projectID]->budgetUnit) . number_format($totalData[$projectID]->budget, 2) : $lang->project->future;?>
<span class="extra-tips"><?php echo $lang->block->budget . ' ' . $budget;?></span>
</div>
</div>
</div>
</div>
<div class="col-3 total-block hide-in-sm">
<div><strong><?php echo $lang->block->totalStory;?></strong></div>
<div class="tile-amount">
<?php echo $totalData[$projectID]->allStories;?>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $totalData[$projectID]->doneStories;?>" aria-valuemin="0" aria-valuemax="<?php echo $totalData[$projectID]->allStories;?>" style="width: <?php echo floor(($totalData[$projectID]->doneStories/$totalData[$projectID]->allStories)*100).'%';?>"></div>
</div>
<div class="hours-statistics">
<small><?php echo $lang->block->done;?></small>
<span><?php echo $totalData[$projectID]->doneStories;?></span>
</div>
<div class="hours-statistics">
<small><?php echo $lang->block->left;?></small>
<span><?php echo $totalData[$projectID]->leftStories;?></span>
</div>
</div>
<div class="col-3 total-block hide-in-sm">
<div><strong><?php echo $lang->block->totalBug;?></strong></div>
<div class="tile-amount">
<?php echo $totalData[$projectID]->allBugs;?>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $totalData[$projectID]->doneBugs;?>" aria-valuemin="0" aria-valuemax="<?php echo $totalData[$projectID]->allBugs;?>" style="width: <?php echo floor(($totalData[$projectID]->doneBugs/$totalData[$projectID]->allBugs)*100).'%';?>"></div>
</div>
<div class="hours-statistics">
<small><?php echo $lang->block->done;?></small>
<span><?php echo $totalData[$projectID]->doneBugs;?></span>
</div>
<div class="hours-statistics">
<small><?php echo $lang->block->left;?></small>
<span><?php echo $totalData[$projectID]->leftBugs;?></span>
</div>
</div>
</div>
</div>
<table class="table table-data">
<thead>
<tr>
<th><?php echo $lang->block->storyNum;?></th>
<th></th>
<th><?php echo $lang->personnel->invest;?></th>
<th></th>
<th><?php echo $lang->workingHour;?></th>
<th></th>
<th><?php echo $lang->block->bugNum;?></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<th><?php echo $lang->block->totalStory . ':';?></th>
<td><?php echo $totalData[$projectID]->allStories;?></td>
<th><?php echo $lang->block->totalPeople . ':';?></th>
<td><?php echo $totalData[$projectID]->teamCount ? html::a($this->createLink('project', 'manageMembers', 'projectID=' . $projectID), $totalData[$projectID]->teamCount) : 0;?></td>
<th><?php echo $lang->block->estimatedHours . ':';?></th>
<td><?php echo $totalData[$projectID]->estimate . $lang->execution->workHour;?></td>
<th><?php echo $lang->block->totalBug. ':';?></th>
<td><?php echo $totalData[$projectID]->allBugs;?></td>
</tr>
<tr>
<th><?php echo $lang->block->done . ':';?></th>
<td><?php echo $totalData[$projectID]->doneStories;?></td>
<th></th>
<td></td>
<th><?php echo $lang->block->consumedHours . ':';?></th>
<td><?php echo $totalData[$projectID]->consumed . $lang->execution->workHour;?></td>
<th><?php echo $lang->block->done . ':';?></th>
<td><?php echo $totalData[$projectID]->doneBugs;?></td>
</tr>
<tr>
<th><?php echo $lang->block->left . ':';?></th>
<td><?php echo $totalData[$projectID]->leftStories;?></td>
<th></th>
<td></td>
<th></th>
<td></td>
<th><?php echo $lang->bug->unResolved . ':';?></th>
<td><?php echo $totalData[$projectID]->leftBugs;?></td>
</tr>
</tbody>
</table>
<?php endif;?>
+1 -1
View File
@@ -48,7 +48,7 @@
<td class="c-pri"><span class="label-pri label-pri-<?php echo $story->pri?>" title="<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>"><?php echo zget($lang->story->priList, $story->pri, $story->pri)?></span></td>
<td class="c-name" style='color: <?php echo $story->color?>' title='<?php echo $story->title?>'><?php echo html::a($viewLink, $story->title);?></td>
<?php if($longBlock):?>
<td class='c-estimate text-center' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit?></td>
<td class='c-estimate text-center' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit?></td>
<?php $status = $this->processStatus('story', $story);?>
<td class='c-status' title='<?php echo $status;?>'>
<span class="status-story status-<?php echo $story->status?>"><?php echo $status;?></span>
+1 -1
View File
@@ -53,7 +53,7 @@
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='w-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='w-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status?>'>
<?php echo $this->processStatus('story', $story);?>
+1 -1
View File
@@ -118,7 +118,7 @@ tbody tr td:first-child input {display: none;}
?>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status;?>'>
<?php echo $this->processStatus('story', $story);?>
+6 -3
View File
@@ -1192,6 +1192,7 @@ class execution extends control
*/
public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0)
{
/* Set menu. */
if($this->app->openApp == 'project')
{
if(!empty($copyExecutionID)) $projectID = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($copyExecutionID)->fetch('project');
@@ -1200,6 +1201,11 @@ class execution extends control
$this->project->setMenu($projectID);
}
elseif($this->app->openApp == 'execution')
{
$executionID = key($this->executions);
$this->execution->setMenu($executionID);
}
$this->app->loadLang('program');
$this->app->loadLang('stage');
@@ -1291,9 +1297,6 @@ class execution extends control
}
}
$executionID = key($this->executions);
$this->execution->setMenu($executionID);
$this->view->title = $this->lang->execution->create;
$this->view->position[] = $this->view->title;
$this->view->executions = array('' => '') + $this->execution->getList();
+8 -6
View File
@@ -893,7 +893,7 @@ class my extends control
* @access public
* @return void
*/
public function dynamic($type = 'today', $recTotal = 0, $date = '', $direction = 'next')
public function dynamic($type = 'today', $recTotal = 0, $date = '', $direction = 'next', $originTotal = 0)
{
/* Save session. */
$uri = $this->app->getURI(true);
@@ -933,13 +933,15 @@ class my extends control
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $sort, $pager, 'all', 'all', 'all', $date, $direction);
if(empty($recTotal)) $originTotal = $pager->recTotal;
/* Assign. */
$this->view->type = $type;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
$this->view->direction = $direction;
$this->view->type = $type;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
$this->view->direction = $direction;
$this->view->originTotal = $originTotal;
$this->display();
}
+3 -3
View File
@@ -20,7 +20,7 @@
if($period == $type)
{
$active = 'btn-active-text';
$label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
$label .= " <span class='label label-light label-badge'>{$originTotal}</span>";
}
echo html::a(inlink('dynamic', "type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
@@ -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', "type=$type&recTotal={$pager->recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
$nextLink = $hasNext ? inlink('dynamic', "type=$type&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
$preLink = $hasPre ? inlink('dynamic', "type=$type&recTotal={$pager->recTotal}&date=" . strtotime($firstDate) . '&direction=pre&originTotal=' . $originTotal) : 'javascript:;';
$nextLink = $hasNext ? inlink('dynamic', "type=$type&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next&originTotal=' . $originTotal) : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions" class='main-actions'>
+1 -1
View File
@@ -56,7 +56,7 @@
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='text-right'title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right'title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status?>'>
<?php echo $this->processStatus('story', $story);?>
+1 -1
View File
@@ -154,7 +154,7 @@
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status?>'>
<?php echo $this->processStatus('story', $story);?>
@@ -56,7 +56,7 @@
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td><span class='status-story status-<?php echo $story->status?>'><?php echo $this->processStatus('story', $story);?></span></td>
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
</tr>
+1 -1
View File
@@ -115,7 +115,7 @@
?>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
+1 -1
View File
@@ -56,7 +56,7 @@
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td><span class='status-story status-<?php echo $story->status?>'><?php echo $this->processStatus('story', $story);?></span></td>
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
</tr>
+1 -1
View File
@@ -115,7 +115,7 @@
?>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td class='text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
+2 -2
View File
@@ -159,7 +159,7 @@
</td>
<td class='text-left' title='<?php echo $child->title;?>'><a class="iframe" data-width="90%" href="<?php echo $this->createLink('story', 'view', "storyID=$child->id", '', true); ?>"><?php echo $child->title;?></a></td>
<td><?php echo zget($users, $child->assignedTo);?></td>
<td title="<?php echo $child->estimate . ' ' . $lang->hourCommon;?>"><?php echo $child->estimate . ' ' . $config->hourUnit;?></td>
<td title="<?php echo $child->estimate . ' ' . $lang->hourCommon;?>"><?php echo $child->estimate . $config->hourUnit;?></td>
<td><?php echo $this->processStatus('story', $child);?></td>
<td class='c-actions'>
<?php
@@ -337,7 +337,7 @@
</tr>
<tr>
<th><?php echo $lang->story->estimate;?></th>
<td title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . ' ' . $config->hourUnit;?></td>
<td title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
</tr>
<tr>
<th><?php echo $lang->story->keywords;?></th>