This commit is contained in:
wangyidong
2015-01-29 11:23:50 +08:00
parent f2383ba306
commit bb80d4b4ae
5 changed files with 46 additions and 15 deletions
+38 -7
View File
@@ -197,6 +197,14 @@ class actionModel extends model
->orderBy('date, id')->fetchAll('id');
$histories = $this->getHistory(array_keys($actions));
$this->loadModel('file');
if($objectType == 'project')
{
$this->app->loadLang('build');
$this->app->loadLang('testtask');
$actions = $this->processProjectActions($actions);
}
foreach($actions as $actionID => $action)
{
$actionName = strtolower($action->action);
@@ -227,18 +235,41 @@ class actionModel extends model
{
$action->extra = html::a(helper::createLink('bug', 'view', "bugID=$action->extra"), $action->extra);
}
elseif($actionName == 'unlinkedfromproject')
{
$name = $this->dao->select('name')->from(TABLE_PRODUCT)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('product', 'browse', "productID=$action->extra"), "#$action->extra " . $name);
}
elseif($actionName == 'unlinkedfromplan')
{
$title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title');
if($title) $action->extra = html::a(helper::createLink('productplan', 'view', "planID=$action->extra"), "#$action->extra " . $title);
}
elseif($actionName == 'tostory')
{
$title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title');
if($title) $action->extra = html::a(helper::createLink('story', 'view', "storyID=$action->extra"), "#$action->extra " . $title);
}
elseif($actionName == 'totask')
{
$name = $this->dao->select('name')->from(TABLE_TASK)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('task', 'view', "taskID=$action->extra"), "#$action->extra " . $name);
}
elseif($actionName == 'buildopened')
{
$name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->objectID)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('build', 'view', "buildID=$action->objectID"), "#$action->objectID " . $name);
}
elseif($actionName == 'testtaskopened' or $actionName == 'testtaskstarted' or $actionName == 'testtaskclosed')
{
$name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->objectID)->fetch('name');
if($name) $action->extra = html::a(helper::createLink('testtask', 'view', "testtaskID=$action->objectID"), "#$action->objectID " . $name);
}
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
$action->comment = $this->file->setImgSize($action->comment, $this->config->action->commonImgSize);
$actions[$actionID] = $action;
}
if($objectType == 'project')
{
$this->app->loadLang('build');
$this->app->loadLang('testtask');
return $this->processProjectActions($actions);
}
return $actions;
}
+1 -1
View File
@@ -57,4 +57,4 @@ $lang->build->placeholder->scmPath = 'Software source code repository, such as
$lang->build->placeholder->filePath = 'The path of this build package to download';
$lang->build->action = new stdclass();
$lang->build->action->buildopened = '$date, <strong>$actor</strong> created build. <strong>$objectID</strong>。' . "\n";
$lang->build->action->buildopened = '$date, <strong>$actor</strong> created build. <strong>$extra</strong>。' . "\n";
+1 -1
View File
@@ -57,4 +57,4 @@ $lang->build->placeholder->scmPath = ' 软件源代码库,如Subversion、Git
$lang->build->placeholder->filePath = ' 该版本软件包下载存储地址';
$lang->build->action = new stdclass();
$lang->build->action->buildopened = '$date, 由 <strong>$actor</strong> 创建版本 <strong>$objectID</strong>。' . "\n";
$lang->build->action->buildopened = '$date, 由 <strong>$actor</strong> 创建版本 <strong>$extra</strong>。' . "\n";
+3 -3
View File
@@ -105,6 +105,6 @@ $lang->testtask->mail->edit->title = "%s finished testtask #%s:%s";
$lang->testtask->testScope = 'Test scope';
$lang->testtask->action = new stdclass();
$lang->testtask->action->testtaskopened = '$date, 由 <strong>$actor</strong> opened test task. <strong>$objectID</strong>。' . "\n";
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> started test task. <strong>$objectID</strong>。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> finished test task. <strong>$objectID</strong>。' . "\n";
$lang->testtask->action->testtaskopened = '$date, 由 <strong>$actor</strong> opened test task. <strong>$extra</strong>。' . "\n";
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> started test task. <strong>$extra</strong>。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> finished test task. <strong>$extra</strong>。' . "\n";
+3 -3
View File
@@ -105,6 +105,6 @@ $lang->testtask->mail->edit->title = "%s编辑了版本 #%s:%s";
$lang->testtask->testScope = '测试范畴';
$lang->testtask->action = new stdclass();
$lang->testtask->action->testtaskopened = '$date, 由 <strong>$actor</strong> 创建版本 <strong>$objectID</strong>。' . "\n";
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> 启动版本 <strong>$objectID</strong>。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> 完成版本 <strong>$objectID</strong>。' . "\n";
$lang->testtask->action->testtaskopened = '$date, 由 <strong>$actor</strong> 创建版本 <strong>$extra</strong>。' . "\n";
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> 启动版本 <strong>$extra</strong>。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> 完成版本 <strong>$extra</strong>。' . "\n";