+ finish the task #640.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-12-17 07:04:33 +00:00
parent 185f7d4628
commit 658f80ca0b
5 changed files with 64 additions and 2 deletions
+1
View File
@@ -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;
+1
View File
@@ -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;
+2
View File
@@ -1,4 +1,6 @@
<?php
$config->product->productCounts = 50;
global $lang, $app;
$app->loadLang('story');
$config->product->search['module'] = 'story';
+6 -2
View File
@@ -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();
}
/**
+54
View File
@@ -0,0 +1,54 @@
<?php
/**
* The html template file of index method of index module of ZenTaoPMS.
*
* @copyright Copyright 2009-2011 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Yangyang Shi <shiyangyang@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id$
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/sparkline.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<div class='block' id='productbox'>
<?php if(empty($productStats)):?>
<table class='table-1 a-center' height='100%'>
<caption><?php echo $lang->my->home->products;?></caption>
<tr>
<td valign='middle'>
<?php
$productLink = $this->createLink('product', 'create');
printf($lang->my->home->noProductsTip, $productLink);
?>
</td>
</tr>
</table>
<?php else:?>
<table class='table-1 colored fixed'>
<tr class='colhead'>
<th class='w-150px'><?php echo $lang->product->name;?></th>
<th><?php echo $lang->story->statusList['active'] . $lang->story->common;?></th>
<th><?php echo $lang->story->statusList['changed'] . $lang->story->common;?></th>
<th><?php echo $lang->story->statusList['draft'] . $lang->story->common;?></th>
<th><?php echo $lang->story->statusList['closed'] . $lang->story->common;?></th>
<th><?php echo $lang->product->plans;?></th>
<th><?php echo $lang->product->releases;?></th>
</tr>
<?php foreach($productStats as $product):?>
<tr class='a-center' style='height:30px'>
<td class='a-left'><?php echo html::a($this->createLink('product', 'view', 'product=' . $product->id), $product->name);?></td>
<td><?php echo $product->stories['active']?></td>
<td><?php echo $product->stories['changed']?></td>
<td><?php echo $product->stories['draft']?></td>
<td><?php echo $product->stories['closed']?></td>
<td><?php echo $product->plans?></td>
<td><?php echo $product->releases?></td>
</tr>
<?php endforeach;?>
</table>
</div>
<?php endif;?>
</div>
<?php include '../../common/view/footer.lite.html.php';?>