diff --git a/module/bug/model.php b/module/bug/model.php index dfd5705ccd..3c9f5dad23 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1606,6 +1606,7 @@ class bugModel extends model * Get bugs of a story. * * @param int $storyID + * @param int $projectID * @access public * @return array */ @@ -2507,16 +2508,16 @@ 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. */ - $changeAllowed = common::checkObjectChangeAllowed('bug', $bug); + $canBeChanged = common::checkObjectChangeAllowed('bug', $bug); - $canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit')); - $canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm')); + $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); + $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); - $canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule')); - $canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo')); + $canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule')); + $canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); @@ -2730,7 +2731,7 @@ class bugModel extends model break; case 'actions': $params = "bugID=$bug->id"; - if($changeAllowed) + if($canBeChanged) { common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index b37104f9d1..150243cbfc 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -117,7 +117,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow ?> - config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> " . $lang->bug->batchCreate, '', "class='btn btn-secondary'"); @@ -189,7 +189,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow

bug->noBug;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?> createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"), " " . $lang->bug->create, '', "class='btn btn-info'");?>

@@ -211,15 +211,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed'); - $canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit')); - $canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm')); + $canBeChanged = (!empty($config->CRProduct) or $product->status != 'closed'); + $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); + $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); - $canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule')); - $canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo')); + $canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule')); + $canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); ?> diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index bbe2bf8f82..7b76e84b72 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -268,10 +268,10 @@ js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
- fetch('my', 'buildContactLists'); - ?> + fetch('my', 'buildContactLists'); + ?>
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index a79713b707..540516b9cb 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -30,7 +30,7 @@
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
diff --git a/module/build/config.php b/module/build/config.php index 86715fa4b7..bcee51e703 100644 --- a/module/build/config.php +++ b/module/build/config.php @@ -13,7 +13,7 @@ global $lang; $config->build->search['module'] = 'build'; $config->build->search['fields']['name'] = $lang->build->name; $config->build->search['fields']['id'] = $lang->build->id; -$config->build->search['fields']['product'] = '所属' . $lang->build->product; +$config->build->search['fields']['product'] = $lang->story->product; $config->build->search['fields']['scmPath'] = $lang->build->scmPath; $config->build->search['fields']['filePath'] = $lang->build->filePath; $config->build->search['fields']['date'] = $lang->build->date; diff --git a/module/build/control.php b/module/build/control.php index ee60eb135f..329160c247 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::checkObjectChangeAllowed('build', $build); + $canBeChanged = 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]); @@ -261,18 +261,18 @@ class build extends control $this->executeHooks($buildID); /* Assign. */ - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->build = $build; - $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); - $this->view->actions = $this->loadModel('action')->getList('build', $buildID); - $this->view->link = $link; - $this->view->param = $param; - $this->view->orderBy = $orderBy; - $this->view->bugs = $bugs; - $this->view->type = $type; - $this->view->bugPager = $bugPager; - $this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch); - $this->view->changeAllowed = $changeAllowed; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->build = $build; + $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); + $this->view->actions = $this->loadModel('action')->getList('build', $buildID); + $this->view->link = $link; + $this->view->param = $param; + $this->view->orderBy = $orderBy; + $this->view->bugs = $bugs; + $this->view->type = $type; + $this->view->bugPager = $bugPager; + $this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch); + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/build/model.php b/module/build/model.php index b0a06424be..3a9157229e 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -58,7 +58,7 @@ class buildModel extends model * @access public * @return array */ - public function getProjectBuilds($projectID, $type, $param) + public function getProjectBuilds($projectID, $type = '', $param = '') { return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName, t4.name as branchName') ->from(TABLE_BUILD)->alias('t1') diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index bd53d2f43f..3da4c2abb6 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -48,7 +48,7 @@ tbody tr td:first-child input{display:none;}
deleted and $changeAllowed) + if(!$build->deleted and $canBeChanged) { echo $this->buildOperateMenu($build, 'view'); @@ -91,13 +91,13 @@ tbody tr td:first-child input{display:none;}
' id='stories'> - +
id, \"story\")", ' ' . $lang->build->linkStory, '', "class='btn btn-primary'");?>
id}")?>' id='linkedStoriesForm'> - + id}&type=story&link=$link¶m=$param&orderBy=%s";?> @@ -146,7 +146,7 @@ tbody tr td:first-child input{display:none;}
story->stageList[$story->stage];?> id&story=$story->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn btn-icon' title='{$lang->build->unlinkStory}'"); @@ -176,13 +176,13 @@ tbody tr td:first-child input{display:none;}
' id='bugs'> - +
id, \"bug\")", ' ' . $lang->build->linkBug, '', "class='btn btn-primary'");?>
id");?>" id='linkedBugsForm'> - + id}&type=bug&link=$link¶m=$param&orderBy=%s";?> @@ -227,7 +227,7 @@ tbody tr td:first-child input{display:none;} diff --git a/module/custom/view/project.html.php b/module/custom/view/project.html.php index 735bc35510..73b00ed52e 100644 --- a/module/custom/view/project.html.php +++ b/module/custom/view/project.html.php @@ -21,8 +21,8 @@ diff --git a/module/doc/control.php b/module/doc/control.php index 260e11bd74..5f0cdc16e9 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -447,10 +447,6 @@ class doc extends control $hyperdown = $this->app->loadClass('hyperdown'); $doc->content = $hyperdown->makeHtml($doc->content); - /* Add a newline attribute to the table. */ - $doc->content = str_replace(" diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index b73426ff4f..e9ce3e1968 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -63,10 +63,10 @@ diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index b77fad66d9..ab224bd850 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 1e32f50ed2..404635cb48 100644 --- a/module/doc/view/objectlibsbylist.html.php +++ b/module/doc/view/objectlibsbylist.html.php @@ -34,7 +34,7 @@
@@ -135,7 +135,7 @@ diff --git a/module/extension/lang/de.php b/module/extension/lang/de.php index f692487ef2..d19f603477 100644 --- a/module/extension/lang/de.php +++ b/module/extension/lang/de.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads'; $lang->extension->compatible = 'Kompatibilität'; $lang->extension->grade = 'Wertung'; $lang->extension->depends = 'Benötigt'; -$lang->extension->expireDate = 'Verfällt'; +$lang->extension->expiredDate = 'Verfällt'; $lang->extension->zentaoCompatible = 'Kompatible Version'; $lang->extension->installedTime = 'Installationszeit'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/en.php b/module/extension/lang/en.php index b2c0feb24c..5b0ca26401 100644 --- a/module/extension/lang/en.php +++ b/module/extension/lang/en.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads'; $lang->extension->compatible = 'Compatibility'; $lang->extension->grade = 'Score'; $lang->extension->depends = 'Dependency'; -$lang->extension->expireDate = 'Expire'; +$lang->extension->expiredDate = 'Expire'; $lang->extension->zentaoCompatible = 'Compatible Version'; $lang->extension->installedTime = 'Installed Time'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/fr.php b/module/extension/lang/fr.php index 2ac2c48056..b383567c32 100644 --- a/module/extension/lang/fr.php +++ b/module/extension/lang/fr.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Téléchargements'; $lang->extension->compatible = 'Compatibilité'; $lang->extension->grade = 'Score'; $lang->extension->depends = 'Dépendence'; -$lang->extension->expireDate = 'Expire le'; +$lang->extension->expiredDate = 'Expire le'; $lang->extension->zentaoCompatible = 'Version Compatible'; $lang->extension->installedTime = 'Date Installation'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/vi.php b/module/extension/lang/vi.php index 01c7a938c4..9336613174 100644 --- a/module/extension/lang/vi.php +++ b/module/extension/lang/vi.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads'; $lang->extension->compatible = 'Compatibility'; $lang->extension->grade = 'Điểm'; $lang->extension->depends = 'Dependency'; -$lang->extension->expireDate = 'Expire'; +$lang->extension->expiredDate = 'Expire'; $lang->extension->zentaoCompatible = 'Compatible Version'; $lang->extension->installedTime = 'Installed Time'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/zh-cn.php b/module/extension/lang/zh-cn.php index a157584c4d..6f64bbc913 100644 --- a/module/extension/lang/zh-cn.php +++ b/module/extension/lang/zh-cn.php @@ -51,7 +51,7 @@ $lang->extension->downloads = '下载量'; $lang->extension->compatible = '兼容性'; $lang->extension->grade = '评分'; $lang->extension->depends = '依赖'; -$lang->extension->expireDate = '到期日期'; +$lang->extension->expiredDate = '到期日期'; $lang->extension->zentaoCompatible = '适用版本'; $lang->extension->installedTime = '安装时间'; $lang->extension->life = '终身'; diff --git a/module/extension/lang/zh-tw.php b/module/extension/lang/zh-tw.php index 9298092656..7b3ea70b8f 100644 --- a/module/extension/lang/zh-tw.php +++ b/module/extension/lang/zh-tw.php @@ -51,7 +51,7 @@ $lang->extension->downloads = '下載量'; $lang->extension->compatible = '兼容性'; $lang->extension->grade = '評分'; $lang->extension->depends = '依賴'; -$lang->extension->expireDate = '到期日期'; +$lang->extension->expiredDate = '到期日期'; $lang->extension->zentaoCompatible = '適用版本'; $lang->extension->installedTime = '安裝時間'; $lang->extension->life = '終身'; diff --git a/module/extension/model.php b/module/extension/model.php index bf05963faf..9ab0ddfcc3 100644 --- a/module/extension/model.php +++ b/module/extension/model.php @@ -886,16 +886,16 @@ class extensionModel extends model /** * Get extension expire date. - * + * * @param int $extension * @access public - * @return void + * @return string */ public function getExpireDate($extension) { $licencePath = $this->app->getConfigRoot() . 'license/'; $today = date('Y-m-d'); - $expireDate = ''; + $expiredDate = ''; $licenceOrderFiles = glob($licencePath . 'order*' . $extension->code . $extension->version . '.txt'); foreach($licenceOrderFiles as $licenceOrderFile) @@ -908,14 +908,14 @@ class extensionModel extends model if($order->type == 'demo') $days = 31; if($order->type == 'year') $days = 365; $startDate = $order->paidDate != '0000-00-00 00:00:00' ? $order->paidDate : $order->createdDate; - if($days) $expireDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600); + if($days) $expiredDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600); } else { - $expireDate = $order->type; + $expiredDate = $order->type; } } - return $expireDate; + return $expiredDate; } } diff --git a/module/extension/view/browse.html.php b/module/extension/view/browse.html.php index 59bed96653..743a7b6952 100644 --- a/module/extension/view/browse.html.php +++ b/module/extension/view/browse.html.php @@ -54,14 +54,13 @@ extension->version}: {$extension->version} "; echo "{$lang->extension->author}: {$extension->author} "; - $expireDate = $this->extension->getExpireDate($extension); - - if(!empty($expireDate)) + $expiredDate = $this->extension->getExpireDate($extension); + if(!empty($expiredDate)) { - echo $lang->extension->expireDate . ': '; - if($expireDate != 'life') echo "{$expireDate}"; - else echo "{$lang->extension->life}"; + echo $lang->extension->expiredDate . ': '; + $expiredDate != 'life' ? echo "{$expiredDate}" : echo "{$lang->extension->life}"; } + ?> diff --git a/module/git/model.php b/module/git/model.php index 9a3dda53e6..3ccd32ae29 100644 --- a/module/git/model.php +++ b/module/git/model.php @@ -111,15 +111,15 @@ class gitModel extends model * * @param object $repo * @param array $commentGroup - * @param bool $isPrintLog + * @param bool $printLog * @access public * @return void */ - public function updateCommit($repo, $commentGroup, $isPrintLog = true) + public function updateCommit($repo, $commentGroup, $printLog = true) { /* Load mudule and print log. */ $this->loadModel('repo'); - if($isPrintLog) $this->printLog("begin repo $repo->id"); + if($printLog) $this->printLog("begin repo $repo->id"); if(!$this->setRepo($repo)) return false; @@ -130,17 +130,17 @@ class gitModel extends model /* Update code commit history. */ foreach($branches as $branch) { - if($isPrintLog) $this->printLog("sync branch $branch logs."); + if($printLog) $this->printLog("sync branch $branch logs."); $_COOKIE['repoBranch'] = $branch; - if($isPrintLog) $this->printLog("get this repo logs."); + if($printLog) $this->printLog("get this repo logs."); $lastInDB = $this->repo->getLatestCommit($repo->id); /* Ignore unsynced branch. */ if(empty($lastInDB)) { - if($isPrintLog) $this->printLog("Please init repo {$repo->name}"); + if($printLog) $this->printLog("Please init repo {$repo->name}"); continue; } @@ -149,18 +149,18 @@ class gitModel extends model $objects = array(); if(!empty($logs)) { - if($isPrintLog) $this->printLog("get " . count($logs) . " logs"); - if($isPrintLog) $this->printLog('begin parsing logs'); + if($printLog) $this->printLog("get " . count($logs) . " logs"); + if($printLog) $this->printLog('begin parsing logs'); foreach($logs as $log) { - if($isPrintLog) $this->printLog("parsing log {$log->revision}"); - if($isPrintLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); + if($printLog) $this->printLog("parsing log {$log->revision}"); + if($printLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); $objects = $this->repo->parseComment($log->msg); if($objects) { - if($isPrintLog) $this->printLog('extract' . + if($printLog) $this->printLog('extract' . ' story:' . join(' ', $objects['stories']) . ' task:' . join(' ', $objects['tasks']) . ' bug:' . join(',', $objects['bugs'])); @@ -169,7 +169,7 @@ class gitModel extends model } else { - if($isPrintLog) $this->printLog('no objects found' . "\n"); + if($printLog) $this->printLog('no objects found' . "\n"); } /* Create compile by comment. */ @@ -190,7 +190,7 @@ class gitModel extends model $this->repo->updateCommitCount($repo->id, $commits); $this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repo->id)->exec(); - if($isPrintLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished"); + if($printLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished"); } /** diff --git a/module/job/model.php b/module/job/model.php index e97931de37..d2663553a2 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -43,7 +43,7 @@ class jobModel extends model } /** - * Get list by triggerType field + * Get list by triggerType field. * * @param string $triggerType * @param array $repoIdList diff --git a/module/job/view/create.html.php b/module/job/view/create.html.php index 57f0345e31..b464750d7d 100644 --- a/module/job/view/create.html.php +++ b/module/job/view/create.html.php @@ -90,12 +90,12 @@ diff --git a/module/job/view/edit.html.php b/module/job/view/edit.html.php index 0baae7783a..aadc358efd 100644 --- a/module/job/view/edit.html.php +++ b/module/job/view/edit.html.php @@ -114,14 +114,22 @@ diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index cef75a175d..beb4899cd3 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -73,12 +73,12 @@ ?> - + createLink('story', 'view', "id=$story->id"); - $changeAllowed = common::checkObjectChangeAllowed('story', $story); + $storyLink = $this->createLink('story', 'view', "id=$story->id"); + $canBeChanged = common::checkObjectChangeAllowed('story', $story); ?> - + case : $case->id; - $runID = $type == 'assigntome' ? $case->id : 0; - $changeAllowed = common::checkObjectChangeAllowed('testcase', $case); + $caseID = $type == 'assigntome' ? $case->case : $case->id; + $runID = $type == 'assigntome' ? $case->id : 0; + $canBeChanged = common::checkObjectChangeAllowed('testcase', $case); ?> @@ -165,7 +165,7 @@
resolvedDate, 5, 11)?> id&bug=$bug->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn btn-icon' title='{$lang->build->unlinkBug}'"); diff --git a/module/common/model.php b/module/common/model.php index f64440276f..aed653968a 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1855,7 +1855,7 @@ EOD; global $app, $config; /* Check the product is closed. */ - if(!empty($object->product) and is_numeric($object->product) and !empty($config->global->closedProductStatus)) + if(!empty($object->product) and is_numeric($object->product) and empty($config->CRProduct)) { $productID = trim($object->product, ','); $product = $app->control->loadModel('product')->getByID($productID); @@ -1863,7 +1863,8 @@ EOD; } /* Check the project is closed. */ - if(strpos('story|bug|testtask', $module) === false and !empty($object->project) and is_numeric($object->project) and !empty($config->global->closedProjectStatus)) + $productModuleList = array('story', 'bug', 'testtask'); + if(!in_array($module, $productModuleList) and !empty($object->project) and is_numeric($object->project) and empty($config->CRProject)) { $project = $app->control->loadModel('project')->getByID($object->project); if($project->status == 'closed') return false; diff --git a/module/custom/control.php b/module/custom/control.php index 903b0edf79..0d1ce6e3b9 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -357,7 +357,7 @@ class custom extends control { if($_POST) { - $this->loadModel('setting')->setItem('system.common.global.closedProjectStatus', $this->post->project); + $this->loadModel('setting')->setItem('system.common.CRProject', $this->post->project); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } @@ -377,7 +377,7 @@ class custom extends control { if($_POST) { - $this->loadModel('setting')->setItem('system.common.global.closedProductStatus', $this->post->product); + $this->loadModel('setting')->setItem('system.common.CRProduct', $this->post->product); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 6cf9a0d17f..00ca85b3c4 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -153,11 +153,11 @@ $lang->custom->page = ' Page'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index d46abe9390..b498f8c401 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -153,11 +153,11 @@ $lang->custom->page = ' Page'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 1a3dc44bd5..8553c5fe0e 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -153,11 +153,11 @@ $lang->custom->page = ' Page'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php index 701bf485e0..2bb76b482d 100644 --- a/module/custom/lang/vi.php +++ b/module/custom/lang/vi.php @@ -153,11 +153,11 @@ $lang->custom->page = ''; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Kế hoạch'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 86bbbe20d4..7b492bc642 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -153,11 +153,11 @@ $lang->custom->page = '页面'; $lang->custom->scoreStatus[1] = '开启'; $lang->custom->scoreStatus[0] = '关闭'; -$lang->custom->closedProjectStatus[1] = '禁止修改'; -$lang->custom->closedProjectStatus[0] = '允许修改'; +$lang->custom->CRProject[1] = '禁止修改'; +$lang->custom->CRProject[0] = '允许修改'; -$lang->custom->closedProductStatus[1] = '禁止修改'; -$lang->custom->closedProductStatus[0] = '允许修改'; +$lang->custom->CRProduct[1] = '禁止修改'; +$lang->custom->CRProduct[0] = '允许修改'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = '计划'; diff --git a/module/custom/lang/zh-tw.php b/module/custom/lang/zh-tw.php index f08b4a3b39..edf42f5035 100644 --- a/module/custom/lang/zh-tw.php +++ b/module/custom/lang/zh-tw.php @@ -153,11 +153,11 @@ $lang->custom->page = '頁面'; $lang->custom->scoreStatus[1] = '開啟'; $lang->custom->scoreStatus[0] = '關閉'; -$lang->custom->closedProjectStatus[1] = '禁止修改'; -$lang->custom->closedProjectStatus[0] = '允許修改'; +$lang->custom->CRProject[1] = '禁止修改'; +$lang->custom->CRProject[0] = '允許修改'; -$lang->custom->closedProductStatus[1] = '禁止修改'; -$lang->custom->closedProductStatus[0] = '允許修改'; +$lang->custom->CRProduct[1] = '禁止修改'; +$lang->custom->CRProduct[0] = '允許修改'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = '計劃'; diff --git a/module/custom/view/product.html.php b/module/custom/view/product.html.php index 716c377e09..b1c064d45b 100644 --- a/module/custom/view/product.html.php +++ b/module/custom/view/product.html.php @@ -21,8 +21,8 @@
custom->closedProduct;?> - global->closedProductStatus) ? $config->global->closedProductStatus : 0;?> - custom->closedProductStatus as $key => $value):?> + global->CRProduct) ? $config->global->CRProduct : 0;?> + custom->CRProduct as $key => $value):?>
custom->closedProject;?> - global->closedProjectStatus) ? $config->global->closedProjectStatus : 0;?> - custom->closedProjectStatus as $key => $value):?> + global->CRProject) ? $config->global->CRProject : 0;?> + custom->CRProject as $key => $value):?> ", "", $doc->content); - $doc->content = str_replace("", "", $doc->content); - $doc->digest = $hyperdown->makeHtml($doc->digest); } @@ -759,9 +755,9 @@ class doc extends control $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); /* 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; + $canBeChanged = true; + if($type == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false; + if($type == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false; /* According the from, set menus. */ if($this->from == 'product') @@ -806,18 +802,18 @@ class doc extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->title = $object->name; - $this->view->position[] = $object->name; + $this->view->title = $object->name; + $this->view->position[] = $object->name; - $this->view->type = $type; - $this->view->object = $object; - $this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->pager = $pager; - $this->view->viewType = $viewType; - $this->view->orderBy = $orderBy; - $this->view->objectID = $objectID; - $this->view->changeAllowed = $changeAllowed; + $this->view->type = $type; + $this->view->object = $object; + $this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->pager = $pager; + $this->view->viewType = $viewType; + $this->view->orderBy = $orderBy; + $this->view->objectID = $objectID; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -859,9 +855,9 @@ class doc extends control 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; + $canBeChanged = true; + if($type == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false; + if($type == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false; if($from == 'product') { @@ -899,11 +895,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->changeAllowed = $changeAllowed; + $this->view->type = $type; + $this->view->object = $object; + $this->view->from = $from; + $this->view->libs = $this->doc->getLibsByObject($type, $objectID); + $this->view->canBeChanged = $canBeChanged; $this->display(); } } diff --git a/module/doc/css/view.css b/module/doc/css/view.css index 789fb7cf5f..3098bee6e3 100644 --- a/module/doc/css/view.css +++ b/module/doc/css/view.css @@ -19,3 +19,4 @@ .doc-fullscreen .main-row > .side-col {width: 0; position: relative; overflow: hidden} .doc-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972'} .right-icon a{color: #1183fb} +.cell th,td {word-break: break-word;} diff --git a/module/doc/model.php b/module/doc/model.php index baee999320..69c52605e0 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -111,11 +111,11 @@ class docModel extends model $docLib = new stdClass(); $docLib->product = $productID; $docLib->project = $projectID; - $changeAllowed = common::checkObjectChangeAllowed('doc', $docLib); + $canBeChanged = common::checkObjectChangeAllowed('doc', $docLib); $lib = isset($lib) ? $lib : new stdClass(); $actions = $this->setFastMenu($fastLib); - $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'") : ''; + $actions .= ($canBeChanged 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/create.html.php b/module/doc/view/create.html.php index d0438e8ff9..48a579d74e 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -86,10 +86,10 @@ doc->mailto;?>
- fetch('my', 'buildContactLists'); - ?> + fetch('my', 'buildContactLists'); + ?>
doc->mailto;?>
- mailto, "multiple class='form-control chosen'"); - echo $this->fetch('my', 'buildContactLists'); - ?> + mailto, "multiple class='form-control chosen'"); + echo $this->fetch('my', 'buildContactLists'); + ?>
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/showfiles.html.php b/module/doc/view/showfiles.html.php index 46eab0d8e8..a0e77b97fe 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -79,7 +79,7 @@ id", '', "data-toggle='modal'", "class='btn' title={$lang->doc->download}", true, false, $file); - if($changeAllowed) common::printLink('file', 'delete', "fileID=$file->id", '', 'hiddenwin', "class='btn' title={$lang->delete}", true, false, $file); + if($canBeChanged) common::printLink('file', 'delete', "fileID=$file->id", '', 'hiddenwin', "class='btn' title={$lang->delete}", true, false, $file); ?>
job->customParam;?>
- job->paramName; ?> - - job->paramValue; ?> - - - + job->paramName; ?> + + job->paramValue; ?> + + +
customParam) as $paramName => $paramValue):?>
- job->paramName; ?> - - job->paramValue; ?> - - - + job->paramName; ?> + + job->paramValue; ?> + + +
+
+ job->paramName; ?> + + job->paramValue; ?> + + + +
- /> + />
@@ -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 4022afafec..860cc550a1 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -63,14 +63,14 @@
- /> + />
@@ -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 a48eca713f..3d472fb57a 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 9fdf9645fc..0b84fc312f 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -67,15 +67,15 @@
- /> + />
@@ -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 af646fad27..7b0b98a576 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -38,8 +38,8 @@ class productModel extends model /* init currentModule and currentMethod for report and story. */ if($currentModule == 'story') { - $method = ",create,batchcreate,batchclose,"; - if(strpos($method, "," . $currentMethod . ",") === false) $currentModule = 'product'; + $storyMethods = ",create,batchcreate,batchclose,"; + if(strpos($storyMethods, "," . $currentMethod . ",") === false) $currentModule = 'product'; if($currentMethod == 'view' || $currentMethod == 'change' || $currentMethod == 'review') $currentMethod = 'browse'; } if($currentMethod == 'report') $currentMethod = 'browse'; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 3068fc47e1..5b30688c39 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -94,7 +94,7 @@ js::set('foldAll', $lang->project->treeLevel['root']); ?> - config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), " {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?> project->treeLevel['root']);

