* Edit task edit ui and adjust code style
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The edit view of task of ZenTaoPMS.
|
||||
*/
|
||||
|
||||
/*
|
||||
======= Attention ======
|
||||
|
||||
This file is generated by zin-tool, you should check the following to-do list.
|
||||
|
||||
+ Familiar with the use of these widgets in zin: .
|
||||
+ Check the following variables which used in widgets: $executionOptions, $moduleOptions, $storyOptions, $modeOptions, $assignedToOptions, $typeOptions, $statusOptions, $priOptions, $mailtoOptions, $contactListMenuOptions, $finishedByOptions, $canceledByOptions, $closedByOptions, $closedReasonOptions, $teamOptions, $teamOptions, $teamOptions, $teamOptions, $teamOptions, $teamOptions.
|
||||
+ Check the origin code in module/task/view/edit.html.php, and ensure that all features have been implemented.
|
||||
+ Check the origin js code in module/task/js/common.js and module/task/js/edit.js
|
||||
+ Check the origin css code in module/task/css/common.css and module/task/css/edit.css
|
||||
+ Remove the comments which starts with "zin:"
|
||||
+ Test according to the new design draft and the original implementation
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author zenggang<zenggang@easycorp.ltd>
|
||||
* @package task
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
|
||||
namespace zin;
|
||||
@@ -74,7 +67,7 @@ formPanel
|
||||
setClass('flex'),
|
||||
cell
|
||||
(
|
||||
set('width', '67%'),
|
||||
set('width', '2/3'),
|
||||
h::strong
|
||||
(
|
||||
$lang->task->name,
|
||||
@@ -90,6 +83,7 @@ formPanel
|
||||
set::required(true),
|
||||
set::autofocus(true),
|
||||
),
|
||||
h::hr(setClass('my-5')),
|
||||
h::strong
|
||||
(
|
||||
$lang->task->desc,
|
||||
@@ -102,6 +96,7 @@ formPanel
|
||||
set::value(htmlSpecialString($task->desc)),
|
||||
set::control('textarea'),
|
||||
),
|
||||
h::hr(setClass('my-3')),
|
||||
h::strong
|
||||
(
|
||||
$lang->comment,
|
||||
@@ -114,6 +109,13 @@ formPanel
|
||||
set::value(''),
|
||||
set::control('textarea'),
|
||||
),
|
||||
h::hr(setClass('my-3')),
|
||||
h::strong
|
||||
(
|
||||
$lang->files,
|
||||
setClass('leading-8')
|
||||
),
|
||||
h::hr(setClass('my-3')),
|
||||
history
|
||||
(
|
||||
set::actions($actions),
|
||||
@@ -123,8 +125,7 @@ formPanel
|
||||
),
|
||||
cell
|
||||
(
|
||||
on::change('#execution'),
|
||||
set('width', '33%'),
|
||||
set('width', '1/3'),
|
||||
setClass('pl-5'),
|
||||
h::strong
|
||||
(
|
||||
@@ -139,7 +140,8 @@ formPanel
|
||||
set::value($task->execution),
|
||||
set::control("picker"),
|
||||
set::strong(true),
|
||||
set::items($executionOptions)
|
||||
set::items($executionOptions),
|
||||
on::change('loadAll(this.value)'),
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
@@ -159,19 +161,32 @@ formPanel
|
||||
set::strong(true),
|
||||
set::items($storyOptions)
|
||||
),
|
||||
(empty($modeText))
|
||||
? formGroup
|
||||
($task->parent >= 0 and empty($task->team)) ? formGroup
|
||||
(
|
||||
set::name("parent"),
|
||||
set::label($lang->task->parent),
|
||||
set::value($task->parent),
|
||||
set::control("picker"),
|
||||
set::strong(true),
|
||||
set::items($tasks)
|
||||
) : null,
|
||||
(empty($modeText)) ? formGroup
|
||||
(
|
||||
set::name("mode"),
|
||||
set::label($lang->task->mode),
|
||||
set::value($task->mode),
|
||||
set::control("picker"),
|
||||
set::strong(true),
|
||||
set::items($modeOptions)
|
||||
)
|
||||
: label
|
||||
set::items($modeOptions),
|
||||
on::change('changeMode(this.value)')
|
||||
) : formGroup
|
||||
(
|
||||
$modeText
|
||||
set::label($lang->task->mode),
|
||||
set::strong(true),
|
||||
inputGroup
|
||||
(
|
||||
$modeText
|
||||
)
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
@@ -188,12 +203,14 @@ formPanel
|
||||
'type' => "picker",
|
||||
'items' => $assignedToOptions
|
||||
))),
|
||||
btn(set(array
|
||||
$task->mode != ''
|
||||
? btn(set(array
|
||||
(
|
||||
'type' => "btn",
|
||||
'text' => $lang->task->team,
|
||||
'class' => "input-group-btn team-group"
|
||||
)))
|
||||
: null
|
||||
)
|
||||
),
|
||||
formGroup
|
||||
@@ -206,8 +223,7 @@ formPanel
|
||||
set::strong(true),
|
||||
set::items($typeOptions)
|
||||
),
|
||||
empty($task->children)
|
||||
? formGroup
|
||||
empty($task->children) ? formGroup
|
||||
(
|
||||
set::name("status"),
|
||||
set::label($lang->task->status),
|
||||
@@ -215,8 +231,7 @@ formPanel
|
||||
set::control("picker"),
|
||||
set::strong(true),
|
||||
set::items($statusOptions)
|
||||
)
|
||||
: null,
|
||||
) : null,
|
||||
formGroup
|
||||
(
|
||||
set::name("pri"),
|
||||
@@ -283,6 +298,22 @@ formPanel
|
||||
set::control("text")
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
set::label($lang->task->consumed),
|
||||
set::strong(true),
|
||||
span
|
||||
(
|
||||
$task->consumed,
|
||||
h::a
|
||||
(
|
||||
icon
|
||||
(
|
||||
'time'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
formGroup
|
||||
(
|
||||
set::name("left"),
|
||||
set::label($lang->task->left),
|
||||
|
||||
Reference in New Issue
Block a user