* Finish task #41552.
This commit is contained in:
@@ -447,10 +447,11 @@ class project extends control
|
||||
* Edit a project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $from
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($projectID = 0)
|
||||
public function edit($projectID = 0, $from = '')
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$this->loadModel('custom');
|
||||
@@ -485,7 +486,7 @@ class project extends control
|
||||
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
|
||||
$locateLink = $this->session->projectList ? $this->session->projectList : inLink('view', "projectID=$projectID");
|
||||
$locateLink = ($this->session->projectList and $from != 'view') ? $this->session->projectList : inLink('view', "projectID=$projectID");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
|
||||
}
|
||||
|
||||
@@ -609,7 +610,6 @@ class project extends control
|
||||
}
|
||||
|
||||
$this->project->setMenu($projectID);
|
||||
$this->session->set('projectList', $this->app->getURI(true), 'project');
|
||||
|
||||
$products = $this->loadModel('product')->getProducts($projectID);
|
||||
$linkedBranches = array();
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
echo $this->buildOperateMenu($project, 'view');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('project', 'edit', $params, $project, 'button', 'edit', '', '', '', '', $lang->edit);
|
||||
common::printIcon('project', 'edit', $params . '&from=view', $project, 'button', 'edit', '', '', '', '', $lang->edit);
|
||||
common::printIcon('project', 'delete', $params, $project, 'button', 'trash', 'hiddenwin', '', '', '', $lang->delete);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user