diff --git a/module/block/control.php b/module/block/control.php index 912e96f3a5..b1b5837792 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1256,6 +1256,8 @@ class block extends control { $this->loadModel('milestone'); $this->loadModel('weekly'); + $this->app->loadLang('execution'); + $projectID = $this->session->project; $project = $this->loadModel('project')->getByID($projectID); diff --git a/module/block/view/projectstatisticblock.html.php b/module/block/view/projectstatisticblock.html.php index b2c9e4d1b3..fdf17551bb 100644 --- a/module/block/view/projectstatisticblock.html.php +++ b/module/block/view/projectstatisticblock.html.php @@ -62,7 +62,7 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po .block-statistic .data {width: 40%; text-align: left; padding: 10px 0px; font-size: 14px; font-weight: 700;} .block-statistic .dataTitle {width: 60%; text-align: right; padding: 10px 0px; font-size: 14px;} -.block-statistic .executionName {padding: 2px 10px; font-size: 14px;} +.block-statistic .executionName {padding: 2px 10px; font-size: 14px; text-overflow: ellipsis; overflow: hidden;} .block-statistic .lastIteration {padding-top: 6px;} .block-statistic .progress-text-left {margin-right: 90px} .block-statistic .progress-text-left .progress-text {padding-top: 2px; font-size: 14px; padding-right:5px; left: -45px;} diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index 2c7f66e6a1..41834f78d2 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -27,7 +27,7 @@ function setBranchRelated(branchID, productID, num) $("#modules" + num).chosen(); }); - executionLink = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&executionID=0&branch=' + branchID + '&num=' + num); + executionLink = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&num=' + num); $.get(executionLink, function(executions) { if(!executions) executions = ''; diff --git a/module/build/js/edit.js b/module/build/js/edit.js index 75f685f686..9c4a7505b0 100644 --- a/module/build/js/edit.js +++ b/module/build/js/edit.js @@ -1,8 +1,10 @@ +var oldExecutionID = $('#execution').val(); + function loadExecutions() { var productID = $('#product').val(); var branchID = $('#branch').length > 0 ? $('#branch').val() : 0; - $('#executionsBox').load(createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&executionID=0&branch=' + branchID), function() + $('#executionsBox').load(createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&number=&executionID=' + oldExecutionID), function() { $('#executionsBox #execution').chosen().removeAttr('onchange'); }); diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index e0726ab0bf..6366cbf545 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -89,4 +89,5 @@ +project)?> diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 89de4b59ce..f4636bf1a6 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -40,7 +40,7 @@ $lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common} $lang->mainNav->system = "{$lang->navIcons['system']} {$lang->system->common}|my|team|"; $lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|admin|index|"; -$lang->dividerMenu = ',doc,admin,'; +$lang->dividerMenu = ',doc,oa,admin,'; $lang->mainNav->menuOrder[5] = 'my'; if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program'; $lang->mainNav->menuOrder[15] = 'product'; @@ -50,8 +50,8 @@ $lang->mainNav->menuOrder[23] = 'qa'; $lang->mainNav->menuOrder[25] = 'devops'; $lang->mainNav->menuOrder[30] = 'doc'; $lang->mainNav->menuOrder[35] = 'report'; -$lang->mainNav->menuOrder[45] = 'system'; -$lang->mainNav->menuOrder[50] = 'admin'; +$lang->mainNav->menuOrder[40] = 'system'; +$lang->mainNav->menuOrder[55] = 'admin'; /* My menu. */ $lang->my->menu = new stdclass(); diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 408511bd8b..1cdf6d058a 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -48,7 +48,7 @@ $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; -if($config->systemMode == 'classic') $lang->custom->execution = $lang->executionCommon; +if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index c503045d1c..55ed40f1fd 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -48,7 +48,7 @@ $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; -if($config->systemMode == 'classic') $lang->custom->execution = $lang->executionCommon; +if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 6f7ef9f418..8e44c229c8 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -48,7 +48,7 @@ $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; -if($config->systemMode == 'classic') $lang->custom->execution = $lang->executionCommon; +if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php index cf9b0cbf18..58232273fe 100644 --- a/module/custom/lang/vi.php +++ b/module/custom/lang/vi.php @@ -48,7 +48,7 @@ $lang->custom->oneUnit = "One {$lang->hourCommon}"; $lang->custom->convertRelationTitle = "Please set the conversion factor of {$lang->hourCommon} to %s first"; if($config->systemMode == 'new') $lang->custom->execution = 'Execution'; -if($config->systemMode == 'classic') $lang->custom->execution = $lang->executionCommon; +if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; $lang->custom->unitList['efficiency'] = 'Working Hours/'; $lang->custom->unitList['manhour'] = 'Man-hour/'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index ef5ab02d70..b6a783ee18 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -48,7 +48,7 @@ $lang->custom->oneUnit = "一个{$lang->hourCommon}"; $lang->custom->convertRelationTitle = "请先设置{$lang->hourCommon}转换为%s的换算系数"; if($config->systemMode == 'new') $lang->custom->execution = '执行'; -if($config->systemMode == 'classic') $lang->custom->execution = $lang->executionCommon; +if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon; $lang->custom->unitList['efficiency'] = '工时/'; $lang->custom->unitList['manhour'] = '人时/'; diff --git a/module/doc/view/editlib.html.php b/module/doc/view/editlib.html.php index b6bb6b2e87..49361eb4b7 100644 --- a/module/doc/view/editlib.html.php +++ b/module/doc/view/editlib.html.php @@ -17,7 +17,7 @@

icons['doclib']);?> - doc->editLib;?> + type != 'book' ? $lang->doc->editLib : $lang->doc->editBook;?>

@@ -35,7 +35,7 @@ - doc->libName?> + type != 'book' ? $lang->doc->libName : $lang->doc->bookName;?> name, "class='form-control'");?> @@ -43,7 +43,7 @@ doclib->control;?> - type == 'product' or $lib->type == 'execution' or ($config->systemMode == 'classic' and $lib->type != 'custom' )):?> + type == 'product' or $lib->type == 'execution' or ($config->systemMode == 'classic' and $lib->type != 'custom')):?> doclib->aclListA, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'")?> doc->noticeAcl['lib'][$lib->type][$lib->acl];?> diff --git a/module/execution/control.php b/module/execution/control.php index ff80468283..2f811cddfb 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -443,7 +443,7 @@ class execution extends control $this->view->browseType = 'group'; $this->view->groupBy = $groupBy; $this->view->orderBy = $groupBy; - $this->view->executionID = $executionID; + $this->view->executionID = $executionID; $this->view->users = $users; $this->view->moduleID = 0; $this->view->moduleName = $this->lang->tree->all; @@ -1230,6 +1230,13 @@ class execution extends control die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); } } + + $project = $this->project->getByID($projectID); + if(!empty($project->model) and $project->model == 'waterfall') + { + $this->lang->execution->afterInfo = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->afterInfo); + } + $this->view->title = $this->lang->execution->tips; $this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID"); $this->view->executionID = $executionID; @@ -1873,11 +1880,11 @@ class execution extends control $this->view->title = $this->lang->execution->tree; $this->view->position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name); - $this->view->position[] = $this->lang->execution->tree; - $this->view->execution = $execution; - $this->view->executionID = $executionID; - $this->view->level = $type; - $this->view->tree = $this->execution->printTree($tree); + $this->view->position[] = $this->lang->execution->tree; + $this->view->execution = $execution; + $this->view->executionID = $executionID; + $this->view->level = $type; + $this->view->tree = $this->execution->printTree($tree); $this->display(); } diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php index fd8c055a84..ca422382b0 100644 --- a/module/execution/view/grouptask.html.php +++ b/module/execution/view/grouptask.html.php @@ -38,9 +38,9 @@
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index 09ca6e739f..a349accc04 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -102,7 +102,25 @@ else { echo "'; } } diff --git a/module/execution/view/tree.html.php b/module/execution/view/tree.html.php index aef3be3ca3..e6a668cab2 100644 --- a/module/execution/view/tree.html.php +++ b/module/execution/view/tree.html.php @@ -27,7 +27,7 @@
createLink('task', 'report', "execution=$executionID&browseType=$browseType") : '#'; echo html::a($link, " {$lang->task->reportChart}", '', 'class="btn btn-link"'); diff --git a/module/execution/view/view.html.php b/module/execution/view/view.html.php index 03484348d4..bb36fc1174 100644 --- a/module/execution/view/view.html.php +++ b/module/execution/view/view.html.php @@ -126,7 +126,7 @@ createLink('doc', 'showFiles', "type=execution&objectID=$execution->id"), " " . $docLib->name);?> - createLink('doc', 'browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=execution"), " " . $docLib->name);?> + createLink('doc', 'objectLibs', "type=execution&objectID={$execution->id}&libID=$libID"), " " . $docLib->name, '', "data-app='execution'");?>
diff --git a/module/index/css/index.css b/module/index/css/index.css index 9e40089173..535005d726 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -93,7 +93,7 @@ body.menu-hide {padding-left: 0;} #searchbox .dropdown-menu > li {display: none;} #searchbox .dropdown-menu > li.search-type-all {width: 100%; display: block;} #searchbox .dropdown-menu > li:hover {position: relative;} -#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: initial; bottom: 4px; min-height: 362px; padding-top: 30px;} +#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: initial; bottom: 4px; min-height: 318px; padding-top: 30px;} #searchbox .dropdown-menu.show-quick-go > li {display: block;} #searchbox .dropdown-menu.show-quick-go > li.active {width: 100%; position: absolute; top: 0; left: 0; right: 0;} #searchbox .dropdown-menu>li.active>a, #searchbox .dropdown-menu>li.selected>a {position: relative; color: #fff; background-color: #16a8f8;} diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index abd1f23dab..3e41ae4c8f 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -94,10 +94,10 @@ if($canBeChanged) { $vars = "story={$story->id}"; - common::printIcon('story', 'change', $vars, $story, 'list', 'fork'); - common::printIcon('story', 'review', $vars, $story, 'list', 'search'); + common::printIcon('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true); + common::printIcon('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true); common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); - common::printIcon('story', 'edit', $vars, $story, 'list'); + common::printIcon('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'"); common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap'); } ?> diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 38ebef0003..243b9213d3 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -97,7 +97,7 @@ { $vars = "story={$story->id}"; common::printIcon('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true); - common::printIcon('story', 'review', $vars, $story, 'list', 'search'); + common::printIcon('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true); common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true); common::printIcon('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'"); common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'"); diff --git a/module/product/control.php b/module/product/control.php index 08a467b743..2a29cbdc26 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -855,15 +855,16 @@ class product extends control * AJAX: get executions of a product in html select. * * @param int $productID - * @param int $executionID + * @param int $projectID * @param int $branch * @param string $number + * @param int $executionID * @access public * @return void */ - public function ajaxGetExecutions($productID, $executionID = 0, $branch = 0, $number = '') + public function ajaxGetExecutions($productID, $projectID = 0, $branch = 0, $number = '', $executionID = 0) { - $executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : $branch, 'id_desc', $executionID); + $executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : $branch, 'id_desc', $projectID); if($this->app->getViewType() == 'json') die(json_encode($executions)); if($number === '') diff --git a/module/product/js/browse.js b/module/product/js/browse.js index ff8eda1ffe..fe86a31b9a 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -27,7 +27,7 @@ $(function() var planID = $('#plan').val(); if(planID) { - parent.location.href = createLink('execution', 'importPlanStories', 'projectID=' + projectID + '&planID=' + planID + '&productID=' + productID); + parent.location.href = createLink('projectstory', 'importPlanStories', 'projectID=' + projectID + '&planID=' + planID + '&productID=' + productID); } }) diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 0806072497..82868a70a3 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -80,7 +80,7 @@ $line):?> config->systemMode == 'new') + if($this->config->systemMode == 'new' and $programID) { $trAttrs = "data-id='line.$lineID' data-parent='program.$programID'"; $trClass .= ' is-nest-child table-nest'; @@ -110,9 +110,11 @@ $trClass = ''; if($product->line) { + $path = "$product->line,$product->id"; + if($this->config->systemMode == 'new' and $product->program) $path = "$product->program,$path"; $trAttrs = "data-id='$product->id' data-parent='line.$product->line'"; $trClass .= ' is-nest-child table-nest'; - $trAttrs .= " data-nest-parent='line.$product->line' data-nest-path='line.$product->program,$product->line,$product->id'"; + $trAttrs .= " data-nest-parent='line.$product->line' data-nest-path='line.{$path}'"; } elseif($product->program) { diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 6f2bdfcfce..9b10f31353 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -195,7 +195,25 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; } else { - if(common::hasPriv('projectstory', 'linkStory')) echo html::a($this->createLink('projectstory', 'linkStory', "project=$projectID"), " {$lang->execution->linkStory}", '', "class='btn btn-primary'"); + $buttonLink = ''; + $buttonTitle = ''; + $dataToggle = ''; + if(common::hasPriv('projectstory', 'importPlanStories')) + { + $buttonLink = empty($productID) ? '' : '#linkStoryByPlan'; + $buttonTitle = $lang->execution->linkStoryByPlan; + $dataToggle = 'data-toggle="modal"'; + } + if(common::hasPriv('projectstory', 'linkStory')) + { + $buttonLink = $this->createLink('projectstory', 'linkStory', "project=$projectID"); + $buttonTitle = $lang->execution->linkStory; + $dataToggle = ''; + } + + $hidden = empty($buttonLink) ? 'hidden' : ''; + echo html::a($buttonLink, " $buttonTitle", '', "class='btn btn-primary $hidden' $dataToggle"); + if(!empty($productID) and common::hasPriv('projectstory', 'linkStory') and common::hasPriv('projectstory', 'importPlanStories')) { echo ""; diff --git a/module/project/config.php b/module/project/config.php index 985368c990..cea74baa0d 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -8,7 +8,7 @@ $config->project->editor->close = array('id' => 'comment', 'tools' => 'simple $config->project->editor->suspend = array('id' => 'comment', 'tools' => 'simpleTools'); $config->project->editor->start = array('id' => 'comment', 'tools' => 'simpleTools'); $config->project->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->project->editor->view = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->project->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools'); $config->project->list = new stdclass(); $config->project->list->exportFields = 'id,name,code,template,product,status,begin,end,budget,PM,end,desc'; diff --git a/module/project/control.php b/module/project/control.php index b492c3e6e1..f2e656dde3 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -293,7 +293,7 @@ class project extends control } } - if($programID) $this->loadModel('program')->setMenu($programID); + if($this->app->openApp == 'program') $this->loadModel('program')->setMenu($programID); $name = ''; $code = ''; diff --git a/module/project/view/createguide.html.php b/module/project/view/createguide.html.php index 56511a3d7f..db2a858226 100644 --- a/module/project/view/createguide.html.php +++ b/module/project/view/createguide.html.php @@ -10,7 +10,6 @@ #guideDialog .project-type-img:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,0,.25);} #guideDialog .project-type.active img {border-color: #006AF1; border-width: 2px; margin-top: 0} -