* [task#138368] fix bug for linkd build in story view.

This commit is contained in:
liyang
2025-02-26 13:59:51 +08:00
committed by 曹延义
parent b4d159915f
commit ee9ff2c0ea
2 changed files with 2 additions and 3 deletions
+1
View File
@@ -36,6 +36,7 @@ class relatedList extends wg
if(isset($item->branchName)) $info['leading']['html'] = wg(branchLabel::create($item->branch, $item->branchName))->render() . $info['leading']['html'];
$props = isset($group['props']) ? $group['props'] : array('data-toggle' => 'modal', 'data-size' => 'lg');
if($type == 'build' && empty($item->execution)) $props['data-app'] = 'project';
if($props) $info = array_merge($info, $props);
return $info;
+1 -3
View File
@@ -61,8 +61,6 @@ class relatedObjectList extends relatedList
if(!isset($relatedObjectTypeList[$relatedObjectType])) $relatedObjectTypeList[$relatedObjectType] = $app->loadLang($relatedObjectType)->$relatedObjectType->common;
$itemType = $relatedObjectTypeList[$relatedObjectType];
}
$tab = $app->tab == 'product' ? 'project' : $app->tab;
if($app->tab == 'system') $tab = 'project';
$item = new stdClass();
$item->id = $relatedObjectID;
@@ -70,7 +68,7 @@ class relatedObjectList extends relatedList
$item->type = $itemType;
$item->url = !empty($relatedObjectInfo['url']) ? $relatedObjectInfo['url'] : null;
$item->titleAttrs = !empty($relatedObjectInfo['url']) && !in_array($relatedObjectType, array('repocommit', 'commit', 'mr', 'release', 'build')) ? array('data-toggle' => 'modal', 'data-size' => 'lg') : null;
$item->titleAttrs = !empty($relatedObjectInfo['url']) && $relatedObjectType == 'build' ? array('data-app' => $tab) : null;
$item->titleAttrs = !empty($relatedObjectInfo['url']) && $relatedObjectType == 'build' ? array('data-app' => zget($relatedObjectInfo, 'tab', '')) : null;
if(isset($relatedObjectInfo['status'])) $item->status = $relatedObjectInfo['status'];
if(hasPriv('custom', 'removeObjects'))