* Finish task #9048.
This commit is contained in:
@@ -197,6 +197,8 @@ $lang->action->label->changestatus = '修改状态';
|
||||
$lang->action->label->marked = '编辑了';
|
||||
$lang->action->label->linked2project = "关联{$lang->executionCommon}";
|
||||
$lang->action->label->unlinkedfromproject = "移除{$lang->executionCommon}";
|
||||
$lang->action->label->linked2prj = "关联项目";
|
||||
$lang->action->label->unlinkedfromprj = "移除项目";
|
||||
$lang->action->label->unlinkedfrombuild = "移除版本";
|
||||
$lang->action->label->linked2release = "关联发布";
|
||||
$lang->action->label->unlinkedfromrelease = "移除发布";
|
||||
@@ -492,6 +494,8 @@ $lang->action->search->label['changestatus'] = $lang->action->label->chan
|
||||
$lang->action->search->label['marked'] = $lang->action->label->marked;
|
||||
$lang->action->search->label['linked2project'] = $lang->action->label->linked2project;
|
||||
$lang->action->search->label['unlinkedfromproject'] = $lang->action->label->unlinkedfromproject;
|
||||
$lang->action->search->label['linked2prj'] = $lang->action->label->linked2prj;
|
||||
$lang->action->search->label['unlinkedfromprj'] = $lang->action->label->unlinkedfromprj;
|
||||
$lang->action->search->label['started'] = $lang->action->label->started;
|
||||
$lang->action->search->label['restarted'] = $lang->action->label->restarted;
|
||||
$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate;
|
||||
|
||||
@@ -243,6 +243,12 @@ class actionModel extends model
|
||||
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
|
||||
if($name) $action->extra = common::hasPriv('project', 'story') ? html::a(helper::createLink('project', 'story', "projectID=$action->extra"), $name) : $name;
|
||||
}
|
||||
elseif($actionName == 'linked2prj')
|
||||
{
|
||||
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
|
||||
$productID = trim($action->product, ',');
|
||||
if($name) $action->extra = common::hasPriv('project', 'story') ? html::a(helper::createLink('projectstory', 'story', "productID=$productID"), $name) : $name;
|
||||
}
|
||||
elseif($actionName == 'linked2plan')
|
||||
{
|
||||
$title = $this->dao->select('title')->from(TABLE_PRODUCTPLAN)->where('id')->eq($action->extra)->fetch('title');
|
||||
@@ -277,6 +283,12 @@ class actionModel extends model
|
||||
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
|
||||
if($name) $action->extra = common::hasPriv('project', 'story') ? html::a(helper::createLink('project', 'story', "projectID=$action->extra"), "#$action->extra " . $name) : "#$action->extra " . $name;
|
||||
}
|
||||
elseif($actionName == 'unlinkedfromprj')
|
||||
{
|
||||
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
|
||||
$productID = trim($action->product, ',');
|
||||
if($name) $action->extra = common::hasPriv('project', 'story') ? html::a(helper::createLink('projectstory', 'story', "productID=$productID"), "#$action->extra " . $name) : "#$action->extra " . $name;
|
||||
}
|
||||
elseif($actionName == 'unlinkedfrombuild')
|
||||
{
|
||||
$name = $this->dao->select('name')->from(TABLE_BUILD)->where('id')->eq($action->extra)->fetch('name');
|
||||
|
||||
@@ -2756,6 +2756,7 @@ class project extends control
|
||||
}
|
||||
$planStories = array_keys($planStory);
|
||||
$this->project->linkStory($projectID, $planStories, $planProducts);
|
||||
if($projectID != $this->session->PRJ) $this->project->linkStory($this->session->PRJ, $planStories, $planProducts);
|
||||
}
|
||||
|
||||
$moduleName = 'project';
|
||||
|
||||
@@ -2115,7 +2115,8 @@ class projectModel extends model
|
||||
$data->order = ++$lastOrder;
|
||||
$this->dao->insert(TABLE_PROJECTSTORY)->data($data)->exec();
|
||||
$this->story->setStage($storyID);
|
||||
$this->action->create('story', $storyID, 'linked2project', '', $projectID);
|
||||
$action = $projectID == $this->session->PRJ ? 'linked2prj' : 'linked2project';
|
||||
$this->action->create('story', $storyID, $action, '', $projectID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,12 @@ class story extends control
|
||||
}
|
||||
$actionID = $this->action->create('story', $storyID, $action, '', $extra);
|
||||
|
||||
if($projectID != 0)
|
||||
{
|
||||
if($projectID != $this->session->PRJ) $this->loadModel('action')->create('story', $storyID, 'linked2project', '', $projectID);
|
||||
$this->loadModel('action')->create('story', $storyID, 'linked2prj', '', $this->session->PRJ);
|
||||
}
|
||||
|
||||
if($todoID > 0)
|
||||
{
|
||||
$this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($todoID)->exec();
|
||||
@@ -169,7 +175,7 @@ class story extends control
|
||||
setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true);
|
||||
$project = $this->dao->findById((int)$projectID)->from(TABLE_PROJECT)->fetch();
|
||||
$moduleName = $project->type == 'project' ? 'projectstory' : 'project';
|
||||
$param = $project->type == 'project' ? "PRJ=$projectID" : "projectID=$projectID&orderBy=id_desc&browseType=unclosed";
|
||||
$param = $project->type == 'project' ? "productID=$productID" : "projectID=$projectID&orderBy=id_desc&browseType=unclosed";
|
||||
$response['locate'] = $this->createLink($moduleName, 'story', $param);
|
||||
}
|
||||
if($this->app->getViewType() == 'xhtml') $response['locate'] = $this->createLink('story', 'view', "storyID=$storyID");
|
||||
|
||||
@@ -279,6 +279,8 @@ $lang->story->action->linked2plan = array('main' => '$date, 由 <strong>
|
||||
$lang->story->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
|
||||
$lang->story->action->linked2project = array('main' => '$date, 由 <strong>$actor</strong> 关联到' . $lang->executionCommon . ' <strong>$extra</strong>。');
|
||||
$lang->story->action->unlinkedfromproject = array('main' => '$date, 由 <strong>$actor</strong> 从' . $lang->executionCommon . ' <strong>$extra</strong> 移除。');
|
||||
$lang->story->action->linked2prj = array('main' => '$date, 由 <strong>$actor</strong> 关联到项目 <strong>$extra</strong>。');
|
||||
$lang->story->action->unlinkedfromprj = array('main' => '$date, 由 <strong>$actor</strong> 从项目 <strong>$extra</strong> 移除。');
|
||||
$lang->story->action->linked2build = array('main' => '$date, 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>。');
|
||||
$lang->story->action->unlinkedfrombuild = array('main' => '$date, 由 <strong>$actor</strong> 从版本 <strong>$extra</strong> 移除。');
|
||||
$lang->story->action->linked2release = array('main' => '$date, 由 <strong>$actor</strong> 关联到发布 <strong>$extra</strong>。');
|
||||
|
||||
Reference in New Issue
Block a user