diff --git a/config/config.php b/config/config.php index 110ad31c65..c5a7014a2f 100644 --- a/config/config.php +++ b/config/config.php @@ -16,11 +16,12 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '12.4.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. -$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. -$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. -$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. -$config->webRoot = ''; // URL根目录。 The root path of the url. +$config->version = '12.4.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. +$config->cookieLife = time() + 2592000; // Cookie的生存时间。 The cookie life time. +$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. +$config->webRoot = ''; // URL根目录。 The root path of the url. +$config->customSession = false; // 是否开启自定义session的存储路径。Whether custom the session save path. /* 框架路由相关设置。Routing settings. */ $config->requestType = 'PATH_INFO'; // 请求类型:PATH_INFO|PATHINFO2|GET。 The request type: PATH_INFO|PATH_INFO2|GET. diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 5518f9dfd8..2cdf1f303b 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -830,6 +830,7 @@ class baseRouter { $sessionName = $this->config->sessionVar; session_name($sessionName); + if($this->config->customSession) session_save_path($this->getTmpRoot() . 'session'); session_start(); $this->sessionID = session_id(); diff --git a/module/bug/model.php b/module/bug/model.php index 59543f9f1a..9f6c64d0a5 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2503,7 +2503,7 @@ class bugModel extends model public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $projects = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable') { /* Check the product is closed. */ - $isClosedProject = common::checkParentObjectClosed('bug', $bug); + $changeAllowed = common::checkObjectChangeAllowed('bug', $bug); $canBatchEdit = common::hasPriv('bug', 'batchEdit'); $canBatchConfirm = common::hasPriv('bug', 'batchConfirm'); @@ -2574,7 +2574,7 @@ class bugModel extends model case 'id': if($canBatchAction) { - $disabled = $isClosedProject ? 'disabled' : ''; + $disabled = $changeAllowed ? '' : 'disabled'; echo html::checkbox('bugIDList', array($bug->id => ''), '', $disabled) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id)); } else @@ -2726,7 +2726,7 @@ class bugModel extends model echo substr($bug->lastEditedDate, 5, 11); break; case 'actions': - if(!$isClosedProject) + if($changeAllowed) { $params = "bugID=$bug->id"; common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 3cee72fc05..a79713b707 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -58,7 +58,7 @@ fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true', 'object' => $bug));?> - createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?> + createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?> printExtendFields($bug, 'div', "position=left&inForm=0&inCell=1");?>
diff --git a/module/build/control.php b/module/build/control.php index 36f4ea9d61..ee60eb135f 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -213,7 +213,7 @@ class build extends control if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); /* Determines whether an object is editable. */ - $changeAllowed = !common::checkParentObjectClosed('build', $build); + $changeAllowed = common::checkObjectChangeAllowed('build', $build); $product = $this->loadModel('product')->getById($build->product); if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); diff --git a/module/common/model.php b/module/common/model.php index 1c3f7efca3..9f4897a508 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1490,7 +1490,7 @@ EOD; global $app, $lang; /* Check the parent object is closed. */ - if(commonModel::checkParentObjectClosed($module, $object)) return false; + if(!commonModel::checkObjectChangeAllowed($module, $object)) return false; /* Check is the super admin or not. */ if(!empty($app->user->admin) || strpos($app->company->admins, ",{$app->user->account},") !== false) return true; @@ -1850,7 +1850,7 @@ EOD; * @access public * @return bool */ - public static function checkParentObjectClosed($module, $object = null) + public static function checkObjectChangeAllowed($module, $object = null) { global $app, $config; @@ -1859,7 +1859,7 @@ EOD; { $productID = trim($object->product, ','); $product = $app->control->loadModel('product')->getByID($productID); - if($product->status == 'closed') return true; + if($product->status == 'closed') return false; /* Get the projects associated with the story. */ if($module == 'story' and empty($object->project)) @@ -1879,11 +1879,11 @@ EOD; $projects = $app->control->loadModel('project')->getByIDList($projectIDList); foreach($projects as $project) { - if($project->status == 'closed') return true; + if($project->status == 'closed') return false; } } - return false; + return true; } /** diff --git a/module/doc/control.php b/module/doc/control.php index 17242bec45..3947ea8fcb 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -853,8 +853,14 @@ class doc extends control setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true); $table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT; - $object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch(); + $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); if(empty($object)) $this->locate($this->createLink($type, 'create')); + + /* Determines whether an object is editable. */ + $changeAllowed = true; + if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false; + if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false; + if($from == 'product') { $this->lang->doc->menu = $this->lang->product->menu; @@ -891,10 +897,11 @@ class doc extends control $this->view->title = $object->name; $this->view->position[] = $object->name; - $this->view->type = $type; - $this->view->object = $object; - $this->view->from = $from; - $this->view->libs = $this->doc->getLibsByObject($type, $objectID); + $this->view->type = $type; + $this->view->object = $object; + $this->view->from = $from; + $this->view->libs = $this->doc->getLibsByObject($type, $objectID); + $this->view->changeAllowed = $changeAllowed; $this->display(); } } diff --git a/module/doc/model.php b/module/doc/model.php index e08db05a43..a399234707 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -107,8 +107,15 @@ class docModel extends model } } + /* Determines whether the doc lib is editable. */ + $docLib = new stdClass(); + $docLib->product = $productID; + $docLib->project = $projectID; + $changeAllowed = common::checkObjectChangeAllowed('doc', $docLib); + + $lib = isset($lib) ? $lib : new stdClass(); $actions = $this->setFastMenu($fastLib); - $actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : ''; + $actions .= ($changeAllowed and common::hasPriv('doc', 'createLib', $lib)) ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : ''; $this->lang->TRActions = $actions; } diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 599d5c4418..67417d0e2e 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -42,7 +42,7 @@ var browseType = ''; ", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?> ", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?> - + - + diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index 1f6905fb4f..b77fad66d9 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -57,7 +57,7 @@ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- + " title="" class='btn btn-link ajaxCollect'> diff --git a/module/doc/view/objectlibsbylist.html.php b/module/doc/view/objectlibsbylist.html.php index caa5926713..1e32f50ed2 100644 --- a/module/doc/view/objectlibsbylist.html.php +++ b/module/doc/view/objectlibsbylist.html.php @@ -34,7 +34,7 @@ name);?> allCount . $lang->doc->item;?> - + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index 63e5bf0ff4..91ccc77061 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -135,7 +135,7 @@ js::set('docID', $doc->id);
- fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true'));?> + fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'true', 'object' => $doc));?>
@@ -214,7 +214,7 @@ js::set('docID', $doc->id);
- createLink('action', 'comment', "objectType=doc&objectID=$doc->id");?> + createLink('action', 'comment', "objectType=doc&objectID=$doc->id");?>
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 9f10f7ad25..91c5e619ad 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -187,31 +187,32 @@ $lang->branch->methodOrder[10] = 'delete'; /* Story. */ $lang->resource->story = new stdclass(); -$lang->resource->story->create = 'create'; -$lang->resource->story->batchCreate = 'batchCreate'; -$lang->resource->story->edit = 'edit'; -$lang->resource->story->linkStory = 'linkStory'; -$lang->resource->story->batchEdit = 'batchEdit'; -$lang->resource->story->export = 'exportAction'; -$lang->resource->story->delete = 'deleteAction'; -$lang->resource->story->view = 'view'; -$lang->resource->story->change = 'changeAction'; -$lang->resource->story->review = 'reviewAction'; -$lang->resource->story->batchReview = 'batchReview'; -$lang->resource->story->assignTo = 'assignAction'; -$lang->resource->story->close = 'closeAction'; -$lang->resource->story->batchClose = 'batchClose'; -$lang->resource->story->activate = 'activateAction'; -$lang->resource->story->tasks = 'tasks'; -$lang->resource->story->bugs = 'bugs'; -$lang->resource->story->cases = 'cases'; -$lang->resource->story->zeroCase = 'zeroCase'; -$lang->resource->story->report = 'reportAction'; +$lang->resource->story->create = 'create'; +$lang->resource->story->batchCreate = 'batchCreate'; +$lang->resource->story->edit = 'edit'; +$lang->resource->story->linkStory = 'linkStory'; +$lang->resource->story->batchEdit = 'batchEdit'; +$lang->resource->story->export = 'exportAction'; +$lang->resource->story->delete = 'deleteAction'; +$lang->resource->story->view = 'view'; +$lang->resource->story->change = 'changeAction'; +$lang->resource->story->review = 'reviewAction'; +$lang->resource->story->batchReview = 'batchReview'; +$lang->resource->story->assignTo = 'assignAction'; +$lang->resource->story->close = 'closeAction'; +$lang->resource->story->batchClose = 'batchClose'; +$lang->resource->story->activate = 'activateAction'; +$lang->resource->story->tasks = 'tasks'; +$lang->resource->story->bugs = 'bugs'; +$lang->resource->story->cases = 'cases'; +$lang->resource->story->zeroCase = 'zeroCase'; +$lang->resource->story->report = 'reportAction'; $lang->resource->story->batchChangePlan = 'batchChangePlan'; $lang->resource->story->batchChangeBranch = 'batchChangeBranch'; $lang->resource->story->batchChangeStage = 'batchChangeStage'; $lang->resource->story->batchAssignTo = 'batchAssignTo'; $lang->resource->story->batchChangeModule = 'batchChangeModule'; +$lang->resource->story->batchToTask = 'batchToTask'; $lang->story->methodOrder[5] = 'create'; $lang->story->methodOrder[10] = 'batchCreate'; @@ -237,6 +238,7 @@ $lang->story->methodOrder[105] = 'report'; $lang->story->methodOrder[110] = 'linkStory'; $lang->story->methodOrder[115] = 'batchChangeBranch'; $lang->story->methodOrder[120] = 'batchChangeModule'; +$lang->story->methodOrder[125] = 'batchToTask'; /* Product plan. */ $lang->resource->productplan = new stdclass(); @@ -1477,6 +1479,8 @@ $lang->changelog['12.3'][] = 'testtask-importUnitResult'; $lang->changelog['12.3'][] = 'job-view'; $lang->changelog['12.3'][] = 'ci-commitResult'; +$lang->changelog['12.4.5'][] = 'story-batchToTask'; + global $config; if($config->global->flow != 'full') { diff --git a/module/install/control.php b/module/install/control.php index 20c31c0ddf..8ede07bb17 100644 --- a/module/install/control.php +++ b/module/install/control.php @@ -84,8 +84,12 @@ class install extends control $this->view->checkSession = $checkSession; if($checkSession) { - $this->view->sessionResult = $this->install->checkSessionSavePath(); - $this->view->sessionInfo = $this->install->getSessionSavePath(); + $sessionResult = $this->install->checkSessionSavePath(); + $sessionInfo = $this->install->getSessionSavePath(); + if($sessionInfo['path'] == '') $sessionResult = 'ok'; + + $this->view->sessionResult = $sessionResult; + $this->view->sessionInfo = $sessionInfo; } $this->display(); @@ -116,11 +120,36 @@ class install extends control $return = $this->install->checkConfig(); if($return->result == 'ok') { + /* Set the session save path when the session save path is null. */ + $customSession = false; + $checkSession = ini_get('session.save_handler') == 'files'; + if($checkSession) + { + if(!session_save_path()) + { + $tmpRootInfo = $this->install->getTmpRoot(); + $sessionSavePath = $tmpRootInfo['path'] . 'session'; + if(!is_dir($sessionSavePath)) mkdir($sessionSavePath, 0777, true); + + session_save_path($sessionSavePath); + $customSession = true; + + $sessionResult = $this->install->checkSessionSavePath(); + if($sessionResult == 'fail') chmod($sessionSavePath, 0777); + + /* Restart the session because the session save path is null when start the session last time. */ + session_write_close(); + session_start(); + $this->session->set('installing', true); + } + } + $this->view = (object)$_POST; - $this->view->app = $this->app; - $this->view->lang = $this->lang; - $this->view->config = $this->config; - $this->view->title = $this->lang->install->saveConfig; + $this->view->app = $this->app; + $this->view->lang = $this->lang; + $this->view->config = $this->config; + $this->view->title = $this->lang->install->saveConfig; + $this->view->customSession = $customSession; $this->display(); } else diff --git a/module/install/model.php b/module/install/model.php index ce1e4aa9ec..9f52b072ab 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -187,9 +187,9 @@ class installModel extends model */ public function getTmpRoot() { - $result['path'] = $this->app->getTmpRoot(); - $result['exists'] = is_dir($result['path']); - $result['writable']= is_writable($result['path']); + $result['path'] = $this->app->getTmpRoot(); + $result['exists'] = is_dir($result['path']); + $result['writable'] = is_writable($result['path']); return $result; } diff --git a/module/install/view/step1.html.php b/module/install/view/step1.html.php index bfabf7ea89..3d9e55e4cc 100644 --- a/module/install/view/step1.html.php +++ b/module/install/view/step1.html.php @@ -117,7 +117,7 @@ ?> - + install->session;?> @@ -128,16 +128,9 @@ install->$sessionResult;?> - install->sessionFail; - } + diff --git a/module/install/view/step3.html.php b/module/install/view/step3.html.php index 0240036b86..cfd76d0011 100644 --- a/module/install/view/step3.html.php +++ b/module/install/view/step3.html.php @@ -29,6 +29,7 @@ if(!isset($error)) \$config->webRoot = getWebRoot(); \$config->default->lang = '$defaultLang'; EOT; + if($customSession) $configContent .= "\n\$config->customSession = true;"; } ?>
diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index f6943b3b9a..cef75a175d 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -73,12 +73,12 @@ ?> - +
- /> + />
@@ -100,7 +100,7 @@ bug->resolutionList, $bug->resolution);?> id"; common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 37430d9aa8..4022afafec 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -63,14 +63,14 @@ createLink('story', 'view', "id=$story->id"); - $isClosedProject = common::checkParentObjectClosed('story', $story); + $storyLink = $this->createLink('story', 'view', "id=$story->id"); + $changeAllowed = common::checkObjectChangeAllowed('story', $story); ?>
- /> + />
@@ -86,7 +86,7 @@ story->stageList, $story->stage);?> id}"; common::printIcon('story', 'change', $vars, $story, 'list', 'fork'); @@ -105,7 +105,7 @@
- /> + />
@@ -121,7 +121,7 @@ story->stageList, $child->stage);?> id}"; common::printIcon('story', 'change', $vars, $child, 'list', 'fork'); diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 7bb8ce2cfc..a48eca713f 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -61,12 +61,12 @@ - +
- /> + />
@@ -93,7 +93,7 @@ needConfirm) { diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 06b41e941a..9fdf9645fc 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -67,15 +67,15 @@ case : $case->id; - $runID = $type == 'assigntome' ? $case->id : 0; - $isClosedProject = common::checkParentObjectClosed('testcase', $case); + $caseID = $type == 'assigntome' ? $case->case : $case->id; + $runID = $type == 'assigntome' ? $case->id : 0; + $changeAllowed = common::checkObjectChangeAllowed('testcase', $case); ?>
- /> + />
@@ -93,7 +93,7 @@ processStatus('testcase', $case);?> product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug'); common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$caseID", $case, 'list', 'copy'); diff --git a/module/product/model.php b/module/product/model.php index bc5f56bdfa..af646fad27 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -38,7 +38,8 @@ class productModel extends model /* init currentModule and currentMethod for report and story. */ if($currentModule == 'story') { - if($currentMethod != 'create' and $currentMethod != 'batchcreate') $currentModule = 'product'; + $method = ",create,batchcreate,batchclose,"; + if(strpos($method, "," . $currentMethod . ",") === false) $currentModule = 'product'; if($currentMethod == 'view' || $currentMethod == 'change' || $currentMethod == 'review') $currentMethod = 'browse'; } if($currentMethod == 'report') $currentMethod = 'browse'; diff --git a/module/productplan/control.php b/module/productplan/control.php index ab10ccc71f..948efa87dd 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -250,7 +250,7 @@ class productplan extends control $this->session->set('bugList', $this->app->getURI(true) . '&type=' . 'bug'); /* Determines whether an object is editable. */ - $changeAllowed = !common::checkParentObjectClosed('plan', $plan); + $changeAllowed = common::checkObjectChangeAllowed('plan', $plan); /* Load pager. */ $this->app->loadClass('pager', $static = true); diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 5e17ac3634..75fa9a882e 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -75,8 +75,8 @@ loadModel('file');?> file->replaceImgURL($plan, 'desc'); if($plan->parent == '-1') diff --git a/module/project/control.php b/module/project/control.php index 5d75a981b0..7672abbd4e 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1576,6 +1576,10 @@ class project extends control $project = $this->project->getById($projectID, true); if(!$project) die(js::error($this->lang->notFound) . js::locate('back')); + /* Determines whether an object is editable. */ + $changeAllowed = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $products = $this->project->getProducts($project->id); $linkedBranches = array(); foreach($products as $product) @@ -1600,18 +1604,19 @@ class project extends control $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); $this->view->position[] = $this->view->title; - $this->view->project = $project; - $this->view->products = $products; - $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); - $this->view->planGroups = $this->project->getPlans($products); - $this->view->groups = $this->loadModel('group')->getPairs(); - $this->view->actions = $this->loadModel('action')->getList('project', $projectID); - $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->teamMembers = $this->project->getTeamMembers($projectID); - $this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID); - $this->view->statData = $this->project->statRelatedData($projectID); - $this->view->chartData = $chartData; + $this->view->project = $project; + $this->view->products = $products; + $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); + $this->view->planGroups = $this->project->getPlans($products); + $this->view->groups = $this->loadModel('group')->getPairs(); + $this->view->actions = $this->loadModel('action')->getList('project', $projectID); + $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->teamMembers = $this->project->getTeamMembers($projectID); + $this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID); + $this->view->statData = $this->project->statRelatedData($projectID); + $this->view->chartData = $chartData; + $this->view->changeAllowed = $changeAllowed; $this->display(); } diff --git a/module/project/css/story.css b/module/project/css/story.css index c586920266..6a5602d049 100644 --- a/module/project/css/story.css +++ b/module/project/css/story.css @@ -4,3 +4,4 @@ tbody > tr > td > .btn-icon {margin-right: 4px} @media (max-width: 1200px) {#storyList .c-user, #storyList .c-estimate {display: none!important;}} @media (max-width: 1000px) {#storyList .c-status, #storyList .c-pri {display: none!important;}} @media (max-width: 820px) {#storyList .c-sort, #storyList .c-stage {display: none!important;}} +#batchToTask table tbody tr th{width: 110px;} diff --git a/module/project/js/story.js b/module/project/js/story.js index 532de6bbd9..a192075d65 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -28,9 +28,27 @@ $(function() parent.location.href = createLink('project', 'importPlanStories', 'projectID=' + projectID + '&planID=' + planID); } }) + + /* Get checked stories. */ + $('#batchToTaskButton').on('click', function () + { + var storyIdList = ''; + $("input[name^='storyIdList']:checked").each(function() + { + storyIdList += $(this).val() + ','; + $('#storyIdList').val(storyIdList); + }); + }) + $('.sorter-false a').unwrap(); }); +/** + * Show checked summary. + * + * @access public + * @return void + */ function showCheckedSummary() { var $summary = $('#main #mainContent form.main-table .table-header .table-statistic'); diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index e5005c6be9..0826aa0d29 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -75,8 +75,8 @@ @@ -101,7 +101,7 @@ bug->resolutionList, $bug->resolution);?> id"; common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index ead308f52a..856edb982c 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -74,7 +74,7 @@ builder);?> createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn' title='{$lang->build->linkStory}'"); } diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 5bbb5ac21c..40811dea4c 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -117,8 +117,9 @@ $canBatchClose = common::hasPriv('story', 'batchClose'); $canBatchChangeStage = common::hasPriv('story', 'batchChangeStage'); $canBatchUnlink = common::hasPriv('project', 'batchUnlinkStory'); + $canBatchToTask = common::hasPriv('story', 'batchToTask'); - $canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink); + $canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask); ?> id}&orderBy=%s&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> @@ -148,8 +149,8 @@ $story):?> createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id"); $totalEstimate += $story->estimate; @@ -198,7 +199,7 @@ id}&story={$story->id}&moduleID={$story->module}"; @@ -237,12 +238,21 @@
+
+ createLink('story', 'batchEdit', "productID=0&projectID=$project->id"); + echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled"); + ?> + + +
createLink('story', 'batchEdit', "productID=0&projectID=$project->id"); - echo html::commonButton($lang->edit, "data-form-action='$actionLink'"); - } if($canBatchClose) { $actionLink = $this->createLink('story', 'batchClose', "productID=0&projectID=$project->id"); @@ -298,6 +308,43 @@
+ + product->checkedSummary);?> id);?> diff --git a/module/project/view/storykanban.html.php b/module/project/view/storykanban.html.php index 74ccd51dfc..07435189f3 100644 --- a/module/project/view/storykanban.html.php +++ b/module/project/view/storykanban.html.php @@ -49,7 +49,7 @@ $account = $this->app->user->account;

