From 11f95f7a91760bd345ec2f6f86f5e7159c05717f Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Wed, 13 Jan 2010 09:49:47 +0000 Subject: [PATCH] + add the feature of latest action show. --- trunk/module/index/control.php | 3 +- trunk/module/index/lang/zh-cn.php | 1 + trunk/module/index/view/index.html.php | 96 +++++++++++--------------- 3 files changed, 43 insertions(+), 57 deletions(-) diff --git a/trunk/module/index/control.php b/trunk/module/index/control.php index cd45689d4c..85dfa9cd15 100644 --- a/trunk/module/index/control.php +++ b/trunk/module/index/control.php @@ -38,7 +38,6 @@ class index extends control $this->loadModel('report'); $this->view->header->title = $this->lang->index->common; - $products = array_values($this->product->getList()); $burns = array(); $projects = $this->project->getList('doing'); foreach($projects as $project) @@ -49,9 +48,9 @@ class index extends control $projectGroups = array_chunk($projects, 3); $this->view->projectGroups = $projectGroups; - $this->view->products = $products; $this->view->burns = $burns; $this->view->counts = count($projects); + $this->view->actions = $this->dao->select('*')->from(TABLE_ACTION)->orderBy('id desc')->limit(30)->fetchAll(); $this->display(); } diff --git a/trunk/module/index/lang/zh-cn.php b/trunk/module/index/lang/zh-cn.php index 4dccc0bf2b..f77d92532d 100644 --- a/trunk/module/index/lang/zh-cn.php +++ b/trunk/module/index/lang/zh-cn.php @@ -26,3 +26,4 @@ $lang->index->common = '首页'; $lang->index->index = '首页'; $lang->index->ping = '同步session'; +$lang->index->latest = '最新动态'; diff --git a/trunk/module/index/view/index.html.php b/trunk/module/index/view/index.html.php index 788c3d6894..f8285d3f11 100644 --- a/trunk/module/index/view/index.html.php +++ b/trunk/module/index/view/index.html.php @@ -22,62 +22,48 @@ */ ?> -
- -
- $project):?> - -
- - - - - - - - - - - -
createLink('project', 'browse', "projectid=$project->id"), $project->name);?>
project->beginAndEnd;?>begin . ' ~ ' . $project->end;?>
project->status;?>show($lang->project->statusList, $project->status);?>
id];?>
-
- +
+
+
+ +
+ $project):?> + +
+ + + + + + + + + + + +
createLink('project', 'browse', "projectid=$project->id"), $project->name);?>
project->beginAndEnd;?>begin . ' ~ ' . $project->end;?>
project->status;?>show($lang->project->statusList, $project->status);?>
id];?>
+
+ +
+ +
+
+
+
index->latest;?>
+
+ date) . ' ' . $action->actor . ' ' . $action->action . ' ' . $action->objectType . ' ' . html::a($this->createLink($action->objectType, 'view', "id=$action->objectID"), '#' . $action->objectID); + echo "
"; + } + ?> +
-
-