* [bug#27774,done,2h] Refact the project-programTitle page.
This commit is contained in:
@@ -28,6 +28,7 @@ class moduleMenu extends wg
|
||||
'appendSettingItems?: array',
|
||||
'onCheck?: function',
|
||||
'toggleSidebar?: bool=true',
|
||||
'isInModal?: bool=false'
|
||||
);
|
||||
|
||||
protected static array $defineBlocks = array
|
||||
@@ -139,6 +140,7 @@ class moduleMenu extends wg
|
||||
$settingLink = $this->prop('settingLink');
|
||||
$showDisplay = $this->prop('showDisplay');
|
||||
$appendSettingItems = $this->prop('appendSettingItems');
|
||||
$isInModal = $this->prop('isInModal');
|
||||
if(!$settingLink && !$showDisplay && !$appendSettingItems) return null;
|
||||
|
||||
global $app;
|
||||
@@ -159,15 +161,18 @@ class moduleMenu extends wg
|
||||
set::url($settingLink),
|
||||
set::type('primary-pale'),
|
||||
setData('app', $tab),
|
||||
$isInModal ? setData(array('toggle' => 'modal', 'size' => 'md')) : null
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$items[] = array
|
||||
(
|
||||
'text' => $settingText,
|
||||
'url' => $settingLink,
|
||||
'data-app' => $tab
|
||||
'text' => $settingText,
|
||||
'url' => $settingLink,
|
||||
'data-app' => $tab,
|
||||
'data-toggle' => $isInModal ? 'modal' : '',
|
||||
'data-size' => $isInModal ? 'md' : ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ toolbar
|
||||
);
|
||||
|
||||
/* zin: Define the sidebar in main content. */
|
||||
$settingLink = hasPriv('project', 'programTitle') ? createLink('project', 'programTitle') : '';
|
||||
empty($globalDisableProgram) && $config->vision != 'lite' ? sidebar
|
||||
(
|
||||
moduleMenu(set(array
|
||||
@@ -75,7 +76,10 @@ empty($globalDisableProgram) && $config->vision != 'lite' ? sidebar
|
||||
'modules' => $programTree,
|
||||
'activeKey' => $programID,
|
||||
'closeLink' => $this->createLink('project', 'browse', "programID=0&browseType={$browseType}"),
|
||||
'showDisplay' => false
|
||||
'settingLink' => $settingLink,
|
||||
'settingText' => $lang->project->moduleSetting,
|
||||
'showDisplay' => false,
|
||||
'isInModal' => true
|
||||
)))
|
||||
) : null;
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The programTitle view file of project module of ZenTaoPMS.
|
||||
* @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(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 Fangzhou Hu<hufangzhou@easycorp.ltd>
|
||||
* @package project
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
|
||||
namespace zin;
|
||||
|
||||
global $lang;
|
||||
|
||||
set::title($lang->project->moduleSetting);
|
||||
form
|
||||
(
|
||||
formGroup
|
||||
(
|
||||
set::label($lang->project->moduleOpen),
|
||||
radiolist
|
||||
(
|
||||
set::name('programTitle'),
|
||||
set::inline(true),
|
||||
set::items($lang->project->programTitle),
|
||||
set::value($status)
|
||||
)
|
||||
),
|
||||
set::actions(array('submit'))
|
||||
);
|
||||
Reference in New Issue
Block a user