* add a alert when no product.
This commit is contained in:
@@ -36,7 +36,11 @@ class bug extends control
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('task');
|
||||
$this->products = $this->product->getPairs();
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
if(empty($this->products))
|
||||
{
|
||||
echo js::alert($this->lang->product->errorNoProduct);
|
||||
die(js::locate($this->createLink('product', 'create')));
|
||||
}
|
||||
$this->view->products = $this->products;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ $lang->product->ajaxGetPlans = "API: plans of product";
|
||||
$lang->product->errorFormat = 'Error format.';
|
||||
$lang->product->errorEmptyName = 'Name can not be empty.';
|
||||
$lang->product->errorEmptyCode = 'Code can not be empty';
|
||||
$lang->product->errorNoProduct = 'No product in system yet.';
|
||||
$lang->product->accessDenied = 'Access to this product denined.';
|
||||
|
||||
$lang->product->id = 'ID';
|
||||
|
||||
@@ -43,6 +43,7 @@ $lang->product->ajaxGetPlans = "接口:计划列表";
|
||||
$lang->product->errorFormat = '产品数据格式不正确';
|
||||
$lang->product->errorEmptyName = '产品名称不能为空';
|
||||
$lang->product->errorEmptyCode = '产品代号不能为空';
|
||||
$lang->product->errorNoProduct = '还没有创建产品!';
|
||||
$lang->product->accessDenied = '您无权访问该产品';
|
||||
|
||||
$lang->product->id = '编号';
|
||||
|
||||
Reference in New Issue
Block a user