* Finish task #85630.

This commit is contained in:
liumengyi
2023-02-27 06:54:39 +00:00
parent 6f8ec51731
commit 4912b2004e
14 changed files with 85 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ if(!isset($config->safe->weak)) $config->safe->weak = '123456,password,12345,123
$config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice', 'conference', 'client');
$config->admin->menuGroup['user'] = array('dept', 'company', 'user', 'group');
$config->admin->menuGroup['switch'] = array('admin|setmodule');
$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|estimate', 'custom|hours', 'subject', 'process', 'activity', 'zoutput', 'classify', 'holiday', 'reviewsetting');
$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|percent','custom|estimate', 'custom|hours', 'subject', 'process', 'activity', 'zoutput', 'classify', 'holiday', 'reviewsetting');
$config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder', 'report');
$config->admin->menuGroup['template'] = array('custom|set', 'baseline');
$config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message');
+2
View File
@@ -89,6 +89,7 @@ $lang->admin->menuList->model['tabMenu']['common']['stage'] = array('link
$lang->admin->menuList->model['tabMenu']['common']['build'] = array('link' => "{$lang->build->common}|custom|required|module=build", 'alias' => 'set', 'exclude' => 'custom');
$lang->admin->menuList->model['tabMenu']['common']['flow'] = array('link' => "{$lang->custom->flow}|custom|flow|", 'divider' => true);
$lang->admin->menuList->model['tabMenu']['common']['code'] = array('link' => "{$lang->code}|custom|code|");
$lang->admin->menuList->model['tabMenu']['common']['percent'] = array('link' => "{$lang->stage->percent}|custom|percent|");
$lang->admin->menuList->model['tabMenu']['common']['hours'] = array('link' => "{$lang->workingHour}|custom|hours|", 'subModule' => 'holiday', 'links' => array('holiday|browse|'));
$lang->admin->menuList->model['tabMenu']['waterfall']['stage'] = array('link' => "{$lang->stage->common}|stage|browse|", 'subModule' => 'stage', 'exclude' => 'stage-plusbrowse');
$lang->admin->menuList->model['tabMenu']['waterfallplus']['stage'] = array('link' => "{$lang->stage->common}|stage|plusbrowse|", 'subModule' => 'stage', 'exclude' => 'stage-browse');
@@ -97,6 +98,7 @@ $lang->admin->menuList->model['tabMenu']['menuOrder']['common']['7'] = 's
$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['10'] = 'build';
$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['35'] = 'flow';
$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['40'] = 'code';
$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['43'] = 'percent';
$lang->admin->menuList->model['tabMenu']['menuOrder']['common']['45'] = 'hours';
$lang->admin->menuList->model['tabMenu']['menuOrder']['waterfall']['5'] = 'stage';
$lang->admin->menuList->model['tabMenu']['menuOrder']['waterfallplus']['5'] = 'stage';
+1
View File
@@ -203,6 +203,7 @@ $lang->design->DBDS = 'DBDS';
$lang->design->ADS = 'ADS';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->stage->percent = 'Workload Ratio';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
+1
View File
@@ -203,6 +203,7 @@ $lang->design->DBDS = 'Database Design';
$lang->design->ADS = 'Interface Design';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->stage->percent = 'Workload Ratio';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
+1
View File
@@ -203,6 +203,7 @@ $lang->design->DBDS = 'DBDS';
$lang->design->ADS = 'ADS';
$lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->stage->percent = 'Workload Ratio';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
+1
View File
@@ -203,6 +203,7 @@ $lang->design->DBDS = '数据库设计';
$lang->design->ADS = '接口设计';
$lang->stage->common = '阶段';
$lang->stage->list = '阶段列表';
$lang->stage->percent = '工作量占比';
$lang->execution->list = "{$lang->executionCommon}列表";
$lang->kanban->common = '看板';
$lang->backup->common = '备份';
+19
View File
@@ -862,6 +862,25 @@ class custom extends control
$this->display();
}
/**
* Set stage percent.
*
* @access public
* @return void
*/
public function percent()
{
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.setPercent', $this->post->percent);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->stage->percent;
$this->display();
}
/**
* Set hours and weekend
*
+3
View File
@@ -0,0 +1,3 @@
.table-form>tbody>tr>th.c-setPercent {width: 135px;}
#readOnlyOfPercent {font-size: 13px; color: #5e626d; display: flex; width: 200%;}
#readOnlyOfPercent i {font-size: 14px; color: #0075ff; margin-right: 3px;}
+3
View File
@@ -58,6 +58,8 @@ $lang->custom->executionCommon = 'Execution';
$lang->custom->selectDefaultProgram = 'Please select default program';
$lang->custom->defaultProgram = 'Default program';
$lang->custom->modeManagement = 'Mode Management';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}";
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = 'After selecting by individual, pos
$lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.';
$lang->custom->notice->repeatKey = 'Repeat Key %s';
$lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.';
$lang->custom->notice->readOnlyOfPercent = 'The "Workload Ratio" is used to divide the workload of a project into different stages. The sum of the percentages of the same level stages cannot exceed 100%. After enabling the "Workload Ratio", users have to fill in the ratio fields when setting up the stages in the Waterfall project and Waterfall Plus project management models.';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to go to Product Homepage?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to go to Project Homepage?";
+3
View File
@@ -58,6 +58,8 @@ $lang->custom->executionCommon = 'Execution';
$lang->custom->selectDefaultProgram = 'Please select default program';
$lang->custom->defaultProgram = 'Default program';
$lang->custom->modeManagement = 'Mode Management';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}";
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = 'After selecting by individual, pos
$lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.';
$lang->custom->notice->repeatKey = 'Repeat Key %s';
$lang->custom->notice->readOnlyOfCode = 'A code is a management term that exists for secrecy or as an antonym. When code management is enabled, the code information of product, project, and execution in the system will be displayed in the creation, editing, detail, and list pages.';
$lang->custom->notice->readOnlyOfPercent = 'The "Workload Ratio" is used to divide the workload of a project into different stages. The sum of the percentages of the same level stages cannot exceed 100%. After enabling the "Workload Ratio", users have to fill in the ratio fields when setting up the stages in the Waterfall project and Waterfall Plus project management models.';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Home. Do you want to go to Product Home?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Home. Do you want to go to Project Home?";
+3
View File
@@ -58,6 +58,8 @@ $lang->custom->executionCommon = 'Execution';
$lang->custom->selectDefaultProgram = 'Please select default program';
$lang->custom->defaultProgram = 'Default program';
$lang->custom->modeManagement = 'Mode Management';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "Enable or Disable {$lang->stage->percent}";
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = 'After selecting by individual, pos
$lang->custom->notice->selectAllTip = 'After selecting all people, the reviewers will be emptied and grayed out while hiding their positions and departments.';
$lang->custom->notice->repeatKey = 'Repeat Key %s';
$lang->custom->notice->readOnlyOfCode = "Le code est un terme de gestion utilisé pour la confidentialité ou comme alias. Lorsque la gestion du code est activée, le produit, le projet et l'exécution dans le système afficheront les informations de code sur les pages de création, de modification, de détails et de liste.";
$lang->custom->notice->readOnlyOfPercent = 'The "Workload Ratio" is used to divide the workload of a project into different stages. The sum of the percentages of the same level stages cannot exceed 100%. After enabling the "Workload Ratio", users have to fill in the ratio fields when setting up the stages in the Waterfall project and Waterfall Plus project management models.';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ possède une page d'accueil. Voulez-vous consulter la page d'accueil du produit ?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ possède une page d'accueil. Voulez-vous consulter la page d'accueil du produit ?";
+3
View File
@@ -58,6 +58,8 @@ $lang->custom->executionCommon = '执行';
$lang->custom->selectDefaultProgram = '请选择一个默认项目集';
$lang->custom->defaultProgram = '默认项目集';
$lang->custom->modeManagement = '模式管理';
$lang->custom->percent = $lang->stage->percent;
$lang->custom->setPercent = "是否启用{$lang->stage->percent}";
$lang->custom->unitList['efficiency'] = '工时/';
$lang->custom->unitList['manhour'] = '人时/';
@@ -198,6 +200,7 @@ $lang->custom->notice->storyReviewTip = '按人员、职位、部门勾选
$lang->custom->notice->selectAllTip = '勾选所有人员后,会清空并置灰评审人员,同时隐藏职位、部门。';
$lang->custom->notice->repeatKey = '%s键重复';
$lang->custom->notice->readOnlyOfCode = '代号是一种管理话术,主要便于保密或作为别名存在。启用代号管理后,系统中的产品、项目、执行在创建、编辑、详情、列表等页面均会展示代号信息。';
$lang->custom->notice->readOnlyOfPercent = '工作量占比用于划分项目中存在多个阶段时的工作量的占比,同一级阶段的百分比之和最高为100%。启用工作量占比后,系统中的瀑布项目和融合瀑布项目模型中设置阶段时需要维护阶段的工作量占比。';
$lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";
$lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?";
+42
View File
@@ -0,0 +1,42 @@
<?php
/**
* The percent view file of custom module of ZenTaoPMS.
* @copyright Copyright 2009-2022 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Shujie Tian <tianshujie@cnezsoft.com>
* @package custom
* @version $Id$
* @link https://www.zentao.net
*/
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<form class="load-indicator main-form form-ajax" method='post'>
<table class='table table-form'>
<tr>
<th class='c-setPercent'><?php echo $lang->custom->setPercent;?></th>
<td class='c-percent text-left'>
<?php $checkedKey = isset($config->setPercent) ? $config->setPercent : 0;?>
<?php foreach($lang->custom->conceptOptions->URAndSR as $key => $value):?>
<label class="radio-inline"><input type="radio" name="percent" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="percent<?php echo $key;?>"><?php echo $value;?></label>
<?php endforeach;?>
</td>
<td></td>
</tr>
<tr>
<th></th>
<td colspan="2" id="readOnlyOfPercent">
<div class="inline-block"><i class="icon-exclamation-sign"></i>&nbsp;</div>
<div class="inline-block"><?php echo $lang->custom->notice->readOnlyOfPercent;?></div>
</td>
</tr>
<tr>
<th></th>
<td class='form-actions'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+2
View File
@@ -1444,6 +1444,7 @@ $lang->resource->custom->setDefaultConcept = 'setDefaultConcept';
$lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept';
$lang->resource->custom->kanban = 'kanban';
$lang->resource->custom->code = 'code';
$lang->resource->custom->percent = 'percent';
$lang->custom->methodOrder[5] = 'index';
$lang->custom->methodOrder[10] = 'set';
@@ -1461,6 +1462,7 @@ $lang->custom->methodOrder[65] = 'setDefaultConcept';
$lang->custom->methodOrder[70] = 'deleteStoryConcept';
$lang->custom->methodOrder[75] = 'kanban';
$lang->custom->methodOrder[80] = 'code';
$lang->custom->methodOrder[85] = 'percent';
$lang->resource->datatable = new stdclass();
$lang->resource->datatable->setGlobal = 'setGlobal';