* finish task #5364.
This commit is contained in:
@@ -342,6 +342,12 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif(($actionName == 'opened' or $actionName == 'managed') and $objectType == 'project')
|
||||
{
|
||||
$linkedProducts = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->in($action->extra)->fetchPairs('id', 'name');
|
||||
$action->extra = '';
|
||||
if($linkedProducts) $action->extra = sprintf($this->lang->project->action->extra, '<strong>' . join(', ', $linkedProducts) . '</strong>');
|
||||
}
|
||||
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
|
||||
|
||||
$actionName = strtolower($action->action);
|
||||
|
||||
@@ -1053,7 +1053,7 @@ class project extends control
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'opened');
|
||||
$this->loadModel('action')->create('project', $projectID, 'opened', '', join(',', $_POST['products']));
|
||||
|
||||
$planID = reset($_POST['plans']);
|
||||
if(!empty($planID))
|
||||
@@ -1711,7 +1711,7 @@ class project extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function manageProducts($projectID, $from='')
|
||||
public function manageProducts($projectID, $from = '')
|
||||
{
|
||||
/* use first project if projectID does not exist. */
|
||||
if(!isset($this->projects[$projectID])) $projectID = key($this->projects);
|
||||
@@ -1723,6 +1723,8 @@ class project extends control
|
||||
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'Managed', '', join(',', $_POST['products']));
|
||||
die(js::locate($browseProjectLink));
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,11 @@ $lang->project->withweekend = 'incl. Weekend';
|
||||
$lang->project->interval = 'Intervals';
|
||||
$lang->project->fixFirstWithLeft = 'Modify the left';
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->opened = '$date, created by <strong>$actor</strong> .' . "\n";
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->project->action->extra = 'The related products are %s.';
|
||||
|
||||
/* 统计。*/
|
||||
$lang->project->charts = new stdclass();
|
||||
$lang->project->charts->burn = new stdclass();
|
||||
|
||||
@@ -246,6 +246,11 @@ $lang->project->withweekend = '显示周末';
|
||||
$lang->project->interval = '间隔';
|
||||
$lang->project->fixFirstWithLeft = '修改剩余工时';
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->opened = '$date, 由 <strong>$actor</strong> 创建。$extra' . "\n";
|
||||
$lang->project->action->managed = '$date, 由 <strong>$actor</strong> 维护。$extra' . "\n";
|
||||
$lang->project->action->extra = '相关产品为 %s。';
|
||||
|
||||
/* 统计。*/
|
||||
$lang->project->charts = new stdclass();
|
||||
$lang->project->charts->burn = new stdclass();
|
||||
|
||||
Reference in New Issue
Block a user