* Finish task #70487,70492.

This commit is contained in:
tianshujie
2022-09-28 10:45:23 +08:00
parent 4f8bc6a9ad
commit 43a95b18e2
4 changed files with 43 additions and 3 deletions
+3
View File
@@ -1286,6 +1286,9 @@ class product extends control
$this->view->productStructure = $productStructure;
$this->view->productLines = $productLines;
$this->view->programLines = $programLines;
$this->view->users = $this->user->getPairs('noletter');
$this->view->userIdPairs = $this->user->getPairs('noletter|showid');
$this->view->usersAvatar = $this->user->getAvatarPairs('');
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->pager = $pager;
+3
View File
@@ -38,6 +38,7 @@
#sidebar>.cell {width: 100%;}
th.c-name {width: 400px;}
th.c-PO {width: 100px;}
th.c-story {width: 290px;}
th.c-bug {width: 200px;}
th.c-plan {width: 45px;}
@@ -89,3 +90,5 @@ th.c-actions {width: 50px;}
#productTableList > tr.row-line.no-nest > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;}
.statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;}
.table-footer.fixed-footer .statistic {color: #fff;}
#productTableList .c-manager {padding-left: 20px;}
#productTableList .c-manager a {top: 7px; left: 28px;}
+8 -3
View File
@@ -1817,11 +1817,15 @@ class productModel extends model
{
$programKeys = array(0 => 0);
foreach($products as $product) $programKeys[] = $product->program;
$programs = $this->dao->select('id,name')->from(TABLE_PROGRAM)
$programs = $this->dao->select('id,name,PM')->from(TABLE_PROGRAM)
->where('id')->in(array_unique($programKeys))
->fetchPairs();
->fetchAll('id');
foreach($products as $product) $product->programName = isset($programs[$product->program]) ? $programs[$product->program] : '';
foreach($products as $product)
{
$product->programName = isset($programs[$product->program]) ? $programs[$product->program]->name : '';
$product->programPM = isset($programs[$product->program]) ? $programs[$product->program]->PM : '';
}
}
$stats = array();
@@ -2045,6 +2049,7 @@ class productModel extends model
/* Init vars. */
/* Program name. */
$productStructure[$product->program]['programName'] = $product->programName;
$productStructure[$product->program]['programPM'] = $product->programPM;
$productStructure[$product->program] = $this->statisticData('program', $productStructure, $product);
}
}
+29
View File
@@ -50,6 +50,9 @@
<a class='table-nest-toggle table-nest-toggle-global' data-expand-text='<?php echo $lang->expand; ?>' data-collapse-text='<?php echo $lang->collapse; ?>'></a>
<?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?>
</th>
<th class='c-PO' rowspan="2">
<?php common::printOrderLink('PO', $orderBy, $vars, $lang->product->manager);?>
</th>
<th class="c-story" colspan="5"><?php echo $lang->story->story;?></th>
<th class="c-bug" colspan="3"><?php echo $lang->bug->common;?></th>
<th class="c-plan" rowspan="2"><?php echo $lang->product->plan;?></th>
@@ -102,6 +105,19 @@
<span class="table-nest-icon icon table-nest-toggle"></span>
<?php echo $program['programName']?>
</td>
<td class='c-manager'>
<?php
if(!empty($program['programPM']))
{
$programPM = $program['programPM'];
$userName = zget($users, $programPM);
echo html::smallAvatar(array('avatar' => $usersAvatar[$programPM], 'account' => $programPM, 'name' => $userName), 'avatar-circle avatar-top avatar-' . zget($userIdPairs, $programPM));
$userID = isset($userIdPairs[$programPM]) ? $userIdPairs[$programPM] : '';
echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");
}
?>
</td>
<td><?php echo $program['draftStories'];?></td>
<td><?php echo $program['activeStories'];?></td>
<td><?php echo $program['changingStories'];?></td>
@@ -142,6 +158,7 @@
<span class="table-nest-icon icon table-nest-toggle"></span>
<?php echo $line['lineName']?>
</td>
<td></td>
<td><?php echo isset($line['draftStories']) ? $line['draftStories'] : 0;?></td>
<td><?php echo isset($line['activeStories']) ? $line['activeStories'] : 0;?></td>
<td><?php echo isset($line['changingStories']) ? $line['changingStories'] : 0;?></td>
@@ -195,6 +212,18 @@
echo "<span class='table-nest-icon icon icon-product'></span>" . $productLink;
?>
</td>
<td class='c-manager'>
<?php
if(!empty($product->PO))
{
$userName = zget($users, $product->PO);
echo html::smallAvatar(array('avatar' => $usersAvatar[$product->PO], 'account' => $product->PO, 'name' => $userName), 'avatar-circle avatar-' . zget($userIdPairs, $product->PO));
$userID = isset($userIdPairs[$product->PO]) ? $userIdPairs[$product->PO] : '';
echo html::a($this->createLink('user', 'profile', "userID=$userID", '', true), $userName, '', "title='{$userName}' data-toggle='modal' data-type='iframe' data-width='600'");
}
?>
</td>
<td><?php echo $product->stories['draft'];?></td>
<td><?php echo $product->stories['active'];?></td>
<td><?php echo $product->stories['changing'];?></td>