diff --git a/module/programplan/ui/edit.html.php b/module/programplan/ui/edit.html.php new file mode 100644 index 0000000000..b6a4e9c273 --- /dev/null +++ b/module/programplan/ui/edit.html.php @@ -0,0 +1,243 @@ + + * @package programPlan + * @link https://www.zentao.net + */ + +namespace zin; + +jsVar('plan', $plan); +jsVar('stageTypeList', $lang->stage->typeList); +jsVar('changeAttrLang', $lang->programplan->confirmChangeAttr); +jsVar('isTopStage', $isTopStage); +jsVar('isLeafStage', $isLeafStage); + +formPanel +( + set::title(''), + set::actions(array()), + div + ( + set::class('flex items-center pb-2.5'), + span($lang->edit), + span($plan->name, set::class('text-lg font-bold ml-3')), + label($plan->id, set::class('circle ml-2 label-id px-2')) + ), + formGroup + ( + set(array( + 'label' => $lang->programplan->parent, + 'width' => '2/3' + )), + select + ( + on::change('changeParentStage(this)'), + set(array( + 'id' => 'parent', + 'name' => 'parent', + 'items' => $parentStageList, + 'value' => $plan->parent + )) + ) + ), + formGroup + ( + set(array( + 'label' => $lang->programplan->name, + 'required' => true, + 'width' => '2/3' + )), + input(set(array( + 'name' => 'name', + 'value' => $plan->name + ))) + ), + isset($config->setCode) && $config->setCode == 1 ? + formGroup + ( + set(array( + 'label' => $lang->execution->code, + 'required' => true, + 'width' => '2/3' + )), + input(set(array( + 'name' => 'code', + 'value' => $plan->code + ))) + ): null, + formGroup + ( + set(array( + 'label' => $lang->programplan->PM, + 'width' => '2/3' + )), + select(set(array( + 'name' => 'PM', + 'items' => $PMUsers, + 'value' => $plan->PM + ))) + ), + isset($config->setPercent) && $config->setPercent == 1 ? + formGroup + ( + set(array( + 'label' => $lang->programplan->percent, + 'width' => '2/3' + )), + inputControl + ( + input(set(array( + 'name' => 'percent', + 'value' => $plan->percent + ))), + to::suffix('%'), + set::suffixWidth('lg') + ) + ): null, + formRow + ( + formGroup + ( + set(array( + 'label' => $lang->programplan->attribute, + 'width' => '2/3' + )), + $enableOptionalAttr ? + select(set(array( + 'id' => 'attribute', + 'name' => 'attribute', + 'items' => $lang->stage->typeList, + 'value' => $plan->attribute + ))): + zget($lang->stage->typeList, $plan->attribute) + ), + formGroup + ( + btn(set(array( + 'icon' => 'help', + 'data-toggle' => 'tooltip', + 'data-placement' => 'right', + 'href' => 'helpTip', + 'class' => 'ghost h-8 tooltip-btn' + ))), + div + ( + $lang->execution->typeTip, + set(array( + 'id' => 'helpTip', + 'class' => 'tooltip darker' + )) + ) + ) + ), + $plan->setMilestone ? + formGroup + ( + set(array( + 'label' => $lang->programplan->milestone, + 'width' => '2/3' + )), + radioList(set(array( + 'name' => 'milestone', + 'items' => $lang->programplan->milestoneList, + 'value' => $plan->milestone, + 'inline' => true + ))) + ) : input(set(array( + 'type' => 'hidden', + 'value' => $plan->milestone + ))), + formGroup + ( + set(array( + 'label' => $lang->project->acl, + 'width' => '2/3' + )), + select(set(array( + 'name' => 'acl', + 'items' => $lang->execution->aclList, + 'value' => $plan->acl, + 'disabled' => $plan->grade == 2 ? 'disabled' : '' + ))) + ), + formGroup + ( + set(array( + 'label' => $lang->programplan->planDateRange, + 'required' => true, + 'width' => '2/3' + )), + inputGroup + ( + input(set(array( + 'type' => 'date', + 'name' => 'begin', + 'value' => $plan->begin + ))), + $lang->project->to, + input(set(array( + 'type' => 'date', + 'name' => 'end', + 'value' => $plan->end + ))) + ) + ), + formGroup + ( + set(array( + 'label' => $lang->programplan->realDateRange, + 'width' => '2/3' + )), + inputGroup + ( + input(set(array( + 'type' => 'date', + 'name' => 'realBegan', + 'value' => $plan->realBegan + ))), + $lang->project->to, + input(set(array( + 'type' => 'date', + 'name' => 'realEnd', + 'value' => $plan->realEnd + ))) + ) + ), + isset($this->config->qcVersion) ? + formGroup + ( + set(array( + 'label' => $lang->programplan->output, + 'width' => '2/3' + )), + select(set(array( + 'name' => 'output[]', + 'items' => $documentList, + 'value' => $plan->output, + 'multiple' => true + ))) + ) : null, + formGroup + ( + set(array( + 'width' => '2/3', + 'class' => 'justify-center form-actions' + )), + btn + ( + on::click('editStage()'), + set(array( + 'text' => $lang->save, + 'class' => 'primary toolbar-item' + )) + ) + ) +); + +render();