* Finish task #36375.

This commit is contained in:
tianshujie98
2021-03-03 09:41:35 +08:00
parent f53deb3ca5
commit 0d11a4dca3
9 changed files with 91 additions and 19 deletions
+23 -6
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('weekend', $config->project->weekend);?>
<?php js::set('linkedProjectsTip', $lang->program->linkedProjectsTip);?>
<?php js::set('changeProgram', $lang->program->changeProgram);?>
<?php $requiredFields = $config->program->PRJEdit->requiredFields;?>
@@ -22,19 +23,35 @@
<table class="table table-form">
<thead>
<tr>
<th class='w-40px'> <?php echo $lang->idAB;?></th>
<th class='w-200px'> <?php echo $lang->program->PGMParent;?></th>
<th class='w-40px'><?php echo $lang->idAB;?></th>
<th class='w-200px'><?php echo $lang->program->PGMParent;?></th>
<th class='c-name required'><?php echo $lang->program->PRJName;?></th>
<th class="w-150px <?php echo strpos($requiredFields, 'PM') !== false ? 'required' : '';?>"> <?php echo $lang->program->PRJPM;?></th>
<th class='w-120px required'><?php echo $lang->program->begin;?></th>
<th class='w-120px required'><?php echo $lang->program->end;?></th>
<th class='w-250px'><?php echo $lang->project->acl;?></th>
</tr>
</thead>
<tbody>
<?php foreach($projectIdList as $projectID):?>
<?php foreach($projects as $projectID => $project):?>
<?php $aclList = $project->parent ? $lang->program->PGMPRJAcls : $lang->program->PRJAcls;?>
<tr>
<td><?php echo sprintf('%03d', $projectID) . html::hidden("projectIdList[$projectID]", $projectID);?></td>
<td><?php echo html::select("parents[$projectID]", $programList, $projects[$projectID]->parent, "class='form-control chosen' data-id='$projectID' data-name='{$projects[$projectID]->name}' data-parent='{$projects[$projectID]->parent}'");?></td>
<td title='<?php echo $projects[$projectID]->name;?>'><?php echo html::input("names[$projectID]", $projects[$projectID]->name, "class='form-control'");?></td>
<td><?php echo html::select("PMs[$projectID]", $PMUsers, $projects[$projectID]->PM, "class='form-control chosen'");?></td>
<td><?php echo html::select("parents[$projectID]", $programList, $project->parent, "class='form-control chosen' data-id='$projectID' data-name='{$project->name}' data-parent='{$project->parent}'");?></td>
<td title='<?php echo $project->name;?>'><?php echo html::input("names[$projectID]", $project->name, "class='form-control'");?></td>
<td><?php echo html::select("PMs[$projectID]", $PMUsers, $project->PM, "class='form-control chosen'");?></td>
<td>
<?php echo html::input("begins[$projectID]", $project->begin, "class='form-control form-date' onchange='computeWorkDays(this.id);' placeholder='" . $lang->program->begin . "'");?>
</td>
<td>
<?php
$disabledEnd = $project->end == LONG_TIME ? 'disabled' : '';
$end = $project->end == LONG_TIME ? $lang->program->PRJLongTime : $project->end;
echo html::input("ends[$projectID]", $end, "class='form-control form-date' $disabledEnd onchange='computeWorkDays(this.id);' placeholder='" . $lang->program->end . "'");
echo html::hidden("dayses[$projectID]", $project->days);
?>
</td>
<td><?php echo nl2br(html::radio("acls[$projectID]", $aclList, $project->acl));?></td>
</tr>
<?php endforeach;?>
</tbody>