* Finish task #8534.
This commit is contained in:
@@ -424,6 +424,7 @@ class programplanModel extends model
|
||||
$parentStage = $this->getByID($parentID);
|
||||
$parentAttribute = $parentStage->attribute;
|
||||
$parentPercent = $parentStage->percent;
|
||||
$parentACL = $parentStage->acl;
|
||||
}
|
||||
|
||||
$attributes = array_values($attributes);
|
||||
@@ -447,7 +448,7 @@ class programplanModel extends model
|
||||
$plan->realBegan = empty($realBegan[$key]) ? '0000-00-00' : $realBegan[$key];
|
||||
$plan->realEnd = empty($realEnd[$key]) ? '0000-00-00' : $realEnd[$key];
|
||||
$plan->output = empty($output[$key]) ? '' : implode(',', $output[$key]);
|
||||
$plan->acl = $acl[$key];
|
||||
$plan->acl = empty($parentID) ? $acl[$key] : $parentACL;
|
||||
|
||||
$datas[] = $plan;
|
||||
}
|
||||
@@ -543,7 +544,7 @@ class programplanModel extends model
|
||||
{
|
||||
unset($data->id);
|
||||
$data->status = 'wait';
|
||||
$data->acl = 'open';
|
||||
$data->acl = $data->parent == 0 ? 'open' : $this->dao->findByID($data->parent)->from(TABLE_PROJECT)->fetch('acl');
|
||||
$data->version = 1;
|
||||
$data->parentVersion = $data->parent == 0 ? 0 : $this->dao->findByID($data->parent)->from(TABLE_PROJECT)->fetch('version');
|
||||
$data->team = substr($data->name,0, 30);
|
||||
@@ -559,6 +560,8 @@ class programplanModel extends model
|
||||
if(!dao::isError())
|
||||
{
|
||||
$stageID = $this->dao->lastInsertID();
|
||||
|
||||
if($data->acl != 'open') $this->user->updateUserView($stageID, 'sprint');
|
||||
$this->dao->update(TABLE_PROJECT)->set('`order`')->eq($stageID * 5)->where('id')->eq($stageID)->exec();
|
||||
|
||||
/* Create doc lib. */
|
||||
@@ -660,6 +663,7 @@ class programplanModel extends model
|
||||
{
|
||||
$parentPlan = $this->getByID($plan->parent);
|
||||
$plan->attribute = $parentPlan->attribute;
|
||||
$plan->acl = $parentPlan->acl;
|
||||
$parentPercent = $parentPlan->percent;
|
||||
|
||||
$childrenTotalPercent = $this->getTotalPercent($parentPlan, true);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php $hideAttribute = $planID == 0 ? '' : ' hidden'?>
|
||||
<?php $class = $planID == 0 ? '' : "disabled='disabled'"?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class='main-form form-ajax' method='post' id='planForm' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
@@ -53,7 +54,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $stage->type, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[]' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
@@ -84,7 +85,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, $plan->acl, 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, $plan->milestone, $disabled);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' value='<?php echo $plan->begin;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='<?php echo $plan->end;?>' class='form-control form-date' /></td>
|
||||
@@ -112,7 +113,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
@@ -151,7 +152,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?> </th>
|
||||
<td><?php echo html::select('acl', $lang->project->aclList, $plan->acl, 'class="form-control"');?></td>
|
||||
<?php $class = $plan->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<td><?php echo html::select('acl', $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->begin;?> </th>
|
||||
|
||||
Reference in New Issue
Block a user