Files
EasySoft-ZenTaoPMS/module/execution/ui/kanban.html.php
T
2023-11-09 11:28:13 +08:00

53 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
/**
* The kanban view file of execution 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 Sun Guangming <sunguangming@easycorp.ltd>
* @package kanban
* @link https://www.zentao.net
*/
namespace zin;
$laneCount = 0;
$groupCols = array(); // 卡片可以移动到的同一group下的列。
foreach($kanbanList as $current => $region)
{
foreach($region['items'] as $index => $group)
{
$groupID = $group['id'];
$group['getLane'] = jsRaw('window.getLane');
$group['getCol'] = jsRaw('window.getCol');
$group['getItem'] = jsRaw('window.getItem');
$group['canDrop'] = jsRaw('window.canDrop');
$group['onDrop'] = jsRaw('window.onDrop');
$group['minColWidth'] = $execution->fluidBoard == '0' ? $execution->colWidth : $execution->minColWidth;
$group['maxColWidth'] = $execution->fluidBoard == '0' ? $execution->colWidth : $execution->maxColWidth;
$group['colProps'] = array('actions' => jsRaw('window.getColActions'));
$group['laneProps'] = array('actions' => jsRaw('window.getLaneActions'));
$group['itemProps'] = array('actions' => jsRaw('window.getItemActions'));
foreach($group['data']['cols'] as $colIndex => $col)
{
if($col['parent'] != '-1') $groupCols[$groupID][$col['id']] = $col['title'];
}
$kanbanList[$current]['items'][$index] = $group;
}
$laneCount += $region['laneCount'];
}
div
(
set::id('kanbanList'),
zui::kanbanList
(
set::key('kanban'),
set::items($kanbanList),
set::height('calc(100vh - 120px)')
)
);