diff --git a/module/block/control.php b/module/block/control.php index d3483b2d07..55475bd481 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -1951,6 +1951,11 @@ class block extends control $hasViewPriv['review'] = true; $count['review'] = count($reviews); $this->view->reviews = $reviews; + if($this->config->edition == 'max') + { + $this->app->loadLang('approval'); + $this->view->flows = $this->dao->select('module,name')->from(TABLE_WORKFLOW)->where('buildin')->eq(0)->fetchPairs('module', 'name'); + } } $this->view->selfCall = $this->selfCall; diff --git a/module/block/view/reviewblock.html.php b/module/block/view/reviewblock.html.php index b379ef8713..cd32e23dfc 100644 --- a/module/block/view/reviewblock.html.php +++ b/module/block/view/reviewblock.html.php @@ -29,13 +29,21 @@ type; - if($type == 'project') $type = 'review'; + if($type == 'projectreview') $type = 'review'; - $typeName = $lang->$type->common; + $typeName = ''; + if(isset($lang->{$review->type}->common)) $typeName = $lang->{$review->type}->common; if($type == 'story') $typeName = $lang->my->auditMenu->audit->story; + if($review->type == 'projectreview') $typeName = $lang->project->common; + if(isset($flows[$review->type])) $typeName = $flows[$review->type]; - $statusList = $lang->$type->statusList; + $statusList = array(); + if(isset($lang->$type->statusList)) $statusList = $lang->$type->statusList; if($type == 'attend') $statusList = $lang->attend->reviewStatusList; + if(!in_array($type, array('story', 'testcase', 'feedback', 'review')) and strpos(",{$config->my->oaObjectType},", ",$type,") === false) + { + $statusList = $lang->approval->nodeList; + } ?> id?> @@ -82,6 +90,10 @@ { common::printLink($module, 'view', $params, $reviewIcon, '', "class='btn' data-toggle='modal' title='{$lang->review->common}'", true, true); } + elseif(!in_array($module, array('story', 'testcase', 'feedback'))) + { + common::printLink($module, 'approvalreview', $params, $reviewIcon, '', "class='btn' data-toggle='modal' title='{$lang->review->common}'", true, true); + } else { common::printLink($module, $method, $params, $reviewIcon, '', "class='btn iframe' title='{$lang->review->common}'", true, true);