* fix the bug for guest and change the show of dynamic of index
This commit is contained in:
@@ -224,7 +224,7 @@ class actionModel extends model
|
||||
|
||||
if(!$actions) return array();
|
||||
|
||||
/* Group trashes by objectType, and get there name field. */
|
||||
/* Group actions by objectType, and get there name field. */
|
||||
foreach($actions as $object) $objectTypes[$object->objectType][] = $object->objectID;
|
||||
foreach($objectTypes as $objectType => $objectIds)
|
||||
{
|
||||
@@ -234,9 +234,11 @@ class actionModel extends model
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
|
||||
}
|
||||
|
||||
$objectNames['user'][0] = 'guest'; // Add guest account.
|
||||
|
||||
foreach($actions as $action)
|
||||
{
|
||||
/* Add name field to the trashes. */
|
||||
/* Add name field to the actions. */
|
||||
$action->objectName = $objectNames[$action->objectType][$action->objectID];
|
||||
|
||||
$actionType = strtolower($action->action);
|
||||
|
||||
@@ -31,4 +31,3 @@ $lang->index->myBug = 'My Bug';
|
||||
$lang->index->firstUsingTip = "The first time to use zentao? See our <a href='http://www.zentao.net/help-read-79236.html' target='_blank'>help document</a> first.
|
||||
or start using zentao by <a href='%s'>createing a product</a> or <a href='%s'>createing a project</a>。";
|
||||
$lang->index->noProjectsTip = "目前还没有进行中的项目,<a href='%s'>马上创建一个项目吧</a>,或者修改已有的项目,将其状态改为<i class='strong'>进行中</i>";
|
||||
$lang->index->dynamicTip = "<a href='%s'>view the dynamic of team</a>";
|
||||
|
||||
@@ -31,4 +31,3 @@ $lang->index->myBug = '我的Bug';
|
||||
$lang->index->firstUsingTip = "看起来您是刚刚开始使用禅道,您可以先看看我们的<a href='http://www.zentao.net/help-read-79236.html' target='_blank'>帮助文档</a>,
|
||||
或者马上开始:<a href='%s'>创建产品</a>,<a href='%s'>创建项目</a>。";
|
||||
$lang->index->noProjectsTip = "目前还没有进行中的项目,<a href='%s'>马上创建一个项目吧</a>,或者修改已有的项目,将其状态改为<i class='strong'>进行中</i>";
|
||||
$lang->index->dynamicTip = "<a href='%s'>查看团队的最新动态</a>";
|
||||
|
||||
@@ -136,23 +136,22 @@
|
||||
<td class='side'>
|
||||
<table class='table-1 colored'>
|
||||
<caption><?php echo $lang->index->latest;?></caption>
|
||||
<tr>
|
||||
<td class='a-left f-14px'>
|
||||
<?php
|
||||
$dynamicLink = $this->createLink('company','dynamic');
|
||||
printf($lang->index->dynamicTip,$dynamicLink);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($actions as $action)
|
||||
<?php
|
||||
foreach($actions as $action)
|
||||
{
|
||||
$user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
|
||||
echo "<tr><td>";
|
||||
printf($lang->index->action, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink);
|
||||
echo "</td></tr>";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<td class='a-right f-14px'>
|
||||
<?php
|
||||
common::printLink('company', 'dynamic', '', $lang->more);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user