166 lines
3.4 KiB
PHP
166 lines
3.4 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
/**
|
|
* The batchCreate view file of task module of ZenTaoPMS.
|
|
* @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 Shujie Tian<tianshujie@easycorp.ltd>
|
|
* @package task
|
|
* @link https://www.zentao.net
|
|
*/
|
|
namespace zin;
|
|
/* ====== Preparing and processing page data ====== */
|
|
jsVar('executionID', $execution->id);
|
|
jsVar('storyTasks', $storyTasks);
|
|
|
|
/* zin: Set variables to define picker options for form. */
|
|
|
|
$items = array();
|
|
|
|
/* Field of ID. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'id',
|
|
'label' => $lang->idAB,
|
|
'control' => 'index',
|
|
'width' => '30px',
|
|
);
|
|
|
|
/* Field of module. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'module',
|
|
'label' => $lang->task->module,
|
|
'control' => 'select',
|
|
'value' => $moduleID,
|
|
'items' => $modules,
|
|
'width' => '180px',
|
|
);
|
|
|
|
/* Field of story. */
|
|
if(!$hideStory)
|
|
{
|
|
$items[] = array
|
|
(
|
|
'name' => 'story',
|
|
'label' => $lang->task->story,
|
|
'control' => 'select',
|
|
'items' => $stories,
|
|
'width' => '200px',
|
|
'ditto' => true,
|
|
);
|
|
}
|
|
|
|
/* Field of name. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'name',
|
|
'label' => $lang->task->name,
|
|
'width' => '165px',
|
|
);
|
|
|
|
/* Field of region and lane. */
|
|
if($execution->type == 'kanban')
|
|
{
|
|
$items[] = array
|
|
(
|
|
'name' => 'regions',
|
|
'label' => $lang->kanbancard->region,
|
|
'control' => 'select',
|
|
'value' => $regionID,
|
|
'items' => $regionPairs,
|
|
'width' => '180px',
|
|
);
|
|
|
|
$items[] = array
|
|
(
|
|
'name' => 'lanes',
|
|
'label' => $lang->kanbancard->lane,
|
|
'control' => 'select',
|
|
'value' => $laneID,
|
|
'items' => $lanePairs,
|
|
'width' => '180px',
|
|
);
|
|
}
|
|
|
|
/* Field of type. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'type',
|
|
'label' => $lang->task->type,
|
|
'control' => 'select',
|
|
'items' => $lang->task->typeList,
|
|
'width' => '100px',
|
|
'ditto' => true,
|
|
);
|
|
|
|
/* Field of assignedTo. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'assignedTo',
|
|
'label' => $lang->task->assignedTo,
|
|
'control' => 'select',
|
|
'items' => $members,
|
|
'width' => '130px',
|
|
'ditto' => true,
|
|
);
|
|
|
|
/* Field of estimate. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'estimate',
|
|
'label' => $lang->task->estimateAB,
|
|
'width' => '70px',
|
|
);
|
|
|
|
/* Field of estStarted. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'estStarted',
|
|
'label' => $lang->task->estStarted,
|
|
'control' => 'date',
|
|
'width' => '120px',
|
|
'ditto' => true,
|
|
);
|
|
|
|
/* Field of deadline. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'deadline',
|
|
'label' => $lang->task->deadline,
|
|
'control' => 'date',
|
|
'width' => '120px',
|
|
'ditto' => true,
|
|
);
|
|
|
|
/* Field of desc. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'desc',
|
|
'label' => $lang->task->desc,
|
|
'control' => 'editor',
|
|
'width' => '150px',
|
|
);
|
|
|
|
/* Field of pri. */
|
|
$items[] = array
|
|
(
|
|
'name' => 'pri',
|
|
'label' => $lang->task->pri,
|
|
'control' => 'select',
|
|
'items' => $lang->task->priList,
|
|
'width' => '130px',
|
|
'ditto' => true,
|
|
);
|
|
|
|
/* ====== Define the page structure with zin widgets ====== */
|
|
|
|
formBatchPanel
|
|
(
|
|
set::items($items),
|
|
on::change('[data-name="module"]', 'setStories'),
|
|
);
|
|
|
|
/* ====== Render page ====== */
|
|
render();
|