story->noStory;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('story', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('story', 'create')):?> createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}"), " " . $lang->story->create, '', "class='btn btn-info'");?>

@@ -189,15 +189,15 @@ js::set('foldAll', $lang->project->treeLevel['root']); $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed'); - $canBatchEdit = ($changeAllowed and common::hasPriv('story', 'batchEdit')); + $canBeChanged = (!empty($config->CRProduct) or $product->status != 'closed'); + $canBatchEdit = ($canBeChanged and common::hasPriv('story', 'batchEdit')); $canBatchClose = (common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory'); - $canBatchReview = ($changeAllowed and common::hasPriv('story', 'batchReview')); - $canBatchChangeStage = ($changeAllowed and common::hasPriv('story', 'batchChangeStage')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('story', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('story', 'batchChangeModule')); - $canBatchChangePlan = ($changeAllowed and common::hasPriv('story', 'batchChangePlan')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('story', 'batchAssignTo')); + $canBatchReview = ($canBeChanged and common::hasPriv('story', 'batchReview')); + $canBatchChangeStage = ($canBeChanged and common::hasPriv('story', 'batchChangeStage')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('story', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('story', 'batchChangeModule')); + $canBatchChangePlan = ($canBeChanged and common::hasPriv('story', 'batchChangePlan')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('story', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo); ?> diff --git a/module/product/view/roadmap.html.php b/module/product/view/roadmap.html.php index 4fdeee1b9c..90ebd428d0 100644 --- a/module/product/view/roadmap.html.php +++ b/module/product/view/roadmap.html.php @@ -41,7 +41,7 @@

release->noRelease;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> createLink('release', 'create', "productID=$product->id&branch=$branchKey"), " " . $lang->release->create, '', "class='btn btn-info'");?>

diff --git a/module/productplan/control.php b/module/productplan/control.php index 948efa87dd..c85fb01f13 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::checkObjectChangeAllowed('plan', $plan); + $canBeChanged = common::checkObjectChangeAllowed('plan', $plan); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -274,25 +274,25 @@ class productplan extends control if($plan->parent == '-1') $this->view->childrenPlans = $this->productplan->getChildren($plan->id); $this->loadModel('datatable'); - $this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($plan->product, 'story'); - $this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product]; - $this->view->position[] = $this->lang->productplan->view; - $this->view->planStories = $planStories; - $this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $sort : 'id_desc', $bugPager); - $this->view->products = $products; - $this->view->summary = $this->product->summary($this->view->planStories); - $this->view->plan = $plan; - $this->view->actions = $this->loadModel('action')->getList('productplan', $planID); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch); - $this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product); - $this->view->type = $type; - $this->view->orderBy = $orderBy; - $this->view->link = $link; - $this->view->param = $param; - $this->view->storyPager = $storyPager; - $this->view->bugPager = $bugPager; - $this->view->changeAllowed = $changeAllowed; + $this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($plan->product, 'story'); + $this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product]; + $this->view->position[] = $this->lang->productplan->view; + $this->view->planStories = $planStories; + $this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $sort : 'id_desc', $bugPager); + $this->view->products = $products; + $this->view->summary = $this->product->summary($this->view->planStories); + $this->view->plan = $plan; + $this->view->actions = $this->loadModel('action')->getList('productplan', $planID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch); + $this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product); + $this->view->type = $type; + $this->view->orderBy = $orderBy; + $this->view->link = $link; + $this->view->param = $param; + $this->view->storyPager = $storyPager; + $this->view->bugPager = $bugPager; + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 75fa9a882e..68e197cac0 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -24,7 +24,7 @@
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> id&branch=$branch", " {$lang->productplan->create}", '', "class='btn btn-primary'");?>
@@ -34,7 +34,7 @@

