* add a alert when no product.

This commit is contained in:
wangchunsheng
2010-09-11 07:06:40 +00:00
parent 66832034b8
commit 131e2fe157
3 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -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;
}
+1
View File
@@ -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';
+1
View File
@@ -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 = '编号';