From 5dfd9e57e9113114ef85b8658ebcbcf5b388875b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 14 Mar 2016 13:25:45 +0800 Subject: [PATCH] * adjust var name and add notes for custom. --- module/custom/control.php | 3 ++- module/custom/lang/en.php | 2 +- module/custom/lang/zh-cn.php | 2 +- module/custom/view/flow.html.php | 12 +++++++++--- module/custom/view/set.html.php | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index b35cb9d979..ea47ee4264 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -73,6 +73,7 @@ class custom extends control die(js::locate($this->createLink('custom', 'set', "module=$module&field=$field&lang=" . str_replace('-', '_', $lang)), 'parent')); } + /* Check whether the current language has been customized. */ $lang = str_replace('_', '-', $lang); $dbFields = $this->custom->getItems("lang=$lang&module=$module§ion=$field"); if(empty($dbFields)) $dbFields = $this->custom->getItems("lang=" . ($lang == $currentLang ? 'all' : $currentLang) . "&module=$module§ion=$field"); @@ -96,7 +97,7 @@ class custom extends control $this->view->fieldList = $fieldList; $this->view->dbFields = $dbFields; $this->view->field = $field; - $this->view->setLang = str_replace('_', '-', $lang); + $this->view->lang2Set = str_replace('_', '-', $lang); $this->view->module = $module; $this->view->currentLang = $currentLang; $this->view->canAdd = strpos($this->config->custom->canAdd[$module], $field) !== false; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index 0bb539b567..e4a2e44d3f 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -6,7 +6,7 @@ $lang->custom->restore = 'restore'; $lang->custom->key = 'Key'; $lang->custom->value = 'Value'; $lang->custom->flow = 'Flow'; -$lang->custom->select = 'Select:'; +$lang->custom->select = 'Select flow:'; $lang->custom->object['story'] = 'Story'; $lang->custom->object['task'] = 'Task'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 139615f5e3..dcef42aec7 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -6,7 +6,7 @@ $lang->custom->restore = '恢复默认'; $lang->custom->key = '键'; $lang->custom->value = '值'; $lang->custom->flow = '流程'; -$lang->custom->select = '请选择:'; +$lang->custom->select = '请选择流程:'; $lang->custom->object['story'] = '需求'; $lang->custom->object['task'] = '任务'; diff --git a/module/custom/view/flow.html.php b/module/custom/view/flow.html.php index 14b0d9e1c5..029286f9c0 100644 --- a/module/custom/view/flow.html.php +++ b/module/custom/view/flow.html.php @@ -29,11 +29,17 @@
+ + custom->productproject) ? $config->custom->productproject : '0_0' ?> + custom->productproject->relation as $key => $value):?> - - - + + + +
custom->select;?>
custom->select;?>custom->productproject->relation, isset($config->custom->productproject) ? $config->custom->productproject : '0_0');?> + +
custom->productproject->notice?>
diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index 8c68a6df06..5990560b40 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -96,7 +96,7 @@ EOT;
$lang->custom->currentLang, 'all' => $lang->custom->allLang); - echo html::radio('lang', $appliedTo, $setLang); + echo html::radio('lang', $appliedTo, $lang2Set); echo html::submitButton(); if(common::hasPriv('custom', 'restore')) echo html::linkButton($lang->custom->restore, inlink('restore', "module=$module&field=$field"), 'hiddenwin'); ?>