* Fix code for execution.

This commit is contained in:
Yagami
2021-03-08 14:03:50 +08:00
parent 825ff044e2
commit 2ee08d06de
43 changed files with 732 additions and 773 deletions
+57 -57
View File
@@ -1,11 +1,11 @@
<?php
/**
* The view method view file of project module of ZenTaoPMS.
* The view method view file of execution module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @package execution
* @version $Id: view.html.php 4594 2013-03-13 06:16:02Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
@@ -19,21 +19,21 @@
<div class="col-sm-6">
<div class="panel block-burn" style="height: 280px">
<div class="panel-heading">
<div class="panel-title"><?php echo $execution->name . $lang->project->burn;?></div>
<div class="panel-title"><?php echo $execution->name . $lang->execution->burn;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'burn', "projectID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
<li><?php common::printLink('execution', 'burn', "executionID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body">
<?php if(common::hasPriv('project', 'burn')):?>
<?php if(common::hasPriv('execution', 'burn')):?>
<div id="burnWrapper">
<div id="burnChart">
<canvas id="burnCanvas"></canvas>
</div>
<div id="burnYUnit">(<?php echo $lang->project->workHour;?>)</div>
<div id="burnYUnit">(<?php echo $lang->execution->workHour;?>)</div>
<div id="burnLegend">
<div class="line-ref"><?php echo $lang->project->charts->burn->graph->reference;?></div>
<div class="line-real"><?php echo $lang->project->charts->burn->graph->actuality;?></div>
<div class="line-ref"><?php echo $lang->execution->charts->burn->graph->reference;?></div>
<div class="line-real"><?php echo $lang->execution->charts->burn->graph->actuality;?></div>
</div>
</div>
<?php endif;?>
@@ -43,9 +43,9 @@
<div class="col-sm-6">
<div class="panel block-dynamic" style="height: 280px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->latestDynamic;?></div>
<div class="panel-title"><?php echo $lang->execution->latestDynamic;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'dynamic', "projectID=$execution->id&type=all", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
<li><?php common::printLink('execution', 'dynamic', "executionID=$execution->id&type=all", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body scrollbar-hover">
@@ -65,9 +65,9 @@
<div class="col-sm-6">
<div class="panel block-team" style="height: 240px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->relatedMember;?></div>
<div class="panel-title"><?php echo $lang->execution->relatedMember;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('project', 'team', "projectID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
<li><?php common::printLink('execution', 'team', "executionID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body">
@@ -76,32 +76,32 @@
<?php if($execution->PM):?>
<?php $i--;?>
<?php unset($teamMembers[$execution->PM]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->PM);?> <span class="text-muted">(<?php echo $lang->project->PM;?>)</span></div>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->PM);?> <span class="text-muted">(<?php echo $lang->execution->PM;?>)</span></div>
<?php endif;?>
<?php if($execution->PO):?>
<?php $i--;?>
<?php unset($teamMembers[$execution->PO]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->PO);?> <span class="text-muted">(<?php echo $lang->project->PO;?>)</span></div>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->PO);?> <span class="text-muted">(<?php echo $lang->execution->PO;?>)</span></div>
<?php endif;?>
<?php if($execution->QD):?>
<?php $i--;?>
<?php unset($teamMembers[$execution->QD]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->QD);?> <span class="text-muted">(<?php echo $lang->project->QD;?>)</span></div>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->QD);?> <span class="text-muted">(<?php echo $lang->execution->QD;?>)</span></div>
<?php endif;?>
<?php if($execution->RD):?>
<?php $i--;?>
<?php unset($teamMembers[$execution->RD]);?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->RD);?> <span class="text-muted">(<?php echo $lang->project->RD;?>)</span></div>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->RD);?> <span class="text-muted">(<?php echo $lang->execution->RD;?>)</span></div>
<?php endif;?>
<?php if(common::hasPriv('project', 'team')):?>
<?php if(common::hasPriv('execution', 'team')):?>
<?php foreach($teamMembers as $teamMember):?>
<?php if($j > $i) break;?>
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $teamMember->account);?></div>
<?php $j++;?>
<?php endforeach;?>
<div class="col-xs-6">
<?php if($canBeChanged) common::printLink('project', 'manageMembers', "projectID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->project->manageMembers, '', "class='text-muted'");?>
<?php if($canBeChanged) common::printLink('execution', 'manageMembers', "executionID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->execution->manageMembers, '', "class='text-muted'");?>
</div>
<?php endif;?>
</div>
@@ -111,9 +111,9 @@
<div class="col-sm-6">
<div class="panel block-docs" style="height: 240px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->project->doclib;?></div>
<div class="panel-title"><?php echo $lang->execution->doclib;?></div>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('doc', 'objectLibs', "type=project&projectID=$execution->id&from=project", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
<li><?php common::printLink('doc', 'objectLibs', "type=execution&executionID=$execution->id&from=execution", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
</nav>
</div>
<div class="panel-body">
@@ -124,15 +124,15 @@
<?php if($i > 8) break;?>
<div class="col-xs-6">
<?php if($libID == 'files'):?>
<?php echo html::a($this->createLink('doc', 'showFiles', "type=project&objectID=$execution->id"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
<?php echo html::a($this->createLink('doc', 'showFiles', "type=execution&objectID=$execution->id"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
<?php else:?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$libID&browseType=all&param=0&orderBy=id_desc&from=project"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
<?php echo html::a($this->createLink('doc', 'browse', "libID=$libID&browseType=all&param=0&orderBy=id_desc&from=execution"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
<?php endif;?>
</div>
<?php $i++;?>
<?php endforeach;?>
<div class="col-xs-6">
<?php if($canBeChanged) common::printLink('doc', 'createLib', "type=project&objectID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->doc->createlib, '', "class='text-muted iframe' data-width='1000px'");?>
<?php if($canBeChanged) common::printLink('doc', 'createLib', "type=execution&objectID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> &nbsp;" . $lang->doc->createlib, '', "class='text-muted iframe' data-width='1000px'");?>
</div>
<?php endif;?>
</div>
@@ -149,23 +149,23 @@
<div class='main-actions'>
<div class="btn-toolbar">
<?php
$params = "project=$execution->id";
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse', "projectID=$execution->id");
$params = "execution=$execution->id";
$browseLink = $this->session->executionList ? $this->session->executionList : inlink('browse', "executionID=$execution->id");
common::printBack($browseLink);
if(!$execution->deleted)
{
echo "<div class='divider'></div>";
common::printIcon('project', 'start', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('project', 'activate', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('project', 'putoff', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('project', 'suspend', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('project', 'close', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'start', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'activate', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'putoff', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'suspend', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
common::printIcon('execution', 'close', "executionID=$execution->id", $execution, 'button', '', '', 'iframe', true);
echo $this->buildOperateMenu($execution, 'view');
echo "<div class='divider'></div>";
common::printIcon('project', 'edit', $params, $execution);
common::printIcon('project', 'delete', $params, $execution, 'button', 'trash', 'hiddenwin');
common::printIcon('execution', 'edit', $params, $execution);
common::printIcon('execution', 'delete', $params, $execution, 'button', 'trash', 'hiddenwin');
}
?>
</div>
@@ -181,21 +181,21 @@
<p><span class="text-limit" data-limit-size="40"><?php echo $execution->desc;?></span><a class="text-primary text-limit-toggle small" data-text-expand="<?php echo $lang->expand;?>" data-text-collapse="<?php echo $lang->collapse;?>"></a></p>
<p>
<?php if($execution->deleted):?>
<span class='label label-danger label-outline'><?php echo $lang->project->deleted;?></span>
<span class='label label-danger label-outline'><?php echo $lang->execution->deleted;?></span>
<?php endif; ?>
<span class="label label-primary label-outline"><?php echo zget($lang->program->PRJLifeTimeList, $execution->lifetime);?></span>
<?php if(isset($execution->delay)):?>
<span class="label label-danger label-outline"><?php echo $lang->project->delayed;?></span>
<span class="label label-danger label-outline"><?php echo $lang->execution->delayed;?></span>
<?php else:?>
<span class="label label-success label-outline"><?php echo $this->processStatus('project', $execution);?></span>
<span class="label label-success label-outline"><?php echo $this->processStatus('execution', $execution);?></span>
<?php endif;?>
</p>
</div>
</div>
<div class="detail">
<div class="detail-title">
<strong><?php echo $lang->project->manageProducts;?></strong>
<?php common::printLink('project', 'manageproducts', "projectID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "class='btn btn-link pull-right muted'");?>
<strong><?php echo $lang->execution->manageProducts;?></strong>
<?php common::printLink('execution', 'manageproducts', "executionID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "class='btn btn-link pull-right muted'");?>
</div>
<div class="detail-content">
<div class="row row-grid">
@@ -209,7 +209,7 @@
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->linkPlan;?></strong></div>
<div class="detail-title"><strong><?php echo $lang->execution->linkPlan;?></strong></div>
<div class="detail-content">
<div class="row row-grid">
<?php foreach($products as $productID => $product):?>
@@ -221,7 +221,7 @@
</div>
</div>
<div class='detail'>
<div class='detail-title'><strong><?php echo $lang->project->lblStats;?></strong></div>
<div class='detail-title'><strong><?php echo $lang->execution->lblStats;?></strong></div>
<div class="detail-content">
<table class='table table-data data-stats'>
<tbody>
@@ -229,40 +229,40 @@
<tr>
<td colspan="4">
<?php $progress = ($execution->totalConsumed + $execution->totalLeft) ? floor($execution->totalConsumed / ($execution->totalConsumed + $execution->totalLeft) * 1000) / 1000 * 100 : 0;?>
<?php echo $lang->project->progress;?> <em><?php echo $progress . $lang->percent;?></em> &nbsp;
<?php echo $lang->execution->progress;?> <em><?php echo $progress . $lang->percent;?></em> &nbsp;
<div class="progress inline-block">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $progress . $lang->percent;?>"></div>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->begin;?></th>
<th><?php echo $lang->execution->begin;?></th>
<td><?php echo $execution->begin;?></td>
<th><?php echo $lang->project->totalEstimate;?></th>
<td><em><?php echo (float)$execution->totalEstimate . $lang->project->workHour;?></em></td>
<th><?php echo $lang->execution->totalEstimate;?></th>
<td><em><?php echo (float)$execution->totalEstimate . $lang->execution->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->end;?></th>
<th><?php echo $lang->execution->end;?></th>
<td><?php echo $execution->end;?></td>
<th><?php echo $lang->project->totalConsumed;?></th>
<td><em><?php echo (float)$execution->totalConsumed . $lang->project->workHour;?></em></td>
<th><?php echo $lang->execution->totalConsumed;?></th>
<td><em><?php echo (float)$execution->totalConsumed . $lang->execution->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalDays;?></th>
<th><?php echo $lang->execution->totalDays;?></th>
<td><?php echo $execution->days;?></td>
<th><?php echo $lang->project->totalLeft;?></th>
<td><em><?php echo (float)$execution->totalLeft . $lang->project->workHour;?></em></td>
<th><?php echo $lang->execution->totalLeft;?></th>
<td><em><?php echo (float)$execution->totalLeft . $lang->execution->workHour;?></em></td>
</tr>
<tr>
<th><?php echo $lang->project->totalHours;?></th>
<td><em><?php echo (float)$execution->totalHours . $lang->project->workHour;?></em></td>
<th><?php echo $lang->execution->totalHours;?></th>
<td><em><?php echo (float)$execution->totalHours . $lang->execution->workHour;?></em></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->basicInfo;?></strong></div>
<div class="detail-title"><strong><?php echo $lang->execution->basicInfo;?></strong></div>
<div class="detail-content">
<table class="table table-data data-basic">
<tbody>
@@ -279,9 +279,9 @@
</div>
</div>
<div class="detail">
<div class="detail-title"><strong><?php echo $lang->project->acl;?></strong></div>
<div class="detail-title"><strong><?php echo $lang->execution->acl;?></strong></div>
<div class="detail-content">
<p><?php echo $lang->project->aclList[$execution->acl];?></p>
<p><?php echo $lang->execution->aclList[$execution->acl];?></p>
</div>
</div>
<?php $this->printExtendFields($execution, 'div', "position=right&inForm=0&inCell=1");?>
@@ -302,7 +302,7 @@ $(function()
labels: <?php echo json_encode($chartData['labels'])?>,
datasets: [
{
label: "<?php echo $lang->project->charts->burn->graph->reference;?>",
label: "<?php echo $lang->execution->charts->burn->graph->reference;?>",
color: "#F1F1F1",
pointColor: '#D8D8D8',
pointStrokeColor: '#D8D8D8',
@@ -312,7 +312,7 @@ $(function()
data: <?php echo $chartData['baseLine']?>
},
{
label: "<?php echo $lang->project->charts->burn->graph->actuality;?>",
label: "<?php echo $lang->execution->charts->burn->graph->actuality;?>",
color: "#006AF1",
pointStrokeColor: '#006AF1',
pointHighlightStroke: '#006AF1',
@@ -336,7 +336,7 @@ $(function()
scaleFontColor: '#838A9D',
tooltipXPadding: 10,
tooltipYPadding: 10,
multiTooltipTitleTemplate: '<%= label %> <?php echo $lang->project->workHour;?> /h',
multiTooltipTitleTemplate: '<%= label %> <?php echo $lang->execution->workHour;?> /h',
multiTooltipTemplate: "<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",
});
});