productplan->noPlan;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?> createLink('productplan', 'create', "productID=$product->id&branch=$branch"), " " . $lang->productplan->create, '', "class='btn btn-info'");?>

@@ -75,8 +75,8 @@ loadModel('file');?> file->replaceImgURL($plan, 'desc'); if($plan->parent == '-1') @@ -100,7 +100,7 @@
- id => ''), '', $disabled) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?> + id => ''), '', $attribute) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?> id);?> diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index 03476cd12b..b3105d69fb 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -62,7 +62,7 @@
'>
- deleted and $plan->parent >= 0 and $changeAllowed):?> + deleted and $plan->parent >= 0 and $canBeChanged):?>
story->stageList[$story->stage];?> createLink('productplan', 'unlinkStory', "story=$story->id&plan=$plan->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn' title='{$lang->productplan->unlinkStory}'"); @@ -363,7 +363,7 @@ id&orderBy=$orderBy");?>"> - + id}&type=bug&orderBy=%s&link=$link¶m=$param"; ?> @@ -404,7 +404,7 @@ $story):?> createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id"); - $totalEstimate += $story->estimate; + $storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id"); + $totalEstimate += $story->estimate; ?> - + @@ -77,7 +77,7 @@ - + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> - + '> - + ";?>
createLink('productplan', 'unlinkBug', "story=$bug->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn' title='{$lang->productplan->unlinkBug}'"); diff --git a/module/project/control.php b/module/project/control.php index 18b28157d9..2196d68261 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -128,6 +128,10 @@ class project extends control $products = $this->config->global->flow == 'onlyTask' ? array() : $this->loadModel('product')->getProductsByProject($projectID); setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true); + /* Determines whether an object is editable. */ + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; + if($this->cookie->preProjectID != $projectID) { $_COOKIE['moduleBrowseParam'] = $_COOKIE['productBrowseParam'] = 0; @@ -197,26 +201,27 @@ class project extends control $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($projectID, 'task', $showModule) : array(); /* Assign. */ - $this->view->tasks = $tasks; - $this->view->summary = $this->project->summary($tasks); - $this->view->tabID = 'task'; - $this->view->pager = $pager; - $this->view->recTotal = $pager->recTotal; - $this->view->recPerPage = $pager->recPerPage; - $this->view->orderBy = $orderBy; - $this->view->browseType = $browseType; - $this->view->status = $status; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->param = $param; - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->productID = $productID; - $this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : ''); - $this->view->moduleID = $moduleID; - $this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra); - $this->view->memberPairs = $memberPairs; - $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty'); - $this->view->setModule = true; + $this->view->tasks = $tasks; + $this->view->summary = $this->project->summary($tasks); + $this->view->tabID = 'task'; + $this->view->pager = $pager; + $this->view->recTotal = $pager->recTotal; + $this->view->recPerPage = $pager->recPerPage; + $this->view->orderBy = $orderBy; + $this->view->browseType = $browseType; + $this->view->status = $status; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->param = $param; + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->productID = $productID; + $this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : ''); + $this->view->moduleID = $moduleID; + $this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra); + $this->view->memberPairs = $memberPairs; + $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty'); + $this->view->setModule = true; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -697,8 +702,8 @@ class project extends control $projectID = $project->id; /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -760,25 +765,25 @@ class project extends control if($productPairs) $productID = key($productPairs); /* Assign. */ - $this->view->title = $title; - $this->view->position = $position; - $this->view->productID = $productID; - $this->view->project = $project; - $this->view->stories = $stories; - $this->view->allPlans = $allPlans; - $this->view->summary = $this->product->summary($stories); - $this->view->orderBy = $orderBy; - $this->view->type = $this->session->projectStoryBrowseType; - $this->view->param = $param; - $this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink')); - $this->view->tabID = 'story'; - $this->view->storyTasks = $storyTasks; - $this->view->storyBugs = $storyBugs; - $this->view->storyCases = $storyCases; - $this->view->users = $users; - $this->view->pager = $pager; - $this->view->branchGroups = $branchGroups; - $this->view->changeAllowed = $changeAllowed; + $this->view->title = $title; + $this->view->position = $position; + $this->view->productID = $productID; + $this->view->project = $project; + $this->view->stories = $stories; + $this->view->allPlans = $allPlans; + $this->view->summary = $this->product->summary($stories); + $this->view->orderBy = $orderBy; + $this->view->type = $this->session->projectStoryBrowseType; + $this->view->param = $param; + $this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink')); + $this->view->tabID = 'story'; + $this->view->storyTasks = $storyTasks; + $this->view->storyBugs = $storyBugs; + $this->view->storyCases = $storyCases; + $this->view->users = $users; + $this->view->pager = $pager; + $this->view->branchGroups = $branchGroups; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -939,8 +944,8 @@ class project extends control $projectID = $project->id; /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -951,18 +956,18 @@ class project extends control $tasks = $this->testtask->getProjectTasks($projectID, $orderBy, $pager); foreach($tasks as $key => $task) $productTasks[$task->product][] = $task; - $this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common; - $this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]); - $this->view->position[] = $this->lang->testtask->common; - $this->view->project = $project; - $this->view->projectID = $projectID; - $this->view->projectName = $this->projects[$projectID]; - $this->view->pager = $pager; - $this->view->orderBy = $orderBy; - $this->view->tasks = $productTasks; - $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); - $this->view->products = $this->loadModel('product')->getPairs(); - $this->view->changeAllowed = $changeAllowed; + $this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common; + $this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]); + $this->view->position[] = $this->lang->testtask->common; + $this->view->project = $project; + $this->view->projectID = $projectID; + $this->view->projectName = $this->projects[$projectID]; + $this->view->pager = $pager; + $this->view->orderBy = $orderBy; + $this->view->tasks = $productTasks; + $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); + $this->view->products = $this->loadModel('product')->getPairs(); + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1059,16 +1064,16 @@ class project extends control $projectID = $project->id; /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; $title = $project->name . $this->lang->colon . $this->lang->project->team; $position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); $position[] = $this->lang->project->team; - $this->view->title = $title; - $this->view->position = $position; - $this->view->changeAllowed = $changeAllowed; + $this->view->title = $title; + $this->view->position = $position; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1587,8 +1592,8 @@ class project extends control 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; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; $products = $this->project->getProducts($project->id); $linkedBranches = array(); @@ -1614,19 +1619,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->changeAllowed = $changeAllowed; + $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->canBeChanged = $canBeChanged; $this->display(); } @@ -1658,8 +1663,8 @@ class project extends control $stories = $this->loadModel('story')->getProjectStories($projectID, $orderBy); /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; $kanbanGroup = $this->project->getKanbanGroupData($stories, $tasks, $bugs, $type); $kanbanSetting = $this->project->getKanbanSetting(); @@ -1677,10 +1682,10 @@ class project extends control $this->view->type = $type; $this->view->kanbanGroup = $kanbanGroup; $this->view->kanbanColumns = $this->project->getKanbanColumns($kanbanSetting); - $this->view->statusMap = $changeAllowed ? $this->project->getKanbanStatusMap($kanbanSetting) : array(); + $this->view->statusMap = $canBeChanged ? $this->project->getKanbanStatusMap($kanbanSetting) : array(); $this->view->statusList = $this->project->getKanbanStatusList($kanbanSetting); $this->view->colorList = $this->project->getKanbanColorList($kanbanSetting); - $this->view->changeAllowed = $changeAllowed; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1851,23 +1856,23 @@ class project extends control $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false); /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; /* Get project's product. */ $productID = 0; $productPairs = $this->loadModel('product')->getProductsByProject($projectID); if($productPairs) $productID = key($productPairs); - $this->view->title = $this->lang->project->storyKanban; - $this->view->position[] = html::a($this->createLink('project', 'story', "projectID=$projectID"), $project->name); - $this->view->position[] = $this->lang->project->storyKanban; - $this->view->stories = $this->story->getKanbanGroupData($stories); - $this->view->realnames = $this->loadModel('user')->getPairs('noletter'); - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->productID = $productID; - $this->view->changeAllowed = $changeAllowed; + $this->view->title = $this->lang->project->storyKanban; + $this->view->position[] = html::a($this->createLink('project', 'story', "projectID=$projectID"), $project->name); + $this->view->position[] = $this->lang->project->storyKanban; + $this->view->stories = $this->story->getKanbanGroupData($stories); + $this->view->realnames = $this->loadModel('user')->getPairs('noletter'); + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->productID = $productID; + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/project/js/story.js b/module/project/js/story.js index a192075d65..e4c34b0054 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -38,7 +38,22 @@ $(function() storyIdList += $(this).val() + ','; $('#storyIdList').val(storyIdList); }); - }) + }); + + /* Judge required. */ + $('#batchToTask #submit').on('click', function () + { + var message = ''; + if($('#batchToTask #type').val() == '') message = typeError; + + if($('#batchToTask #hourPointValue').val() == '') message += workingHourError; + + if(message) + { + alert(message); + return false; + } + }); $('.sorter-false a').unwrap(); }); diff --git a/module/project/js/storykanban.js b/module/project/js/storykanban.js index ec9840aabe..aa43e2dc23 100644 --- a/module/project/js/storykanban.js +++ b/module/project/js/storykanban.js @@ -5,7 +5,7 @@ $(function() var $kanban = $('#kanban'); var stageMap = new Object(); - if(changeAllowed) + if(canBeChanged) { stageMap = { diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 0826aa0d29..f7a151c82b 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -75,13 +75,13 @@
- id => ''), '', $disabled) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> id);?> @@ -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/kanban.html.php b/module/project/view/kanban.html.php index b692628edd..3f26e92642 100644 --- a/module/project/view/kanban.html.php +++ b/module/project/view/kanban.html.php @@ -18,7 +18,7 @@ $link = $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=kanban"); if(common::hasPriv('task', 'export')) echo html::a($link, " " . $lang->task->export, '', "class='btn btn-link iframe export' data-width='700'"); ?> - +
@@ -149,8 +151,8 @@
@@ -197,7 +199,7 @@ id}&story={$story->id}&moduleID={$story->module}"; @@ -218,7 +220,7 @@ $lang->testcase->batchCreate = $lang->testcase->create; if($productID && $hasDBPriv) common::printIcon('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', 'list', 'sitemap'); - if($changeAllowed and common::hasPriv('project', 'unlinkStory', $project)) + if($canBeChanged and common::hasPriv('project', 'unlinkStory', $project)) { $unlinkURL = $this->createLink('project', 'unlinkStory', "projectID=$project->id&storyID=$story->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn' title='{$lang->project->unlinkStory}'"); diff --git a/module/project/view/storykanban.html.php b/module/project/view/storykanban.html.php index 07435189f3..79a2ebb2e4 100644 --- a/module/project/view/storykanban.html.php +++ b/module/project/view/storykanban.html.php @@ -10,7 +10,7 @@ ?> project->confirmUnlinkStory)?> - + app->user->account;

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

