* Code for task #89135.

This commit is contained in:
tianshujie
2023-03-29 09:43:22 +08:00
parent cac850f620
commit 5b1a4ebfba
2 changed files with 7 additions and 12 deletions
+4 -3
View File
@@ -182,7 +182,7 @@ class doc extends control
$executionPairs[$id] = $executionPrefix . $execution->name;
}
}
if($type == 'executions') $objects = $executionPairs;
if($type == 'execution') $objects = $executionPairs;
}
if($type == 'execution')
@@ -248,7 +248,8 @@ class doc extends control
}
$lib = $this->doc->getLibByID($libID);
if(!empty($lib->product)) $this->view->product = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->eq($lib->product)->fetch();
if(!empty($lib->product)) $this->view->object = $this->product->getByID($lib->product);
if(!empty($lib->project) and empty($lib->execution)) $this->view->object = $this->project->getById($lib->project);
if(!empty($lib->execution))
{
$execution = $this->execution->getByID($lib->execution);
@@ -263,7 +264,7 @@ class doc extends control
$this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution);
}
$this->view->execution = $execution;
$this->view->object = $execution;
}
if($lib->type == 'custom') unset($this->lang->doclib->aclList['default']);
+3 -9
View File
@@ -28,16 +28,10 @@
</div>
<form method='post' class='load-indicator main-form form-ajax'>
<table class='table table-form'>
<?php if(!empty($lib->product)):?>
<?php if(in_array($lib->type, array('product', 'project', 'execution'))):?>
<tr>
<th class='w-130px'><?php echo $lang->doc->product?></th>
<td><?php echo $product->name?></td>
</tr>
<?php endif;?>
<?php if(!empty($lib->execution)):?>
<tr>
<th class='w-130px'><?php echo $lang->doc->execution?></th>
<td><?php echo $execution->name?></td>
<th class='w-130px'><?php echo $lang->doc->{$lib->type};?></th>
<td><?php echo $object->name?></td>
</tr>
<?php endif;?>
<tr>