diff --git a/module/common/lang/en.php b/module/common/lang/en.php index f888e9ea3c..04ad7ed9f5 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -139,6 +139,7 @@ $lang->product->menu->view = 'Info|product|view|productID=%s'; $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->project->menu->project = array('link' => 'Project list|product|index|locate=false&status=all&productID=%s', '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 3683f19938..e34c876f15 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -139,6 +139,7 @@ $lang->product->menu->view = '概况|product|view|productID=%s'; $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|index|locate=false&status=all&productID=%s', '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/control.php b/module/product/control.php index 66ff10992f..8edd23dfda 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -41,9 +41,15 @@ class product extends control * @access public * @return void */ - public function index() + public function index($locate = 'yes', $status = 'undone', $productID) { - $this->locate($this->createLink($this->moduleName, 'browse')); + if($locate == 'yes') $this->locate($this->createLink($this->moduleName, 'browse')); + + $this->app->loadLang('my'); + $this->view->projectStats = $this->loadModel('project')->getProjectStats($this->config->project->projectCounts, $status, $productID); + + $this->view->productID = $productID; + $this->display(); } /** diff --git a/module/product/js/index.js b/module/product/js/index.js new file mode 100644 index 0000000000..742a3b7329 --- /dev/null +++ b/module/product/js/index.js @@ -0,0 +1,7 @@ +$().ready(function() +{ + $('.projectline').each(function() + { + $(this).sparkline('html', {height:'25px'}); + }) +}) diff --git a/module/product/view/index.html.php b/module/product/view/index.html.php new file mode 100644 index 0000000000..4336e81df3 --- /dev/null +++ b/module/product/view/index.html.php @@ -0,0 +1,48 @@ + + * @package ZenTaoPMS + * @version $Id: index.html.php 2343 2011-11-21 05:24:56Z wwccss $ + */ +?> + + + +
| project->name;?> | +project->code;?> | +project->end;?> | +project->status;?> | +project->totalEstimate;?> | +project->totalConsumed;?> | +project->totalLeft;?> | +project->progess;?> | +project->burn;?> | +
|---|---|---|---|---|---|---|---|---|
| createLink('project', 'task', 'project=' . $project->id), $project->name, '_parent');?> | +code;?> | +end;?> | +project->statusList[$project->status];?> | +hours->totalEstimate;?> | +hours->totalConsumed;?> | +hours->totalLeft;?> | +
+ hours->progress;?> height='13' text-align: />
+ hours->progress;?>%
+ |
+ burns);?>'> | +