* Refactor the bug block view.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The bugblock view file of block 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 Tingting Dai <daitingting@easycorp.ltd>
|
||||
* @package block
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
if(!$longBlock)
|
||||
{
|
||||
unset($config->block->bug->dtable->fieldList['id']);
|
||||
unset($config->block->bug->dtable->fieldList['pri']);
|
||||
unset($config->block->bug->dtable->fieldList['confirmed']);
|
||||
unset($config->block->bug->dtable->fieldList['deadline']);
|
||||
}
|
||||
|
||||
panel
|
||||
(
|
||||
set('class', 'bug-block ' . ($longBlock ? 'block-long' : 'block-sm')),
|
||||
set('headingClass', 'border-b'),
|
||||
to::heading
|
||||
(
|
||||
div
|
||||
(
|
||||
set('class', 'panel-title'),
|
||||
span($block->title),
|
||||
)
|
||||
),
|
||||
to::headingActions
|
||||
(
|
||||
a
|
||||
(
|
||||
set('class', 'text-gray'),
|
||||
set('href', createLink('my', 'work', 'mode=bug&type=' . $block->params->type)),
|
||||
$lang->more,
|
||||
icon('caret-right')
|
||||
)
|
||||
),
|
||||
dtable
|
||||
(
|
||||
set::className('borderless'),
|
||||
set::cols(array_values($config->block->bug->dtable->fieldList)),
|
||||
set::data(array_values($bugs)),
|
||||
set::horzScrollbarPos('inside'),
|
||||
),
|
||||
);
|
||||
|
||||
render();
|
||||
Reference in New Issue
Block a user