* adjust code.

This commit is contained in:
wangyidong
2021-03-04 13:02:00 +08:00
parent 1ad514e0b0
commit e24eab6174
14 changed files with 1475 additions and 1492 deletions
+35 -35
View File
@@ -1,23 +1,23 @@
<?php
/**
* The create view of project module of ZenTaoPMS.
* The create 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: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php if(isset($tips)):?>
<?php $defaultURL = $this-> createLink('project', 'task', 'projectID=' . $projectID);?>
<?php $defaultURL = $this-> createLink('execution', 'task', 'executionID=' . $executionID);?>
<?php include '../../common/view/header.lite.html.php';?>
<body>
<div class='modal-dialog mw-500px' id='tipsModal'>
<div class='modal-header'>
<a href='<?php echo $defaultURL;?>' class='close'><i class="icon icon-close"></i></a>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->tips;?></h4>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->execution->tips;?></h4>
</div>
<div class='modal-body'>
<?php echo $tips;?>
@@ -31,57 +31,57 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('holders', $lang->project->placeholder);?>
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
<?php js::set('weekend', $config->execution->weekend);?>
<?php js::set('holders', $lang->execution->placeholder);?>
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
<?php js::set('productID', empty($productID) ? 0 : $productID);?>
<?php js::set('isStage', $isStage);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->project->create;?></h2>
<h2><?php echo $lang->execution->create;?></h2>
<div class="pull-right btn-toolbar">
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->project->copy;?></button>
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->execution->copy;?></button>
</div>
</div>
<form class='form-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>
<th class='w-120px'><?php echo $lang->execution->name;?></th>
<td class="col-main"><?php echo html::input('name', $name, "class='form-control' required");?></td>
<td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->code;?></th>
<th><?php echo $lang->execution->code;?></th>
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></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', (isset($plan) && !empty($plan->begin) ? $plan->begin : date('Y-m-d')), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->project->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->project->to;?></span>
<?php echo html::input('end', (isset($plan) && !empty($plan->end) ? $plan->end : ''), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->project->end . "' required");?>
<?php echo html::input('begin', (isset($plan) && !empty($plan->begin) ? $plan->begin : date('Y-m-d')), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->execution->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->execution->to;?></span>
<?php echo html::input('end', (isset($plan) && !empty($plan->end) ? $plan->end : ''), "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->execution->end . "' required");?>
</div>
</td>
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
<td colspan='2'><?php echo html::radio('delta', $lang->execution->endList , '', "onclick='computeEndDate(this.value)'");?></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', (isset($plan) && !empty($plan->begin) ? helper::workDays($plan->begin, $plan->end) : ''), "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
<span class='input-group-addon'><?php echo $lang->execution->day;?></span>
</div>
</td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->teamname;?></th>
<th><?php echo $lang->execution->teamname;?></th>
<td><?php echo html::input('team', $team, "class='form-control'");?></td><td></td><td></td>
</tr>
<?php if(!$isSprint):?>
<tr>
<th><?php echo $lang->project->type;?></th>
<th><?php echo $lang->execution->type;?></th>
<td>
<?php
if($isStage)
@@ -90,11 +90,11 @@
}
else
{
echo html::select('lifetime', $lang->program->PRJLifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'");
echo html::select('lifetime', $lang->execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'");
}
?>
</td>
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->project->typeDesc;?></div></td>
<td class='muted' colspan='2'><div id='lifeTimeTips'><?php echo $lang->execution->typeDesc;?></div></td>
</tr>
<?php endif;?>
<?php if($isStage):?>
@@ -109,14 +109,14 @@
</tr>
<?php endif;?>
<tr class='hide'>
<th><?php echo $lang->project->status;?></th>
<th><?php echo $lang->execution->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
<td></td>
<td></td>
</tr>
<?php $this->printExtendFields('', 'table', 'columns=3');?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<th><?php echo $lang->execution->manageProducts;?></th>
<td class='text-left' id="<?php echo $isStage ? '' : 'productsBox';?>" colspan="3">
<div class='row'>
<?php $i = 0;?>
@@ -141,13 +141,13 @@
</td>
</tr>
<tr>
<th><?php echo $lang->project->linkPlan;?></th>
<th><?php echo $lang->execution->linkPlan;?></th>
<td colspan="3" id="plansBox">
<div class='row'>
<?php if(isset($plan) && !empty($plan->begin)):?>
<div class="col-sm-4" id="plan0"><?php echo html::select("plans[" . $plan->product . "]", $productPlan, $plan->id, "class='form-control chosen'");?></div>
<?php js::set('currentPlanID', $plan->id)?>
<?php elseif($copyProjectID):?>
<?php elseif($copyExecutionID):?>
<?php $i = 0;?>
<?php foreach($products as $product):?>
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
@@ -162,15 +162,15 @@
</td>
</tr>
<tr>
<th><?php echo $lang->project->desc;?></th>
<th><?php echo $lang->execution->desc;?></th>
<td colspan='3'>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=project&link=desc');?>
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=execution&link=desc');?>
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
<th><?php echo $lang->execution->acl;?></th>
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->execution->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr class="hidden" id="whitelistBox">
<th><?php echo $lang->whitelist;?></th>
@@ -193,20 +193,20 @@
<div class='modal-dialog mw-900px'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'><i class="icon icon-close"></i></button>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->project->copyTitle;?></h4>
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->execution->copyTitle;?></h4>
</div>
<div class='modal-body'>
<?php if(count($projects) == 1):?>
<?php if(count($executions) == 1):?>
<div class='alert with-icon'>
<i class='icon-exclamation-sign'></i>
<div class='content'><?php echo $lang->project->copyNoProject;?></div>
<div class='content'><?php echo $lang->execution->copyNoProject;?></div>
</div>
<?php else:?>
<div id='copyProjects' class='row'>
<?php foreach ($projects as $id => $name):?>
<?php foreach ($executions as $id => $name):?>
<?php if(empty($id)):?>
<?php if($copyProjectID != 0):?>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->project->cancelCopy;?></a></div>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='' class='cancel'><?php echo html::icon($lang->icons['cancel']) . ' ' . $lang->execution->cancelCopy;?></a></div>
<?php endif;?>
<?php else: ?>
<div class='col-md-4 col-sm-6'><a href='javascript:;' data-id='<?php echo $id;?>' class='nobr <?php echo ($copyProjectID == $id) ? ' active' : '';?>'><?php echo html::icon($lang->icons[$iconObject], 'text-muted') . ' ' . $name;?></a></div>