diff --git a/module/doc/model.php b/module/doc/model.php index b30f1bab6b..50c9137d81 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1823,19 +1823,43 @@ class docModel extends model { if($type != 'custom' and $type != 'book' and empty($objects)) return ''; - $output = ''; + $output = ''; + $closedProjectsHtml = ''; + $clseedProjects = array(); + $maxHeight = ($type == 'project' and $this->app->openApp == 'doc') ? '260px' : '290px'; + $class = ($type == 'project' and $this->app->openApp == 'doc') ? 'col-left' : ''; if($this->app->openApp == 'doc' and $type != 'custom' and $type != 'book') { - $output = "
"; } - $output .= ""; } if(!empty($libs)) diff --git a/module/job/control.php b/module/job/control.php index ee9791f323..0854d711a1 100644 --- a/module/job/control.php +++ b/module/job/control.php @@ -254,12 +254,30 @@ class job extends control * * @param int $repoID * @access public - * @return void + * @return string */ public function ajaxGetProductByRepo($repoID) { $repo = $this->loadModel('repo')->getRepoByID($repoID); - if($repo) return $repo->product; - die(js::error("Access Violation. 非法访问。")); + if(empty($repo)) die(json_encode(array(""=>""))); + + $product = $repo->product; + if(strpos($product, ',')) + { + $productList = explode(',', $product); + $matchedProducts = array(); + $productPair = $this->loadModel('product')->getPairs(); + foreach($productList as $productLeft) + { + foreach($productPair as $productRight => $productName) + { + if($productLeft == $productRight) $matchedProducts[$productName] = $productRight; + } + } + die(json_encode($matchedProduct)); + } + + $productName = $this->loadModel('product')->getByID($repo->product)->name; + die(json_encode(array($productName => $repo->product))); } } diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 89a93144a0..51d1d81276 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -46,8 +46,13 @@ > ' title='name?>'> - type == 'program' ? ' table-nest-toggle' : '';?> - + type == 'program') $icon = ' icon-program'; + if($program->type == 'project') $icon = ' icon-common icon-' . (isset($this->config->maxVersion) ? $program->model : $program->type); + $class = $program->type == 'program' ? ' table-nest-toggle' : ''; + ?> + type == 'program'):?> createLink('program', 'product', "programID=$program->id"), $program->name);?> @@ -132,7 +137,10 @@ #programList > thead > tr > th .table-nest-toggle-global {top: 6px} #programList > thead > tr > th .table-nest-toggle-global:before {color: #a6aab8;} #programTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;} -#programTableList .icon-project:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px} +#programTableList .icon-common:before {width: 22px; height: 22px; background: none; color: rgb(166, 170, 184); top: 0; line-height: 22px; margin-right: 2px; font-size: 14px} +#programTableList .icon-project:before {content: '\e99c';} +#programTableList .icon-scrum:before {content: '\e9a2';} +#programTableList .icon-waterfall:before {content: '\e9a4';}