-

execution->createExec : $lang->execution->create;?>

+

systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create;?>

- +
@@ -53,12 +53,12 @@ - execution->execName : $lang->execution->name;?> + systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name;?> - execution->execCode : $lang->execution->code;?> + systemMode == 'new')) ? $lang->execution->execCode : $lang->execution->code;?> @@ -86,7 +86,7 @@ - execution->execType : $lang->execution->type;?> + systemMode == 'new')) ? $lang->execution->execType : $lang->execution->type;?> execution->lifeTimeList, '', "class='form-control' onchange='showLifeTimeTips()'"); ?>
execution->typeDesc;?>
@@ -144,7 +144,7 @@ - execution->execDesc : $lang->execution->desc;?> + systemMode == 'new')) ? $lang->execution->execDesc : $lang->execution->desc;?> fetch('user', 'ajaxPrintTemplates', 'type=execution&link=desc');?> diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 0674b5e6ee..e8a824480d 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1013,7 +1013,7 @@ $lang->resource->doc = new stdclass(); $lang->resource->doc->index = 'index'; $lang->resource->doc->browse = 'browse'; $lang->resource->doc->createlib = 'createlib'; -$lang->resource->doc->editlib = 'editlib'; +$lang->resource->doc->editlib = 'editLib'; $lang->resource->doc->deleteLib = 'deleteLib'; $lang->resource->doc->create = 'create'; $lang->resource->doc->view = 'view'; diff --git a/module/project/config.php b/module/project/config.php index de06ba0ca8..985368c990 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -33,65 +33,80 @@ $config->project->datatable->fieldList['id']['title'] = 'ID'; $config->project->datatable->fieldList['id']['fixed'] = 'left'; $config->project->datatable->fieldList['id']['width'] = '60'; $config->project->datatable->fieldList['id']['required'] = 'yes'; +$config->project->datatable->fieldList['id']['pri'] = '1'; $config->project->datatable->fieldList['name']['title'] = 'name'; $config->project->datatable->fieldList['name']['fixed'] = 'left'; -$config->project->datatable->fieldList['name']['width'] = '180'; +$config->project->datatable->fieldList['name']['width'] = 'auto'; +$config->project->datatable->fieldList['name']['minWidth'] = '180'; $config->project->datatable->fieldList['name']['required'] = 'yes'; $config->project->datatable->fieldList['name']['sort'] = 'no'; +$config->project->datatable->fieldList['name']['pri'] = '1'; $config->project->datatable->fieldList['PM']['title'] = 'PM'; $config->project->datatable->fieldList['PM']['fixed'] = 'no'; $config->project->datatable->fieldList['PM']['width'] = '80'; $config->project->datatable->fieldList['PM']['required'] = 'yes'; $config->project->datatable->fieldList['PM']['sort'] = 'no'; +$config->project->datatable->fieldList['PM']['pri'] = '2'; $config->project->datatable->fieldList['status']['title'] = 'status'; $config->project->datatable->fieldList['status']['fixed'] = 'left'; $config->project->datatable->fieldList['status']['width'] = '80'; $config->project->datatable->fieldList['status']['required'] = 'no'; $config->project->datatable->fieldList['status']['sort'] = 'yes'; +$config->project->datatable->fieldList['status']['pri'] = '2'; $config->project->datatable->fieldList['begin']['title'] = 'begin'; $config->project->datatable->fieldList['begin']['fixed'] = 'no'; -$config->project->datatable->fieldList['begin']['width'] = '100'; +$config->project->datatable->fieldList['begin']['width'] = '90'; $config->project->datatable->fieldList['begin']['required'] = 'no'; +$config->project->datatable->fieldList['begin']['pri'] = '9'; $config->project->datatable->fieldList['end']['title'] = 'end'; $config->project->datatable->fieldList['end']['fixed'] = 'no'; -$config->project->datatable->fieldList['end']['width'] = '100'; +$config->project->datatable->fieldList['end']['width'] = '90'; $config->project->datatable->fieldList['end']['required'] = 'no'; +$config->project->datatable->fieldList['end']['pri'] = '3'; $config->project->datatable->fieldList['budget']['title'] = 'budget'; $config->project->datatable->fieldList['budget']['fixed'] = 'no'; $config->project->datatable->fieldList['budget']['width'] = '80'; $config->project->datatable->fieldList['budget']['required'] = 'yes'; +$config->project->datatable->fieldList['budget']['pri'] = '3'; $config->project->datatable->fieldList['teamCount']['title'] = 'teamCount'; $config->project->datatable->fieldList['teamCount']['fixed'] = 'no'; $config->project->datatable->fieldList['teamCount']['width'] = '70'; $config->project->datatable->fieldList['teamCount']['required'] = 'no'; $config->project->datatable->fieldList['teamCount']['sort'] = 'no'; +$config->project->datatable->fieldList['teamCount']['pri'] = '8'; $config->project->datatable->fieldList['estimate']['title'] = 'estimate'; $config->project->datatable->fieldList['estimate']['fixed'] = 'no'; -$config->project->datatable->fieldList['estimate']['width'] = '50'; +$config->project->datatable->fieldList['estimate']['width'] = '70'; +$config->project->datatable->fieldList['estimate']['maxWidth'] = '80'; $config->project->datatable->fieldList['estimate']['required'] = 'no'; $config->project->datatable->fieldList['estimate']['sort'] = 'no'; +$config->project->datatable->fieldList['estimate']['pri'] = '8'; $config->project->datatable->fieldList['consume']['title'] = 'consume'; $config->project->datatable->fieldList['consume']['fixed'] = 'no'; -$config->project->datatable->fieldList['consume']['width'] = '50'; +$config->project->datatable->fieldList['consume']['width'] = '70'; +$config->project->datatable->fieldList['consume']['maxWidth'] = '80'; $config->project->datatable->fieldList['consume']['required'] = 'no'; $config->project->datatable->fieldList['consume']['sort'] = 'no'; +$config->project->datatable->fieldList['consume']['pri'] = '7'; $config->project->datatable->fieldList['progress']['title'] = 'progress'; $config->project->datatable->fieldList['progress']['fixed'] = 'right'; $config->project->datatable->fieldList['progress']['width'] = '60'; $config->project->datatable->fieldList['progress']['required'] = 'no'; $config->project->datatable->fieldList['progress']['sort'] = 'no'; +$config->project->datatable->fieldList['progress']['pri'] = '6'; $config->project->datatable->fieldList['actions']['title'] = 'actions'; $config->project->datatable->fieldList['actions']['fixed'] = 'right'; $config->project->datatable->fieldList['actions']['width'] = '180'; $config->project->datatable->fieldList['actions']['required'] = 'yes'; +$config->project->datatable->fieldList['actions']['pri'] = '1'; diff --git a/module/project/css/browse.css b/module/project/css/browse.css index 26af2131ec..3c5a1c9361 100644 --- a/module/project/css/browse.css +++ b/module/project/css/browse.css @@ -2,5 +2,6 @@ .side-col {padding-right: 20px; width: 18%;} #sidebar>.cell {width: 100%;} +th.c-budget,{text-align:right;} td.c-actions {overflow: visible;} .c-actions .btn {overflow: visible;} diff --git a/module/project/model.php b/module/project/model.php index 472de78290..9d46a224de 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -778,6 +778,16 @@ class projectModel extends model $this->loadModel('personnel')->updateWhitelist($whitelist, 'project', $projectID); if($project->acl != 'open') $this->loadModel('user')->updateUserView($projectID, 'project'); + /* Create doc lib. */ + $this->app->loadLang('doc'); + $lib = new stdclass(); + $lib->project = $projectID; + $lib->name = $this->lang->doclib->main['project']; + $lib->type = 'project'; + $lib->main = '1'; + $lib->acl = 'default'; + $this->dao->insert(TABLE_DOCLIB)->data($lib)->exec(); + $this->updateProducts($projectID); if(isset($_POST['newProduct']) || (!$project->parent && empty($linkedProductsCount))) @@ -1315,7 +1325,7 @@ class projectModel extends model if($col->show) { $title = ''; - $class = "c-$id" . (in_array($id, ['budget', 'teamCount']) ? ' c-number' : ' c-name'); + $class = "c-$id" . (in_array($id, array('budget', 'teamCount', 'estimate', 'consume')) ? ' c-number' : ''); if($id == 'id') $class .= ' cell-id'; diff --git a/module/project/view/browse.html.php b/module/project/view/browse.html.php index b3c89be249..8e3b26688d 100644 --- a/module/project/view/browse.html.php +++ b/module/project/view/browse.html.php @@ -85,11 +85,12 @@ js::set('browseType', $browseType); id == 'status' and $browseType !== 'all') $value->show = false; - if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); - } + foreach($setting as $value) + { + if($value->id == 'status' and $browseType !== 'all') $value->show = false; + if($value->id == 'teamCount' and $browseType == 'all') $value->show = false; + if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); + } ?> diff --git a/module/story/control.php b/module/story/control.php index 010e56d9ab..909181391e 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -348,17 +348,17 @@ class story extends control if($executionID) { - $this->execution->setMenu($executionID); - $execution = $this->dao->findById((int)$executionID)->from(TABLE_EXECUTION)->fetch(); if($execution->type == 'project') { + $this->project->setMenu($executionID); $this->app->rawModule = 'projectstory'; $this->lang->navGroup->story = 'project'; - $this->lang->product->menu = $this->lang->menu->{$execution->model}; + $this->lang->product->menu = $this->lang->{$execution->model}->menu; } else { + $this->execution->setMenu($executionID); $this->app->rawModule = 'execution'; $this->lang->navGroup->story = 'execution'; } diff --git a/module/tree/control.php b/module/tree/control.php index 6a03bac340..904762e957 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -30,12 +30,12 @@ class tree extends control if($this->app->openApp == 'product') { - $this->product->setMenu($rootID);; + $this->product->setMenu($rootID, 0, 0, '', $viewType);; } else if($this->app->openApp == 'qa') { $products = $this->product->getPairs('noclosed'); - $this->loadModel('qa')->setMenu($products, $rootID);; + $this->loadModel('qa')->setMenu($products, $rootID, 0, $viewType);; } else if($this->app->openApp == 'project') { @@ -83,7 +83,7 @@ class tree extends control /* Set menu.*/ $products = $this->product->getPairs(); $this->product->saveState($rootID, $products); - $this->product->setMenu($rootID); + $this->product->setMenu($rootID, 0, 0, '', $viewType); unset($products[$rootID]); $currentProduct = key($products); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index e023884036..ab589becd3 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4054,6 +4054,20 @@ class upgradeModel extends model $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); } + $stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('createlib')->query(); + while($grouppriv = $stmt->fetch()) + { + $grouppriv->method = 'createLib'; + $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); + } + + $stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('editlib')->query(); + while($grouppriv = $stmt->fetch()) + { + $grouppriv->method = 'editLib'; + $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); + } + return true; } @@ -4204,6 +4218,16 @@ class upgradeModel extends model ->where('id')->eq($projectID) ->exec(); + /* Create doc lib. */ + $this->app->loadLang('doc'); + $lib = new stdclass(); + $lib->project = $projectID; + $lib->name = $this->lang->doclib->main['project']; + $lib->type = 'project'; + $lib->main = '1'; + $lib->acl = 'default'; + $this->dao->insert(TABLE_DOCLIB)->data($lib)->exec(); + $this->loadModel('action')->create('project', $projectID, 'openedbysystem'); if($data->projectStatus == 'closed') $this->loadModel('action')->create('project', $projectID, 'closedbysystem'); } diff --git a/module/user/model.php b/module/user/model.php index 827820528b..1da428f6cf 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -2291,7 +2291,7 @@ class userModel extends model } /* Judge sprint auth. */ - if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private') + if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private' && $this->config->systemMode == 'new') { $parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch(); $users[$parent->openedBy] = $parent->openedBy;