* Finish task #36431.
This commit is contained in:
@@ -470,7 +470,7 @@ class customModel extends model
|
||||
|
||||
/**
|
||||
* Get UR and SR pairs.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -487,7 +487,7 @@ class customModel extends model
|
||||
foreach($langData as $id => $content)
|
||||
{
|
||||
$value = json_decode($content->value);
|
||||
$URSRPairs[$content->key] = $value->URName . '/' . $value->SRName;
|
||||
$URSRPairs[$content->key] = $this->config->URAndSR ? $value->URName . '/' . $value->SRName : $value->SRName;
|
||||
}
|
||||
|
||||
return $URSRPairs;
|
||||
@@ -495,7 +495,7 @@ class customModel extends model
|
||||
|
||||
/**
|
||||
* Get UR pairs.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -504,8 +504,8 @@ class customModel extends model
|
||||
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs();
|
||||
|
||||
$URPairs = array();
|
||||
foreach($URSRList as $key => $value)
|
||||
{
|
||||
foreach($URSRList as $key => $value)
|
||||
{
|
||||
$URSR = json_decode($value);
|
||||
$URPairs[$key] = $URSR->URName;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ class customModel extends model
|
||||
|
||||
/**
|
||||
* Get SR pairs.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -524,8 +524,8 @@ class customModel extends model
|
||||
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs();
|
||||
|
||||
$SRPairs = array();
|
||||
foreach($URSRList as $key => $value)
|
||||
{
|
||||
foreach($URSRList as $key => $value)
|
||||
{
|
||||
$URSR = json_decode($value);
|
||||
$SRPairs[$key] = $URSR->SRName;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ class customModel extends model
|
||||
|
||||
/**
|
||||
* Get UR and SR list.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -656,12 +656,13 @@ class customModel extends model
|
||||
$maxKey = $maxKey ? $maxKey : 1;
|
||||
|
||||
/* If has custom UR and SR name. */
|
||||
foreach($data->URName as $key => $URName)
|
||||
foreach($data->SRName as $key => $SRName)
|
||||
{
|
||||
$SRName = zget($data->SRName, $key, '');
|
||||
if(isset($data->URName)) $URName = zget($data->URName, $key, '');
|
||||
if(!isset($data->URName)) $URName = $this->lang->URCommon;
|
||||
if(!$URName || !$SRName) continue;
|
||||
|
||||
$URSRList = new stdclass();
|
||||
$URSRList = new stdclass();
|
||||
$URSRList->SRName = $SRName;
|
||||
$URSRList->URName = $URName;
|
||||
|
||||
@@ -677,7 +678,7 @@ class customModel extends model
|
||||
/**
|
||||
* Edit UR and SR concept.
|
||||
*
|
||||
* @param int $key
|
||||
* @param int $key
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -688,7 +689,7 @@ class customModel extends model
|
||||
|
||||
if(!$data->SRName || !$data->URName) return false;
|
||||
|
||||
$URSRList = new stdclass();
|
||||
$URSRList = new stdclass();
|
||||
$URSRList->SRName = $data->SRName;
|
||||
$URSRList->URName = $data->URName;
|
||||
|
||||
@@ -699,7 +700,7 @@ class customModel extends model
|
||||
->andWhere('lang')->eq($lang)
|
||||
->andWhere('module')->eq('custom')
|
||||
->exec();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,17 +20,18 @@
|
||||
</div>
|
||||
<table class='table table-form'>
|
||||
<tr class='text-center'>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td class='w-200px'><strong><?php echo $lang->custom->URConcept;?></strong></th>
|
||||
<?php endif;?>
|
||||
<td class='w-200px'><strong><?php echo $lang->custom->SRConcept;?></strong></th>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo html::input('URName', $URSR->URName, "class='form-control'");?></td>
|
||||
<td class="<?php if(!$this->config->URAndSR) echo 'hide'?>"><?php echo html::input('URName', $URSR->URName, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('SRName', $URSR->SRName, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center' colspan='2'><?php echo html::submitButton();?></td>
|
||||
<td class='text-center' colspan='4'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
$itemRow = <<<EOT
|
||||
if($this->config->URAndSR)
|
||||
{
|
||||
$itemRow = <<<EOT
|
||||
<tr>
|
||||
<td><input type='text' class="form-control" autocomplete="off" value="" name="URName[]"></td>
|
||||
<td><input type='text' class="form-control" autocomplete="off" value="" name="SRName[]"></td>
|
||||
@@ -20,6 +22,20 @@ $itemRow = <<<EOT
|
||||
</td>
|
||||
</tr>
|
||||
EOT;
|
||||
}
|
||||
else
|
||||
{
|
||||
$itemRow = <<<EOT
|
||||
<tr>
|
||||
<td><input type='text' class="form-control" autocomplete="off" value="" name="SRName[]"></td>
|
||||
<td class='c-actions'>
|
||||
<a href="javascript:void(0)" class='btn btn-link' onclick="addItem(this)"><i class='icon-plus'></i></a>
|
||||
<a href="javascript:void(0)" class='btn btn-link' onclick="delItem(this)"><i class='icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
EOT;
|
||||
|
||||
}
|
||||
?>
|
||||
<?php js::set('itemRow', $itemRow);?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
@@ -33,20 +49,23 @@ EOT;
|
||||
</div>
|
||||
<table class='table table-form'>
|
||||
<tr class='text-center'>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td class='w-200px'><strong><?php echo $lang->custom->URConcept;?></strong></th>
|
||||
<?php endif;?>
|
||||
<td class='w-200px'><strong><?php echo $lang->custom->SRConcept;?></strong></th>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo html::input('URName[]', '', "class='form-control'");?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo html::input('SRName[]', '', "class='form-control'");?></td>
|
||||
<td class='c-actions'>
|
||||
<a href="javascript:void(0)" class='btn btn-link' onclick="addItem(this)"><i class='icon-plus'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center' colspan='2'><?php echo html::submitButton();?></td>
|
||||
<td class='text-center' colspan='4'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
global $config;
|
||||
|
||||
$lang->my->common = '我的地盘';
|
||||
|
||||
/* 方法列表。*/
|
||||
@@ -28,7 +30,6 @@ $lang->my->manageContacts = '维护联系人';
|
||||
$lang->my->deleteContacts = '删除联系人';
|
||||
$lang->my->shareContacts = '共享联系人列表';
|
||||
$lang->my->limited = '受限操作(只能编辑与自己相关的内容)';
|
||||
$lang->my->storyConcept = '默认需求概念组合';
|
||||
$lang->my->score = '我的积分';
|
||||
$lang->my->scoreRule = '积分规则';
|
||||
$lang->my->noTodo = '暂时没有待办。';
|
||||
@@ -39,6 +40,7 @@ $lang->my->uploadAvatar = '更换头像';
|
||||
$lang->my->requirement = "我的{$lang->URCommon}";
|
||||
$lang->my->testtask = '我的测试单';
|
||||
$lang->my->testcase = '我的用例';
|
||||
$lang->my->storyConcept = $config->URAndSR ? '默认需求概念组合' : '默认需求概念';
|
||||
|
||||
$lang->my->myExecutions = "我参与的阶段/冲刺/迭代";
|
||||
$lang->my->name = '名称';
|
||||
|
||||
@@ -38,7 +38,7 @@ html,body {height: 100%;}
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->my->storyConcept;?></th>
|
||||
<td><?php echo html::select('URSR', $URSRList, $URSR, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->my->programLink;?></th>
|
||||
|
||||
Reference in New Issue
Block a user