@@ -77,7 +77,7 @@ $account = $this->app->user->account;
story->priList, $story->pri);?> story->statusList[$story->status];?> - +
createLink('project', 'unlinkStory', "projectID=$projectID&story=$story->id"), "", 'hiddenwin', "title='{$lang->project->unlinkStory}'");?>
estimate . 'h ';?>
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 1d3a45b21c..3089da8a74 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -136,23 +136,19 @@ js::set('foldAll', $lang->project->treeLevel['root']);
- project = $projectID; - ?> createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); - if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); + if($canBeChanged and common::hasPriv('task', 'batchCreate')) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")); - if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); + if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); ?> "; $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")); - if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create} ", '', "class='btn btn-primary'"); + if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, " {$lang->task->create} ", '', "class='btn btn-primary'"); ?>
team->totalHours;?> team->limited;?> actions;?>
hours . $lang->project->workHour;?> project->workHour;?> team->limitedList[$member->limited];?>
testtask->product);?> @@ -98,7 +98,7 @@ id", $task, 'list', 'sitemap'); common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link'); diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index 7c47a1ab66..29cbf9bed6 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -102,7 +102,7 @@
- id", "  " . $lang->project->manageMembers, '', "class='text-muted'");?> + id", "  " . $lang->project->manageMembers, '', "class='text-muted'");?>
@@ -133,7 +133,7 @@
- id", "  " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?> + id", "  " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 73f0de5dcb..48ddcbc5fd 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -22,7 +22,7 @@ ?>
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> id&branch=$branch", " {$lang->release->create}", '', "class='btn btn-primary'");?>
@@ -32,7 +32,7 @@

