* Merge code.

This commit is contained in:
Yagami
2020-11-24 14:46:19 +08:00
parent 9c59c495ee
commit 97ac6f0b9c
11 changed files with 218 additions and 62 deletions
+6 -2
View File
@@ -400,6 +400,7 @@ class custom extends control
*/
public function configureWaterfall($type = 'concept')
{
$this->app->loadLang('custom');
$this->lang->custom->menu = new stdclass();
$this->lang->navGroup->custom = 'system';
@@ -407,7 +408,8 @@ class custom extends control
{
if($type == 'concept')
{
$this->custom->setURAndSR();
$result = $this->custom->setURAndSR();
if(!$result) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->URSREmpty));
}
if($type == 'user' and isset($_POST['keys']))
@@ -486,6 +488,7 @@ class custom extends control
*/
public function configureScrum($type = 'concept')
{
$this->app->loadLang('custom');
$this->lang->custom->menu = new stdclass();
$this->lang->navGroup->custom = 'system';
@@ -494,7 +497,8 @@ class custom extends control
if($type == 'concept')
{
$this->custom->setConcept();
$this->custom->setURAndSR();
$result = $this->custom->setURAndSR();
if(!$result) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->URSREmpty));
}
if($type == 'user' && isset($_POST['keys']))
+12 -1
View File
@@ -11,5 +11,16 @@ $(function()
$('#URSRName').removeClass('hidden');
}
});
})
$('[name^="URSRCustom"]').change(function()
{
if($(this).attr('checked'))
{
$('#customURSR').removeClass('hidden');
}
else
{
$('#customURSR').addClass('hidden');
}
})
})
+12
View File
@@ -11,5 +11,17 @@ $(function()
$('#URSRName').removeClass('hidden');
}
});
$('[name^="URSRCustom"]').change(function()
{
if($(this).attr('checked'))
{
$('#customURSR').removeClass('hidden');
}
else
{
$('#customURSR').addClass('hidden');
}
})
})
+23 -3
View File
@@ -154,6 +154,7 @@ $lang->custom->notice->conceptResult = 'According to your preference, <b> %s
$lang->custom->notice->conceptPath = 'Go to Admin -> Custom -> Concept to set it.';
$lang->custom->notice->readOnlyOfProduct = 'If Change Forbidden, any change on stories, bugs, cases, efforts, releases and plans of the closed product is also forbidden.';
$lang->custom->notice->readOnlyOfProject = 'If Change Forbidden, any change on tasks, builds, efforts and stories of the closed project is also forbidden.';
$lang->custom->notice->URSREmpty = 'Custom requirement name can not be empty!';
$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?";
@@ -221,11 +222,30 @@ $lang->custom->conceptOptions->hourPoint['2'] = 'Code Line';
$lang->custom->waterfall = new stdclass();
$lang->custom->waterfall->URAndSR = 'Are requirements and stories concepts enabled?';
$lang->custom->waterfall->URSRName = 'A conceptual definition of requirements and stories?';
$lang->custom->waterfall->URSRName = 'Combination of default requirements concepts';
$lang->custom->scrum = new stdclass();
$lang->custom->scrum->URAndSR = 'Is it going to be epic?';
$lang->custom->scrum->URSRName = 'A conceptual definition of requirements?';
$lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->scrum->URAndSR = 'Are epic concept enabled?';
$lang->custom->scrum->URSRName = 'A conceptual definition of epic?';
$lang->custom->URList[1] = 'User Requirement';
$lang->custom->URList[2] = 'UR';
$lang->custom->URList[3] = 'Requirement';
$lang->custom->URList[4] = 'Epic';
$lang->custom->SRList[1] = 'Software Requirement';
$lang->custom->SRList[2] = 'SR';
$lang->custom->SRList[3] = 'Story';
$lang->custom->SRList[4] = 'Story';
$lang->custom->URSRList[1] = 'User Requirement/Software Requirement';
$lang->custom->URSRList[2] = 'UR/SR';
$lang->custom->URSRList[3] = 'Requirement/Story';
$lang->custom->URSRList[4] = 'Epic/Story';
$lang->custom->URTips = 'Type like:Requirement';
$lang->custom->SRTips = 'Type like:Story';
$lang->custom->waterfallOptions = new stdclass();
$lang->custom->waterfallOptions->URAndSR = array();
+26 -6
View File
@@ -154,6 +154,7 @@ $lang->custom->notice->conceptResult = 'According to your preference, <b> %s
$lang->custom->notice->conceptPath = 'Go to Admin -> Custom -> Concept to set it.';
$lang->custom->notice->readOnlyOfProduct = 'If Change Forbidden, any change on stories, bugs, cases, efforts, releases and plans of the closed product is also forbidden.';
$lang->custom->notice->readOnlyOfProject = 'If Change Forbidden, any change on tasks, builds, efforts and stories of the closed project is also forbidden.';
$lang->custom->notice->URSREmpty = 'Custom requirement name can not be empty!';
$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?";
@@ -205,8 +206,8 @@ $lang->custom->moduleName['project'] = $lang->projectCommon;
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['story'] = "2. Do you use the concept of requirement or user story in your company?";
$lang->custom->conceptQuestions['requirementpoint'] = "2. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "2. Do you use hours or story points to make estimations in your company?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "3. Do you use hours or story points to make estimations in your company?";
$lang->custom->conceptOptions = new stdclass;
@@ -220,12 +221,31 @@ $lang->custom->conceptOptions->hourPoint['1'] = 'Function Ponit';
$lang->custom->conceptOptions->hourPoint['2'] = 'Code Line';
$lang->custom->waterfall = new stdclass();
$lang->custom->waterfall->URAndSR = 'Are requirements and stories concepts enabled?';
$lang->custom->waterfall->URSRName = 'A conceptual definition of requirements and stories?';
$lang->custom->waterfall->URAndSR = 'Are requirements and stories concepts enabled';
$lang->custom->waterfall->URSRName = 'Combination of default requirements concepts';
$lang->custom->scrum = new stdclass();
$lang->custom->scrum->URAndSR = 'Are epic concept enabled?';
$lang->custom->scrum->URSRName = 'A conceptual definition of epic?';
$lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->scrum->URAndSR = 'Are epic concept enabled?';
$lang->custom->scrum->URSRName = 'A conceptual definition of epic?';
$lang->custom->URList[1] = 'User Requirement';
$lang->custom->URList[2] = 'UR';
$lang->custom->URList[3] = 'Requirement';
$lang->custom->URList[4] = 'Epic';
$lang->custom->SRList[1] = 'Software Requirement';
$lang->custom->SRList[2] = 'SR';
$lang->custom->SRList[3] = 'Story';
$lang->custom->SRList[4] = 'Story';
$lang->custom->URSRList[1] = 'User Requirement/Software Requirement';
$lang->custom->URSRList[2] = 'UR/SR';
$lang->custom->URSRList[3] = 'Requirement/Story';
$lang->custom->URSRList[4] = 'Epic/Story';
$lang->custom->URTips = 'Type like:Requirement';
$lang->custom->SRTips = 'Type like:Story';
$lang->custom->waterfallOptions = new stdclass();
$lang->custom->waterfallOptions->URAndSR = array();
+22 -2
View File
@@ -154,6 +154,7 @@ $lang->custom->notice->conceptResult = 'Selon votre préférence, <b> %s-%s
$lang->custom->notice->conceptPath = 'Allez à Admin -> Custom -> Concept pour le paramétrer.';
$lang->custom->notice->readOnlyOfProduct = 'If Change Forbidden, any change on stories, bugs, cases, efforts, releases and plans of the closed product is also forbidden.';
$lang->custom->notice->readOnlyOfProject = 'If Change Forbidden, any change on tasks, builds, efforts and stories of the closed project is also forbidden.';
$lang->custom->notice->URSREmpty = 'Custom requirement name can not be empty!';
$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 ?";
@@ -224,8 +225,27 @@ $lang->custom->waterfall->URAndSR = 'Are requirements and stories concepts enab
$lang->custom->waterfall->URSRName = 'A conceptual definition of requirements and stories?';
$lang->custom->scrum = new stdclass();
$lang->custom->scrum->URAndSR = 'Is it going to be epic?';
$lang->custom->scrum->URSRName = 'A conceptual definition of requirements?';
$lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->scrum->URAndSR = 'Is it going to be epic?';
$lang->custom->scrum->URSRName = 'A conceptual definition of requirements?';
$lang->custom->URList[1] = 'User Requirement';
$lang->custom->URList[2] = 'UR';
$lang->custom->URList[3] = 'Requirement';
$lang->custom->URList[4] = 'Epic';
$lang->custom->SRList[1] = 'Software Requirement';
$lang->custom->SRList[2] = 'SR';
$lang->custom->SRList[3] = 'Story';
$lang->custom->SRList[4] = 'Story';
$lang->custom->URSRList[1] = 'User Requirement/Software Requirement';
$lang->custom->URSRList[2] = 'UR/SR';
$lang->custom->URSRList[3] = 'Requirement/Story';
$lang->custom->URSRList[4] = 'Epic/Story';
$lang->custom->URTips = 'Type like:Requirement';
$lang->custom->SRTips = 'Type like:Story';
$lang->custom->waterfallOptions = new stdclass();
$lang->custom->waterfallOptions->URAndSR = array();
+20
View File
@@ -154,6 +154,7 @@ $lang->custom->notice->conceptResult = 'According to your preference, <b> %s
$lang->custom->notice->conceptPath = 'Vào Quản trị -> Tùy biến -> Mô hình để thiết lập nó.';
$lang->custom->notice->readOnlyOfProduct = 'If Change Forbidden, any change on stories, bugs, cases, efforts, releases and plans of the closed product is also forbidden.';
$lang->custom->notice->readOnlyOfProject = 'If Change Forbidden, any change on tasks, builds, efforts and stories of the closed project is also forbidden.';
$lang->custom->notice->URSREmpty = 'Custom requirement name can not be empty!';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ đã có trang Sản phẩm. Bạn có muốn tới trang Sản phẩm?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Home. Bạn có muốn go to Project Home?";
@@ -224,9 +225,28 @@ $lang->custom->waterfall->URAndSR = 'Are requirements and stories concepts enab
$lang->custom->waterfall->URSRName = 'A conceptual definition of requirements and stories?';
$lang->custom->scrum = new stdclass();
$lang->custom->scrum->setConcept = 'Set concept';
$lang->custom->scrum->URAndSR = 'Is it going to be epic?';
$lang->custom->scrum->URSRName = 'A conceptual definition of requirements?';
$lang->custom->URList[1] = 'User Requirement';
$lang->custom->URList[2] = 'UR';
$lang->custom->URList[3] = 'Requirement';
$lang->custom->URList[4] = 'Epic';
$lang->custom->SRList[1] = 'Software Requirement';
$lang->custom->SRList[2] = 'SR';
$lang->custom->SRList[3] = 'Story';
$lang->custom->SRList[4] = 'Story';
$lang->custom->URSRList[1] = 'User Requirement/Software Requirement';
$lang->custom->URSRList[2] = 'UR/SR';
$lang->custom->URSRList[3] = 'Requirement/Story';
$lang->custom->URSRList[4] = 'Epic/Story';
$lang->custom->URTips = 'Type like:Requirement';
$lang->custom->SRTips = 'Type like:Story';
$lang->custom->waterfallOptions = new stdclass();
$lang->custom->waterfallOptions->URAndSR = array();
$lang->custom->waterfallOptions->URAndSR[0] = 'No';
+24 -4
View File
@@ -154,6 +154,7 @@ $lang->custom->notice->conceptResult = '我们已经根据您的
$lang->custom->notice->conceptPath = '您可以在:后台 -> 自定义 -> 流程页面修改。';
$lang->custom->notice->readOnlyOfProduct = '禁止修改后,已关闭' . $lang->productCommon . '下的' . $lang->storyCommon . '、Bug、用例、日志、发布、计划都禁止修改。';
$lang->custom->notice->readOnlyOfProject = '禁止修改后,已关闭' . $lang->projectCommon . '下的任务、版本、日志以及关联需求都禁止修改。';
$lang->custom->notice->URSREmpty = '自定义需求名称不能为空!';
$lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";
$lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?";
@@ -220,12 +221,31 @@ $lang->custom->conceptOptions->hourPoint['1'] = '功能点';
$lang->custom->conceptOptions->hourPoint['2'] = '代码行';
$lang->custom->waterfall = new stdclass();
$lang->custom->waterfall->URAndSR = '是否启用用户需求概念?';
$lang->custom->waterfall->URSRName = '用户需求和软件需求的概念定义?';
$lang->custom->waterfall->URAndSR = '是否启用用户需求概念';
$lang->custom->waterfall->URSRName = '默认需求概念组合';
$lang->custom->scrum = new stdclass();
$lang->custom->scrum->URAndSR = '是否启用epic概念?';
$lang->custom->scrum->URSRName = '需求的概念定义?';
$lang->custom->scrum->setConcept = '设置项目概念';
$lang->custom->scrum->URAndSR = '是否启用epic概念?';
$lang->custom->scrum->URSRName = '需求的概念定义?';
$lang->custom->URList[1] = '用户需求';
$lang->custom->URList[2] = '用需';
$lang->custom->URList[3] = '需求';
$lang->custom->URList[4] = '史诗';
$lang->custom->SRList[1] = '软件需求';
$lang->custom->SRList[2] = '软需';
$lang->custom->SRList[3] = '故事';
$lang->custom->SRList[4] = '故事';
$lang->custom->URSRList[1] = '用户需求/软件需求';
$lang->custom->URSRList[2] = '用需/软需';
$lang->custom->URSRList[3] = '需求/故事';
$lang->custom->URSRList[4] = '史诗/故事';
$lang->custom->URTips = '请输入如:用户需求';
$lang->custom->SRTips = '请输入如:软件需求';
$lang->custom->waterfallOptions = new stdclass();
$lang->custom->waterfallOptions->URAndSR = array();
+27 -5
View File
@@ -587,16 +587,38 @@ class customModel extends model
public function setURAndSR()
{
$data = fixer::input('post')->get();
$lang = $this->app->getClientLang();
$this->loadModel('setting')->setItem("system.custom.URAndSR", $data->URAndSR);
if($data->URAndSR)
{
$clientLang = $this->app->getClientLang();
$URSRName = isset($this->config->custom->URSRName) ? json_decode($this->config->custom->URSRName, true) : array();
$URSRName['URCommon'][$clientLang] = $data->URCommon[$clientLang];
$URSRName['SRCommon'][$clientLang] = $data->SRCommon[$clientLang];
$this->setting->setItem("system.custom.common.URSRName", json_encode($URSRName));
/* If has custom UR and SR name. */
$newKey = '';
if(isset($data->URSRCustom))
{
if(!$data->URName || !$data->SRName) return false;
$newKey = max(array_keys($this->lang->custom->URSRList)) + 1;
$URSRName = $data->URName . '/' . $data->SRName;
/* Delete old lang data, and add new. */
$this->lang->custom->URSRList[$newKey] = $URSRName;
$this->lang->custom->URList[$newKey] = $data->URName;
$this->lang->custom->SRList[$newKey] = $data->SRName;
$this->deleteItems("lang=$lang&module=custom&section=URSRList");
$this->deleteItems("lang=$lang&module=custom&section=URList");
$this->deleteItems("lang=$lang&module=custom&section=SRList");
foreach($this->lang->custom->URSRList as $key => $value) $this->setItem("$lang.custom.URSRList.{$key}.1", $value);
foreach($this->lang->custom->URList as $key => $value) $this->setItem("$lang.custom.URList.{$key}.1", $value);
foreach($this->lang->custom->SRList as $key => $value) $this->setItem("$lang.custom.SRList.{$key}.1", $value);
}
$URSRName = $newKey ? $newKey : $data->URSRCommon;
$this->setting->setItem("system.custom.URSRName", $URSRName);
}
return true;
}
/**
+25 -22
View File
@@ -39,28 +39,31 @@ EOT;
<form id='ajaxForm' class='form-ajax' method='post'>
<div class='modal-body'>
<?php if($type == 'concept'):?>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['overview']?></label>
<div class="checkbox"> <?php echo html::radio('productProject', $lang->custom->productProject->relation, zget($this->config->custom, 'productProject', '0_0'))?> </div>
</div>
<div class='form-group'>
<label><?php echo '2. ' . $lang->custom->scrum->URAndSR;?></label>
<div class='checkbox'><?php echo html::radio('URAndSR', $lang->custom->waterfallOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
</div>
<?php $hidden = zget($this->config->custom, 'URAndSR', 0) == 0 ? 'hidden' : '';?>
<div class="form-group <?php echo $hidden;?>" id='URSRName'><label><?php echo '3. ' . $lang->custom->scrum->URSRName;?></label>
<div class='input-group'>
<?php
echo html::input("URCommon[{$clientLang}]", isset($URSRName->URCommon->$clientLang) ? $URSRName->URCommon->$clientLang : $lang->custom->URStory, "class='form-control'");
?>
<span class='input-group-addon'></span>
<?php echo html::input("SRCommon[{$clientLang}]", isset($URSRName->SRCommon->$clientLang) ? $URSRName->SRCommon->$clientLang : $lang->custom->SRStory, "class='form-control'");?>
</div>
</div>
<div class="form-group">
<label></label>
<div><?php echo html::submitButton();?></div>
</div>
<table class='table table-form'>
<tr>
<th class='w-160px'><?php echo $lang->custom->scrum->setConcept;?> </th>
<td><?php echo html::radio('productProject', $lang->custom->productProject->relation, zget($this->config->custom, 'productProject', '0_0'))?></td>
<td></td><td></td><td></td><td></td>
</tr>
<tr>
<th> <?php echo $lang->custom->waterfall->URAndSR;?> </th>
<td> <?php echo html::radio('URAndSR', $lang->custom->waterfallOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?> </td>
</tr>
<?php $hidden = zget($this->config->custom, 'URAndSR', 0) == 0 ? 'hidden' : '';?>
<tr class="<?php echo $hidden;?>" id='URSRName'>
<th><?php echo $lang->custom->waterfall->URSRName;?></th>
<td><?php echo html::select('URSRCommon', $lang->custom->URSRList, zget($config->custom, 'URSRName', 1), "class='form-control chosen'");?></td>
<td><?php echo html::checkbox('URSRCustom', $lang->custom->common, "class='form-control'");?></td>
</tr>
<tr class='hidden' id='customURSR'>
<th></th>
<td><?php echo html::input('URName', '', "class='form-control' placeholder={$lang->custom->URTips}");?></td>
<td><?php echo html::input('SRName', '', "class='form-control' placeholder={$lang->custom->SRTips}");?></td>
</tr>
<tr>
<td class='text-right'><?php echo html::submitButton();?></td>
</tr>
</table>
<?php endif;?>
<?php if($type == 'user'):?>
<table class='table table-form active-disabled table-condensed mw-600px'>
+21 -17
View File
@@ -40,23 +40,27 @@ EOT;
<form class="load-indicator main-form form-ajax" method='post'>
<div class='modal-body'>
<?php if($type == 'concept'):?>
<div class='form-group'>
<label><?php echo '1. ' . $lang->custom->waterfall->URAndSR;?></label>
<div class='checkbox'><?php echo html::radio('URAndSR', $lang->custom->waterfallOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
</div>
<?php $hidden = zget($this->config->custom, 'URAndSR', 0) == 0 ? 'hidden' : '';?>
<div class="form-group <?php echo $hidden;?>" id='URSRName'><label><?php echo '2. ' . $lang->custom->waterfall->URSRName;?></label>
<div class='input-group'>
<?php
echo html::input("URCommon[{$clientLang}]", isset($URSRName->URCommon->$clientLang) ? $URSRName->URCommon->$clientLang : $lang->custom->URStory, "class='form-control'");
?>
<span class='input-group-addon'></span>
<?php echo html::input("SRCommon[{$clientLang}]", isset($URSRName->SRCommon->$clientLang) ? $URSRName->SRCommon->$clientLang : $lang->custom->SRStory, "class='form-control'");?>
</div>
</div>
<div class='form-group'>
<div><?php echo html::submitButton();?></div>
</div>
<table class='table table-form'>
<tr>
<th class='w-160px'> <?php echo $lang->custom->waterfall->URAndSR;?> </th>
<td> <?php echo html::radio('URAndSR', $lang->custom->waterfallOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?> </td>
<td></td><td></td><td></td><td></td>
</tr>
<?php $hidden = zget($this->config->custom, 'URAndSR', 0) == 0 ? 'hidden' : '';?>
<tr class="<?php echo $hidden;?>" id='URSRName'>
<th><?php echo $lang->custom->waterfall->URSRName;?></th>
<td><?php echo html::select('URSRCommon', $lang->custom->URSRList, zget($config->custom, 'URSRName', 1), "class='form-control chosen'");?></td>
<td><?php echo html::checkbox('URSRCustom', $lang->custom->common, "class='form-control'");?></td>
</tr>
<tr class='hidden' id='customURSR'>
<th></th>
<td><?php echo html::input('URName', '', "class='form-control' placeholder={$lang->custom->URTips}");?></td>
<td><?php echo html::input('SRName', '', "class='form-control' placeholder={$lang->custom->SRTips}");?></td>
</tr>
<tr>
<td class='text-right'><?php echo html::submitButton();?></td>
</tr>
</table>
<?php endif;?>
<?php if($type == 'user'):?>
<table class='table table-form active-disabled table-condensed mw-600px'>