* Finish task#7702.

This commit is contained in:
leiyong
2020-08-27 09:23:10 +08:00
parent 06e5748f12
commit df1a9ee5ef
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -354,11 +354,11 @@ class custom extends control
* @return void
*/
public function estimate()
{
{
$this->lang->custom->menu = new stdclass();
$this->lang->navGroup->custom = 'system';
if(strtolower($this->server->request_method) == "post")
{
{
$data = fixer::input('post')->get();
$this->loadModel('setting')->setItem('system.custom.hourPoint', $data->hourPoint);
$this->loadModel('setting')->setItem('system.custom.cost', $data->cost);
@@ -368,11 +368,11 @@ class custom extends control
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('custom', 'estimate')));
}
}
$this->app->loadConfig('project');
$this->view->unit = zget($this->config->custom, 'hourPoint', '1');
$this->view->unit = zget($this->config->custom, 'hourPoint', '1');
$this->view->cost = zget($this->config->custom, 'cost', '');
$this->view->efficiency = zget($this->config->custom, 'efficiency', '');
$this->view->hours = zget($this->config->project, 'defaultWorkhours', '');
+3 -3
View File
@@ -362,7 +362,7 @@ class customModel extends model
}
/**
* Get system swapper.
* Get system swapper.
* @param string $module
* @param string $method
* @access public
@@ -370,8 +370,8 @@ class customModel extends model
*/
public function getSwapper()
{
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'scrum' : 'cmmi';
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setcmmi'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'SCRUM');
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'Scrum' : 'CMMI';
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setcmmi'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'Scrum');
$output = "<div class='btn-group' id='swapper'><button data-toggle='dropdown' type='button' class='btn btn-limit' title='{$current}'>{$current} <i class='icon icon-swap'></i></button>";
$output .= "<ul class='dropdown-menu'><li>" . $link . "</li></ul>";
Binary file not shown.