From 658f80ca0b33165c56b679901dc7a429f6091013 Mon Sep 17 00:00:00 2001 From: "shiyangyangwork@yahoo.cn" Date: Sat, 17 Dec 2011 07:04:33 +0000 Subject: [PATCH] + finish the task #640. --- module/common/lang/en.php | 1 + module/common/lang/zh-cn.php | 1 + module/product/config.php | 2 ++ module/product/control.php | 8 +++-- module/product/view/index.html.php | 54 ++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 module/product/view/index.html.php diff --git a/module/common/lang/en.php b/module/common/lang/en.php index e07d61a833..80bb46cbe8 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -140,6 +140,7 @@ $lang->product->menu->edit = 'Edit|product|edit|productID=%s'; $lang->product->menu->module = 'Modules|tree|browse|productID=%s&view=story'; $lang->product->menu->create = array('link' => 'New Product|product|create', 'float' => 'right'); $lang->product->menu->project = array('link' => 'Project list|product|project|status=all&productID=%s', 'float' => 'right'); +$lang->product->menu->all = array('link' => 'All product|product|index|locate=false', 'float' => 'right'); $lang->story->menu = $lang->product->menu; $lang->productplan->menu = $lang->product->menu; $lang->release->menu = $lang->product->menu; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index fafdd0d5dd..c3d913fdbc 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -140,6 +140,7 @@ $lang->product->menu->edit = '编辑|product|edit|productID=%s'; $lang->product->menu->module = '模块|tree|browse|productID=%s&view=story'; $lang->product->menu->create = array('link' => '新增产品|product|create', 'float' => 'right'); $lang->product->menu->project = array('link' => '项目列表|product|project|status=all&productID=%s', 'float' => 'right'); +$lang->product->menu->all = array('link' => '所有产品|product|index|locate=false', 'float' => 'right'); $lang->story->menu = $lang->product->menu; $lang->productplan->menu = $lang->product->menu; $lang->release->menu = $lang->product->menu; diff --git a/module/product/config.php b/module/product/config.php index e3fd3c9e22..01a88fea57 100644 --- a/module/product/config.php +++ b/module/product/config.php @@ -1,4 +1,6 @@ product->productCounts = 50; + global $lang, $app; $app->loadLang('story'); $config->product->search['module'] = 'story'; diff --git a/module/product/control.php b/module/product/control.php index 1679b75714..3798e5ba81 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -41,9 +41,13 @@ class product extends control * @access public * @return void */ - public function index() + public function index($locate = 'yes') { - $this->locate($this->createLink($this->moduleName, 'browse')); + if($locate == 'yes') $this->locate($this->createLink($this->moduleName, 'browse')); + + $this->app->loadLang('my'); + $this->view->productStats = $this->product->getStats($this->config->product->productCounts); + $this->display(); } /** diff --git a/module/product/view/index.html.php b/module/product/view/index.html.php new file mode 100644 index 0000000000..4204890713 --- /dev/null +++ b/module/product/view/index.html.php @@ -0,0 +1,54 @@ + + * @package ZenTaoPMS + * @version $Id$ + */ +?> + + + +
+ + + + + + +
my->home->products;?>
+ createLink('product', 'create'); + printf($lang->my->home->noProductsTip, $productLink); + ?> +
+ + + + + + + + + + + + + + + + + + + + + + +
product->name;?>story->statusList['active'] . $lang->story->common;?>story->statusList['changed'] . $lang->story->common;?>story->statusList['draft'] . $lang->story->common;?>story->statusList['closed'] . $lang->story->common;?>product->plans;?>product->releases;?>
createLink('product', 'view', 'product=' . $product->id), $product->name);?>stories['active']?>stories['changed']?>stories['draft']?>stories['closed']?>plans?>releases?>
+
+ + +