* Add assigntome block page.

This commit is contained in:
wangyuting
2023-07-06 11:26:47 +08:00
parent 568162e304
commit a926efb811
2 changed files with 52 additions and 6 deletions
+51 -5
View File
@@ -10,23 +10,69 @@ declare(strict_types=1);
*/
namespace zin;
$blockNavCode = 'nav-' . uniqid();
$menus = array();
foreach($hasViewPriv as $type => $bool)
{
$selected = key($hasViewPriv);
$menus[] = li
(
set('class', 'nav-item nav-switch'),
a
(
set('class', $type == $selected ? 'active' : ''),
set('data-toggle', 'tab'),
set('href', "#assigntome{$type}Tab{$blockNavCode}"),
$type == 'review' ? $lang->my->audit : zget($lang->block->availableBlocks, $type)
)
);
}
$contents = array();
foreach($hasViewPriv as $type => $bool)
{
if(empty($config->block->{$type}->dtable->fieldList) || empty(${"{$type}s"})) continue;
$selected = key($hasViewPriv);
$contents[] = div
(
set('class', 'tab-pane ' . ($type == $selected ? 'active' : '')),
set('id', "assigntome{$type}Tab{$blockNavCode}"),
dtable
(
set::height(318),
set::bordered(false),
set::horzScrollbarPos('inside'),
set::cols(array_values($config->block->{$type}->dtable->fieldList)),
set::data(array_values(${"{$type}s"})),
set::userMap($users),
)
);
}
panel
(
set('class', 'assigntome-block'),
set('headingClass', 'border-b'),
set('bodyClass', 'p-0'),
to::heading
(
div
(
set('class', 'panel-title flex w-full'),
$block->title,
div
(
ul
(
set('class', 'nav nav-tabs'),
$menus
)
)
)
),
div
(
'我的待处理',
'正在开发中...'
)
div($contents)
);
render();
+1 -1
View File
@@ -42,7 +42,7 @@ panel
dtable
(
set::id('project'),
set::height(320),
set::height(318),
set::bordered(false),
set::horzScrollbarPos('inside'),
set::cols(array_values($config->block->project->dtable->fieldList)),