* Finish task #8116.
This commit is contained in:
@@ -149,44 +149,6 @@ class stakeholder extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stakeholder plan list.
|
||||
*
|
||||
* @param int $stakeholderID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function plan()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$result = $this->stakeholder->savePlan();
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
if(!$result)
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
$response['locate'] = inlink('plan');
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->planField->common;
|
||||
$this->view->position[] = $this->lang->stakeholder->planField->common;
|
||||
|
||||
$this->view->plans = $this->stakeholder->getPlans();
|
||||
$this->view->processGroup = $this->stakeholder->getProcessGroup();
|
||||
$this->view->activities = $this->stakeholder->getActivities();
|
||||
$this->view->processes = $this->stakeholder->getProcess();
|
||||
$this->view->stakeholders = $this->stakeholder->getListByType();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get members.
|
||||
*
|
||||
@@ -419,143 +381,6 @@ class stakeholder extends control
|
||||
$this->view->actions = $this->loadModel('action')->getList($object, $stakeholderID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get expected list data.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param string orderBy
|
||||
* @param int recTotal
|
||||
* @param int recPerPage
|
||||
* @param int pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function expectation($browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->config->stakeholder->search['params']['userID']['values'] = $this->stakeholder->getStakeholderUsers();
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('stakeholder', 'expectation', "browseType=bysearch&queryID=myQueryID");
|
||||
$this->stakeholder->buildSearchForm($actionURL, $queryID);
|
||||
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
$expects = $this->stakeholder->getExpectList($browseType, $queryID, $orderBy, $pager);
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->expectation;
|
||||
$this->view->position[] = $this->lang->stakeholder->view;
|
||||
|
||||
$this->view->pager = $pager;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->expects = $expects;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deleted expect.
|
||||
*
|
||||
* @access public
|
||||
* @param int $expectID
|
||||
* @param string $confirm yes|no
|
||||
* @return void
|
||||
*/
|
||||
public function deleteExpect($expectID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->stakeholder->confirmDeleteExpect, inLink('deleteExpect', "expectID=$expectID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->stakeholder->deleteExpect($expectID);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add expect.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createExpect()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$expectID = $this->stakeholder->expect();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('expect', $expectID, 'Opened');
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('expectation')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->createExpect;
|
||||
$this->view->position[] = $this->lang->stakeholder->createExpect;
|
||||
|
||||
$this->view->users = $this->stakeholder->getStakeholderUsers();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit expect.
|
||||
*
|
||||
* @param int $expectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editExpect($expectID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->stakeholder->editExpect($expectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('expect', $expectID, 'Edited');
|
||||
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('expectation')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->editExpect;
|
||||
$this->view->position[] = $this->lang->stakeholder->editExpect;
|
||||
|
||||
$this->view->users = $this->stakeholder->getStakeholderUsers();
|
||||
$this->view->expect = $this->stakeholder->getExpectByID($expectID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Expect details.
|
||||
*
|
||||
* @access public
|
||||
* @param int $expectID
|
||||
* @return void
|
||||
*/
|
||||
public function viewExpect($expectID = 0)
|
||||
{
|
||||
$this->commonAction($expectID, 'expect');
|
||||
$expect = $this->stakeholder->getExpectByID($expectID);
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->viewExpect;
|
||||
$this->view->position[] = $this->lang->stakeholder->viewExpect;
|
||||
|
||||
$this->view->expect = $expect;
|
||||
$this->view->user = $this->stakeholder->getByID($expect->userID);
|
||||
$this->view->users = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ ,'nodeleted');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue details.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user