release->noRelease;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> createLink('release', 'create', "productID=$product->id&branch=$branch"), " " . $lang->release->create, '', "class='btn btn-info'");?>

@@ -58,7 +58,7 @@
id"), sprintf('%03d', $release->id));?> @@ -79,7 +79,7 @@ " . $this->loadModel('flow')->getFieldValue($extendField, $release) . " id&type=story&link=true"), ' ', '', "class='btn' title='{$lang->release->linkStory}'"); if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), ' ', '', "class='btn' title='{$lang->release->linkBug}'"); diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index bfd784c9a2..074249bf1d 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -31,9 +31,9 @@
deleted and $changeAllowed) + if(!$release->deleted and $canBeChanged) { echo $this->buildOperateMenu($release, 'view'); @@ -66,7 +66,7 @@
' id='stories'> - +
id}, \"story\")", ' ' . $lang->release->linkStory, '', "class='btn btn-primary'");?>
@@ -80,7 +80,7 @@
- +
@@ -101,7 +101,7 @@ createLink('story', 'view', "storyID=$story->id", '', true);?>
- +
@@ -124,7 +124,7 @@
story->stageList[$story->stage];?> createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn' title='{$lang->release->unlinkStory}'"); @@ -136,7 +136,7 @@
- +
@@ -196,7 +196,7 @@ createLink('bug', 'view', "bugID=$bug->id", '', true);?>
- +
@@ -214,7 +214,7 @@
resolvedDate, 5, 11)?> createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn' title='{$lang->release->unlinkBug}'"); @@ -226,7 +226,7 @@
- +
@@ -284,7 +284,7 @@ createLink('bug', 'view', "bugID=$bug->id", '', true);?>
- +
@@ -305,7 +305,7 @@
openedDate?> createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '', '', "class='btn' title='{$lang->release->unlinkBug}'"); @@ -317,7 +317,7 @@
- +
tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?>
@@ -159,7 +159,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;} - + goback, '', "class='btn btn-wide'");?> @@ -265,10 +265,10 @@ $(function() } }; - if() options.actions["sort"] = false; - if() options.actions["edit"] = false; - if() options.actions["delete"] = false; - if() options.actions["subModules"] = false; + if() options.actions["sort"] = false; + if() options.actions["edit"] = false; + if() options.actions["delete"] = false; + if() options.actions["subModules"] = false; var $tree = $('#modulesTree').tree(options); diff --git a/module/tree/view/browsetask.html.php b/module/tree/view/browsetask.html.php index 6c1c7f5cec..339e4bb891 100644 --- a/module/tree/view/browsetask.html.php +++ b/module/tree/view/browsetask.html.php @@ -112,7 +112,7 @@ li.story-item > .tree-actions .tree-action[data-type=delete]{display:none;} goback, '', "class='btn btn-wide'"); echo html::hidden('parentModuleID', $currentModuleID); echo html::hidden('maxOrder', $maxOrder); @@ -216,10 +216,10 @@ $(function() } }; - if() options.actions["sort"] = false; - if() options.actions["edit"] = false; - if() options.actions["delete"] = false; - if() options.actions["subModules"] = false; + if() options.actions["sort"] = false; + if() options.actions["edit"] = false; + if() options.actions["delete"] = false; + if() options.actions["subModules"] = false; var $tree = $('#modulesTree').tree(options);