diff --git a/module/artifactrepo/control.php b/module/artifactrepo/control.php index fdb9577351..9f62c2fcab 100644 --- a/module/artifactrepo/control.php +++ b/module/artifactrepo/control.php @@ -38,7 +38,7 @@ class artifactrepo extends control $this->view->recTotal = $recTotal; $this->view->recPerPage = $recPerPage; $this->view->artifactRepos = $artifactRepos; - $this->view->products = $this->loadModel('product')->getPairs('', 0, '', 'all'); + $this->view->products = $this->loadModel('product')->getPairs('all', 0, '', 'all'); $this->view->pageLink = $this->createLink('artifactrepo', 'browse', "browseType={$browseType}&orderBy={$orderBy}&recTotal={$recTotal}&recPerPage={$recPerPage}&pageID={$pageID}"); $this->display(); @@ -105,9 +105,14 @@ class artifactrepo extends control $artifactRepo = $this->artifactrepo->getByID($artifactRepoID); + $products = $this->loadModel('product')->getPairs('', 0, '', 'all'); + $linkedProducts = $this->loadModel('product')->getByIdList(explode(',', $artifactRepo->products)); + $linkedProductPairs = array_combine(array_keys($linkedProducts), helper::arrayColumn($linkedProducts, 'name')); + $products = $products + $linkedProductPairs; + $this->view->title = $this->lang->artifactrepo->edit; $this->view->artifactRepo = $artifactRepo; - $this->view->products = $this->loadModel('product')->getPairs('', 0, '', 'all'); + $this->view->products = $products; $this->display(); } diff --git a/module/artifactrepo/ui/browse.html.php b/module/artifactrepo/ui/browse.html.php index 2bf93ea6fe..70b0ed995b 100644 --- a/module/artifactrepo/ui/browse.html.php +++ b/module/artifactrepo/ui/browse.html.php @@ -26,8 +26,9 @@ foreach($artifactRepos as $repo) foreach($productList as $productID) { if(!isset($products[$productID])) continue; - $repo->productNames .= ' ' . zget($products, $productID, $productID); + $repo->productNames .= ', ' . zget($products, $productID, $productID); } + $repo->productNames = trim($repo->productNames, ', '); } } $artifactRepos = initTableData($artifactRepos, $config->artifactrepo->dtable->fieldList, $this->artifactrepo); diff --git a/module/repo/control.php b/module/repo/control.php index f1b9145eb4..4d9bd54726 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -99,7 +99,7 @@ class repo extends control } $successJobs = $this->loadModel('compile')->getSuccessJobs($jobIDList); - $products = $this->loadModel('product')->getPairs('', 0, '', 'all'); + $products = $this->loadModel('product')->getPairs('all', 0, '', 'all'); $projects = $this->loadModel('project')->getPairs(); session_start(); diff --git a/module/repo/ui/maintain.html.php b/module/repo/ui/maintain.html.php index 3ae6cf3449..a38c9c0694 100644 --- a/module/repo/ui/maintain.html.php +++ b/module/repo/ui/maintain.html.php @@ -35,8 +35,9 @@ foreach($repoList as $repo) foreach($productList as $productID) { if(!isset($products[$productID])) continue; - $repo->productNames .= ' ' . zget($products, $productID, $productID); + $repo->productNames .= ', ' . zget($products, $productID, $productID); } + $repo->productNames = trim($repo->productNames, ', '); } $repo->projectNames = '';