* finish task 1993 add config of is story need review
This commit is contained in:
@@ -140,7 +140,7 @@ class admin extends control
|
||||
|
||||
if(!$result) die(js::alert($this->lang->admin->clearDataFailed));
|
||||
|
||||
js::alert($this->lang->admin->clearDataSuccessfully);
|
||||
echo js::alert($this->lang->admin->clearDataSuccessfully);
|
||||
die(js::locate(inLink('index'), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -39,18 +39,25 @@ class custom extends control
|
||||
$fieldList = $this->lang->$module->$field;
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$lang = $_POST['lang'];
|
||||
$this->custom->deleteItems("lang=$lang&module=$module§ion=$field");
|
||||
foreach($_POST['keys'] as $index => $key)
|
||||
if($module == 'story' && $field == 'review')
|
||||
{
|
||||
$value = $_POST['values'][$index];
|
||||
if(!$value or !$key) continue;
|
||||
$system = $_POST['systems'][$index];
|
||||
$this->loadModel('setting')->setItem('system.common.storyReview.needReview', $_POST['needReview']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang = $_POST['lang'];
|
||||
$this->custom->deleteItems("lang=$lang&module=$module§ion=$field");
|
||||
foreach($_POST['keys'] as $index => $key)
|
||||
{
|
||||
$value = $_POST['values'][$index];
|
||||
if(!$value or !$key) continue;
|
||||
$system = $_POST['systems'][$index];
|
||||
|
||||
/* the length of role is 20, check it when save. */
|
||||
if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole));
|
||||
/* the length of role is 20, check it when save. */
|
||||
if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole));
|
||||
|
||||
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
|
||||
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
|
||||
}
|
||||
}
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::reload('parent'));
|
||||
@@ -59,6 +66,7 @@ class custom extends control
|
||||
$this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->$module->common;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->lang->$module->common;
|
||||
$this->view->needReview = isset($this->config->storyReview->needReview) ? $this->config->storyReview->needReview : 1;
|
||||
$this->view->fieldList = $fieldList;
|
||||
$this->view->dbFields = $this->custom->getItems("lang=$currentLang,all&module=$module§ion=$field");
|
||||
$this->view->field = $field;
|
||||
|
||||
@@ -21,6 +21,7 @@ $lang->custom->story->fields['reasonList'] = 'Closed reason';
|
||||
$lang->custom->story->fields['reviewResultList'] = 'Reviewed result';
|
||||
$lang->custom->story->fields['stageList'] = 'Stage';
|
||||
$lang->custom->story->fields['statusList'] = 'Status';
|
||||
$lang->custom->story->fields['review'] = 'Review';
|
||||
|
||||
$lang->custom->task = new stdClass();
|
||||
$lang->custom->task->fields['priList'] = 'Priority';
|
||||
@@ -64,3 +65,7 @@ $lang->custom->confirmRestore = 'Are you sure to restore the default lang settin
|
||||
|
||||
$lang->custom->notice = new stdclass();
|
||||
$lang->custom->notice->userRole = 'The length of key must be less than 20!';
|
||||
|
||||
$lang->custom->storyReview = 'Story review';
|
||||
$lang->custom->reviewList[1] = 'Open';
|
||||
$lang->custom->reviewList[0] = 'Close';
|
||||
|
||||
@@ -21,6 +21,7 @@ $lang->custom->story->fields['reasonList'] = '关闭原因';
|
||||
$lang->custom->story->fields['reviewResultList'] = '评审结果';
|
||||
$lang->custom->story->fields['stageList'] = '阶段';
|
||||
$lang->custom->story->fields['statusList'] = '状态';
|
||||
$lang->custom->story->fields['review'] = '评审';
|
||||
|
||||
$lang->custom->task = new stdClass();
|
||||
$lang->custom->task->fields['priList'] = '优先级';
|
||||
@@ -64,3 +65,7 @@ $lang->custom->confirmRestore = '是否要恢复默认语言配置?';
|
||||
|
||||
$lang->custom->notice = new stdclass();
|
||||
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
|
||||
|
||||
$lang->custom->storyReview = '需求评审';
|
||||
$lang->custom->reviewList[1] = '开启';
|
||||
$lang->custom->reviewList[0] = '关闭';
|
||||
|
||||
@@ -60,6 +60,15 @@ EOT;
|
||||
<div class='panel-heading'>
|
||||
<strong><?php echo $lang->custom->object[$module] . ' >> ' . $lang->custom->$module->fields[$field]?></strong>
|
||||
</div>
|
||||
<?php if($field == 'review'):?>
|
||||
<table class='table table-borderless mw-600px'>
|
||||
<tr>
|
||||
<td><?php echo $lang->custom->storyReview;?></td>
|
||||
<td><?php echo html::radio('needReview', $lang->custom->reviewList, $needReview);?></td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='table table-borderless active-disabled table-condensed mw-600px'>
|
||||
<tr class='text-center'>
|
||||
<th class='w-120px'><?php echo $lang->custom->key;?></th>
|
||||
@@ -92,6 +101,7 @@ EOT;
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -164,6 +164,7 @@ class story extends control
|
||||
$this->view->verify = $verify;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->mailto = $mailto;
|
||||
$this->view->needReview = ($projectID > 0 || (isset($this->config->storyReview->needReview) && $this->config->storyReview->needReview == 0 )) ? "checked='checked'" : "";
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -422,6 +423,7 @@ class story extends control
|
||||
$this->view->title = $this->lang->story->change . "STORY" . $this->lang->colon . $this->view->story->title;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|pofirst', $this->view->story->assignedTo);
|
||||
$this->view->position[] = $this->lang->story->change;
|
||||
$this->view->needReview = (isset($this->config->storyReview->needReview) && $this->config->storyReview->needReview == 0) ? "checked='checked'" : "";
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="input-group w-p35-f">
|
||||
<?php echo html::select('assignedTo', $users, $story->assignedTo, 'class="form-control chosen"');?>
|
||||
<span class="input-group-addon">
|
||||
<?php echo html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'");?>
|
||||
<?php echo html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview' {$needReview}");?>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->story->reviewedBy;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'" . ($projectID > 0 ? " checked='checked'" : ""));?></td>
|
||||
<td><?php echo html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview' {$needReview}");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><nobr><?php echo $lang->story->mailto;?></nobr></th>
|
||||
|
||||
Reference in New Issue
Block a user