* [task#123529,done,0.5h] add custom cols in project release.

This commit is contained in:
sunguangming
2024-07-29 10:46:30 +08:00
committed by 代婷婷
parent aafc928444
commit 2f56082eb1
2 changed files with 9 additions and 10 deletions
+2 -5
View File
@@ -68,11 +68,8 @@ class projectrelease extends control
$showBranch = false;
foreach($releases as $release)
{
if($release->productType != 'normal')
{
$showBranch = true;
break;
}
$release->desc = strip_tags($release->desc);
if($release->productType != 'normal') $showBranch = true;
}
$project = $this->project->getByID($projectID);
+7 -5
View File
@@ -31,15 +31,17 @@ toolbar
jsVar('markerTitle', $lang->release->marker);
jsVar('canViewProjectbuild', hasPriv('projectbuild', 'view'));
if(!$showBranch) unset($config->projectrelease->dtable->fieldList['branch']);
$config->projectrelease->dtable->fieldList['product']['map'] = $products;
if(empty($project->hasProduct)) unset($config->projectrelease->dtable->fieldList['product']);
$cols = $this->loadModel('datatable')->getSetting('projectrelease');
if(!$showBranch) unset($cols['branch']);
$cols['product']['map'] = $products;
if(empty($project->hasProduct)) unset($cols['product']);
$tableData = initTableData($releases, $config->projectrelease->dtable->fieldList);
$tableData = initTableData($releases, $cols);
dtable
(
set::cols($config->projectrelease->dtable->fieldList),
set::cols(array_values($cols)),
set::data($tableData),
set::customCols(true),
set::fixedLeftWidth('0.33'),
set::onRenderCell(jsRaw('window.renderCell')),
set::sortLink(createLink('projectrelease', 'browse', "projectID={$project->id}&executionID={$executionID}&type={$type}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")),