story->noStory;?> - + createLink('project', 'linkStory', "project=$project->id"), " " . $lang->project->linkStory, '', "class='btn btn-info'");?>

diff --git a/module/project/view/testtask.html.php b/module/project/view/testtask.html.php index a468348743..15a068dc73 100644 --- a/module/project/view/testtask.html.php +++ b/module/project/view/testtask.html.php @@ -74,8 +74,8 @@ > @@ -102,7 +102,7 @@ id", $task, 'list', 'sitemap'); common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link'); diff --git a/module/project/view/treestory.html.php b/module/project/view/treestory.html.php index 593fb0ba83..436360f244 100644 --- a/module/project/view/treestory.html.php +++ b/module/project/view/treestory.html.php @@ -32,7 +32,7 @@ verify) ? $story->verify : "
" . $lang->noData . '
';?>
-fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true'));?> +fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true', 'object' => $story));?>
story->legendBasicInfo;?> @@ -341,7 +341,7 @@
-createLink('action', 'comment', "objectType=story&objectID=$story->id");?> +createLink('action', 'comment', "objectType=story&objectID=$story->id");?> +
todo->dayNames, isset($todo->config->week) ? $todo->config->week : '')?> diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index f9b57cf3a2..edb8be36cf 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -149,7 +149,18 @@ config->type == 'day') { - echo $lang->todo->every . $todo->config->day . $lang->day; + if(isset($todo->config->day)) echo $lang->todo->every . $todo->config->day . $lang->day; + + if(isset($todo->config->appointDate)) + { + $appointNotes = $lang->todo->appoint; + + if(isset($todo->config->cycleYear)) $appointNotes .= $lang->todo->everyYear; + + $appointNotes .= $todo->config->appoint->month . $lang->todo->cycleMonth . $todo->config->appoint->day . $lang->todo->day; + + echo $appointNotes; + } } elseif($todo->config->type == 'week') {