* 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
+87 -91
View File
@@ -1,11 +1,11 @@
<?php
/**
* The edit view of project module of ZenTaoPMS.
* The edit view 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: edit.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
@@ -18,32 +18,32 @@
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
<?php echo html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
<small><?php echo $lang->arrow . ' ' . $lang->project->edit;?></small>
<span class='prefix label-id'><strong><?php echo $execution->id;?></strong></span>
<?php echo html::a($this->createLink('execution', 'view', 'execution=' . $execution->id), $execution->name, '_blank');?>
<small><?php echo $lang->arrow . ' ' . $lang->execution->edit;?></small>
</h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->project->name;?></th>
<td><?php echo html::input('name', $project->name, "class='form-control' required");?></td><td></td>
<th class='w-120px'><?php echo $lang->execution->name;?></th>
<td><?php echo html::input('name', $execution->name, "class='form-control' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->code;?></th>
<td><?php echo html::input('code', $project->code, "class='form-control' required");?></td>
<th><?php echo $lang->execution->code;?></th>
<td><?php echo html::input('code', $execution->code, "class='form-control' required");?></td>
</tr>
<tr>
<th><?php echo $lang->project->dateRange;?></th>
<th><?php echo $lang->execution->dateRange;?></th>
<td>
<div class='input-group'>
<?php echo html::input('begin', $project->begin, "class='form-control form-date' onchange='computeWorkDays()' required placeholder='" . $lang->project->begin . "'");?>
<span class='input-group-addon fix-border'><?php echo $lang->project->to;?></span>
<?php echo html::input('end', $project->end, "class='form-control form-date' onchange='computeWorkDays()' required placeholder='" . $lang->project->end . "'");?>
<?php echo html::input('begin', $execution->begin, "class='form-control form-date' onchange='computeWorkDays()' required placeholder='" . $lang->execution->begin . "'");?>
<span class='input-group-addon fix-border'><?php echo $lang->execution->to;?></span>
<?php echo html::input('end', $execution->end, "class='form-control form-date' onchange='computeWorkDays()' required placeholder='" . $lang->execution->end . "'");?>
<div class='input-group-btn'>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><?php echo $lang->project->byPeriod;?> <span class='caret'></span></button>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><?php echo $lang->execution->byPeriod;?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php foreach ($lang->project->endList as $key => $name):?>
<?php foreach ($lang->execution->endList as $key => $name):?>
<li><a href='javascript:computeEndDate("<?php echo $key;?>")'><?php echo $name;?></a></li>
<?php endforeach;?>
</ul>
@@ -52,83 +52,81 @@
</td>
</tr>
<tr>
<th><?php echo $lang->project->days;?></th>
<th><?php echo $lang->execution->days;?></th>
<td>
<div class='input-group'>
<?php echo html::input('days', $project->days, "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
<?php echo html::input('days', $execution->days, "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->execution->day;?></span>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->execution->type;?></th>
<td>
<?php
if($isSprint)
{
echo html::select('lifetime', $lang->project->lifeTimeList, $execution->lifetime, "class='form-control' onchange='showLifeTimeTips()'");
}
else
{
echo html::select('attribute', $lang->stage->typeList, $execution->attribute, "class='form-control'");
}
?>
</td>
</tr>
<tr>
<th><?php echo $lang->execution->teamname;?></th>
<td><?php echo html::input('team', $execution->team, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->execution->status;?></th>
<td><?php echo html::select('status', $lang->execution->statusList, $execution->status, "class='form-control'");?></td>
</tr>
<tr>
<th rowspan='2'><?php echo $lang->execution->owner;?></th>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->execution->PO;?></span>
<?php echo html::select('PO', $poUsers, $execution->PO, "class='form-control chosen'");?>
</div>
</td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->execution->QD;?></span>
<?php echo html::select('QD', $qdUsers, $execution->QD, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->execution->PM;?></span>
<?php echo html::select('PM', $pmUsers, $execution->PM, "class='form-control chosen'");?>
</div>
</td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->execution->RD;?></span>
<?php echo html::select('RD', $rdUsers, $execution->RD, "class='form-control chosen'");?>
</div>
</td>
</tr>
<?php if(!$isSprint):?>
<tr>
<th><?php echo $lang->project->type;?></th>
<td>
<?php
if($isStage)
{
echo html::select('attribute', $lang->stage->typeList, $project->attribute, "class='form-control'");
}
else
{
echo html::select('lifetime', $lang->program->PRJLifeTimeList, $project->lifetime, "class='form-control' onchange='showLifeTimeTips()'");
}
?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->teamname;?></th>
<td><?php echo html::input('team', $project->team, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->project->status;?></th>
<td><?php echo html::select('status', $lang->project->statusList, $project->status, "class='form-control'");?></td>
</tr>
<tr>
<th rowspan='2'><?php echo $lang->project->owner;?></th>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->project->PO;?></span>
<?php echo html::select('PO', $poUsers, $project->PO, "class='form-control chosen'");?>
</div>
</td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->project->QD;?></span>
<?php echo html::select('QD', $qdUsers, $project->QD, "class='form-control chosen'");?>
</div>
</td>
</tr>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->project->PM;?></span>
<?php echo html::select('PM', $pmUsers, $project->PM, "class='form-control chosen'");?>
</div>
</td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->project->RD;?></span>
<?php echo html::select('RD', $rdUsers, $project->RD, "class='form-control chosen'");?>
</div>
</td>
</tr>
<?php if($isStage):?>
<tr>
<th><?php echo $lang->programplan->percent;?></th>
<td>
<div class='input-group'>
<?php echo html::input('percent', $project->percent, "class='form-control'");?>
<?php echo html::input('percent', $execution->percent, "class='form-control'");?>
<span class='input-group-addon'>%</span>
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id="<?php echo $isStage ? '' : 'productsBox';?>" colspan="2">
<?php $class = $project->grade == 2 ? "disabled='disabled'" : '';?>
<th><?php echo $lang->execution->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="2">
<?php $class = $execution->grade == 2 ? "disabled='disabled'" : '';?>
<div class='row'>
<?php $i = 0;?>
<?php foreach($linkedProducts as $product):?>
@@ -143,19 +141,17 @@
<?php if(in_array($product->id, $unmodifiableProducts)) echo html::hidden("products[$i]", $product->id);?>
<?php $i++;?>
<?php endforeach;?>
<?php if(!$isStage):?>
<div class='col-sm-4'>
<div class="input-group <?php echo $isStage ? 'required' : '';?>">
<div class="input-group">
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<span class='input-group-addon fix-border'></span>
</div>
</div>
<?php endif;?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->project->linkPlan;?></th>
<th><?php echo $lang->execution->linkPlan;?></th>
<td id="plansBox" colspan="2">
<div class='row'>
<?php $i = 0;?>
@@ -168,18 +164,18 @@
</td>
</tr>
<tr>
<th><?php echo $lang->project->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($project->desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
<th><?php echo $lang->execution->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($execution->desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<?php $this->printExtendFields($project, 'table');?>
<?php $this->printExtendFields($execution, 'table');?>
<tr>
<th><?php echo $lang->project->acl;?></th>
<?php $class = $project->grade == 2 ? "disabled='disabled'" : '';?>
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);' $class", 'block'));?></td>
<th><?php echo $lang->execution->acl;?></th>
<?php $class = $execution->grade == 2 ? "disabled='disabled'" : '';?>
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->execution->aclList, $execution->acl, "onclick='setWhite(this.value);' $class", 'block'));?></td>
</tr>
<tr class="<?php if($project->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<tr class="<?php if($execution->acl == 'open') echo 'hidden';?>" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
<td><?php echo html::select('whitelist[]', $users, $project->whitelist, 'class="form-control chosen" multiple');?></td>
<td><?php echo html::select('whitelist[]', $users, $execution->whitelist, 'class="form-control chosen" multiple');?></td>
<td></td>
</tr>
<tr><td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . ' ' . html::backButton();?></td></tr>
@@ -187,8 +183,8 @@
</form>
</div>
</div>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('weekend', $config->execution->weekend);?>
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
<?php js::set('unmodifiableProducts',$unmodifiableProducts);?>
<?php js::set('tip', $lang->project->notAllowRemoveProducts);?>
<?php js::set('tip', $lang->execution->notAllowRemoveProducts);?>
<?php include '../../common/view/footer.html.php';?>