* Revert the changed code of task #38644.

This commit is contained in:
hufangzhou
2021-06-05 18:14:44 +08:00
parent e03bc08d00
commit fcf1d669d7
9 changed files with 36 additions and 1 deletions
+13
View File
@@ -420,6 +420,19 @@ class custom extends control
$this->display();
}
/**
* Set story concept.
*
* @param int $key
* @access public
* @return void
*/
public function setDefaultConcept($key = 0)
{
$this->loadModel('setting')->setItem('system.custom.URSR', $key);
die(js::reload('parent'));
}
/**
* Delete story concept.
*
+1
View File
@@ -38,6 +38,7 @@ $lang->custom->waterfallCommon = "Waterfall";
$lang->custom->buildin = "Buildin";
$lang->custom->editStoryConcept = "Edit Story Concept";
$lang->custom->setStoryConcept = "Set Story Concept";
$lang->custom->setDefaultConcept = "Set Default Concept";
$lang->custom->browseStoryConcept = "List of story concepts";
$lang->custom->deleteStoryConcept = "Delete story Concept";
$lang->custom->URConcept = "UR Concept";
+1
View File
@@ -38,6 +38,7 @@ $lang->custom->waterfallCommon = "Waterfall";
$lang->custom->buildin = "Buildin";
$lang->custom->editStoryConcept = "Edit Story Concept";
$lang->custom->setStoryConcept = "Set Story Concept";
$lang->custom->setDefaultConcept = "Set Default Concept";
$lang->custom->browseStoryConcept = "List of story concepts";
$lang->custom->deleteStoryConcept = "Delete story Concept";
$lang->custom->URConcept = "UR Concept";
+1
View File
@@ -38,6 +38,7 @@ $lang->custom->waterfallCommon = "Waterfall";
$lang->custom->buildin = "Buildin";
$lang->custom->editStoryConcept = "Edit Story Concept";
$lang->custom->setStoryConcept = "Set Story Concept";
$lang->custom->setDefaultConcept = "Set Default Concept";
$lang->custom->browseStoryConcept = "List of story concepts";
$lang->custom->deleteStoryConcept = "Delete story Concept";
$lang->custom->URConcept = "UR Concept";
+1
View File
@@ -38,6 +38,7 @@ $lang->custom->waterfallCommon = "Waterfall";
$lang->custom->buildin = "Buildin";
$lang->custom->editStoryConcept = "Edit Story Concept";
$lang->custom->setStoryConcept = "Set Story Concept";
$lang->custom->setDefaultConcept = "Set Default Concept";
$lang->custom->browseStoryConcept = "List of story concepts";
$lang->custom->deleteStoryConcept = "Delete story Concept";
$lang->custom->URConcept = "UR Concept";
+1
View File
@@ -38,6 +38,7 @@ $lang->custom->waterfallCommon = "瀑布";
$lang->custom->buildin = "系统内置";
$lang->custom->editStoryConcept = "编辑需求概念";
$lang->custom->setStoryConcept = "设置需求概念";
$lang->custom->setDefaultConcept = "设置默认概念";
$lang->custom->browseStoryConcept = "需求概念列表";
$lang->custom->deleteStoryConcept = "删除需求概念";
$lang->custom->URConcept = "用需概念";
+1
View File
@@ -38,6 +38,7 @@ $lang->custom->waterfallCommon = "瀑布";
$lang->custom->buildin = "系統內置";
$lang->custom->editStoryConcept = "編輯需求概念";
$lang->custom->setStoryConcept = "設置需求概念";
$lang->custom->setDefaultConcept = "設置預設概念";
$lang->custom->browseStoryConcept = "需求概念列表";
$lang->custom->deleteStoryConcept = "刪除需求概念";
$lang->custom->URConcept = "用需概念";
@@ -23,6 +23,9 @@
<table class='table table-form'>
<thead>
<tr>
<?php if(common::hasPriv('custom', 'setDefaultConcept')):?>
<th class='w-60px text-center'><?php echo $lang->custom->default;?> </th>
<?php endif;?>
<?php if($this->config->URAndSR):?>
<th class='text-left'><?php echo $lang->custom->URConcept;?> </th>
<?php endif;?>
@@ -33,6 +36,9 @@
<tbody>
<?php foreach($URSRList as $key => $URSR):?>
<tr>
<?php if(common::hasPriv('custom', 'setDefaultConcept')):?>
<td class='text-center'><input type="radio" name='default' value='<?php echo $key;?>' <?php if($key == $config->custom->URSR) echo 'checked';?>></td>
<?php endif;?>
<?php if($this->config->URAndSR):?>
<td class='text-left'><?php echo $URSR['URName'];?></td>
<?php endif;?>
@@ -48,4 +54,11 @@
</table>
</div>
</div>
<script>
$("input[name='default']").change(function()
{
var checked = $(this).val();
hiddenwin.location.href = createLink('custom', 'setDefaultConcept', 'key=' + checked);
})
</script>
<?php include '../../common/view/footer.html.php';?>
+4 -1
View File
@@ -1081,6 +1081,7 @@ $lang->resource->custom->timezone = 'timezone';
$lang->resource->custom->setStoryConcept = 'setStoryConcept';
$lang->resource->custom->editStoryConcept = 'editStoryConcept';
$lang->resource->custom->browseStoryConcept = 'browseStoryConcept';
$lang->resource->custom->setDefaultConcept = 'setDefaultConcept';
$lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept';
$lang->custom->methodOrder[5] = 'index';
@@ -1095,7 +1096,8 @@ $lang->custom->methodOrder[45] = 'timezone';
$lang->custom->methodOrder[50] = 'setStoryConcept';
$lang->custom->methodOrder[55] = 'editStoryConcept';
$lang->custom->methodOrder[60] = 'browseStoryConcept';
$lang->custom->methodOrder[65] = 'deleteStoryConcept';
$lang->custom->methodOrder[65] = 'setDefaultConcept';
$lang->custom->methodOrder[70] = 'deleteStoryConcept';
$lang->resource->datatable = new stdclass();
$lang->resource->datatable->setGlobal = 'setGlobal';
@@ -1806,6 +1808,7 @@ $lang->changelog['15.0.rc1'][] = 'user-execution';
$lang->changelog['15.0.rc1'][] = 'custom-setStoryConcept';
$lang->changelog['15.0.rc1'][] = 'custom-editStoryConcept';
$lang->changelog['15.0.rc1'][] = 'custom-browseStoryConcept';
$lang->changelog['15.0.rc1'][] = 'custom-setDefaultConcept';
$lang->changelog['15.0.rc1'][] = 'custom-deleteStoryConcept';
$lang->changelog['15.0.rc1'][] = 'search-index';
$lang->changelog['15.0.rc1'][] = 'search-buildIndex';