* finish task#806.

This commit is contained in:
chencongzhi520@gmail.com
2012-05-30 07:55:15 +00:00
parent 4de23033ef
commit 5816f00af7
10 changed files with 356 additions and 121 deletions
+123 -116
View File
@@ -47,129 +47,136 @@ var customed = <?php echo (int)$customed;?>;
<?php if($customed){include 'browse.custom.html.php'; exit;}?>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
<div class='a-right'>
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
<form method='post' action='<?php echo $this->inLink('batchEdit', "from=bugBrowse&productID=$productID&orderBy=$orderBy");?>'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
<div class='a-right'>
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
</div>
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<table class='table-1 fixed colored tablesorter datatable'>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<table class='table-1 fixed colored tablesorter datatable'>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
<?php endif;?>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<th class='w-p40'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<?php if($browseType == 'needconfirm'):?>
<th class='w-p40'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<?php endif;?>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<?php endif;?>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<?php endif;?>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='a-center'>
<?php $class = $bug->status == 'active' ? 'active' . $bug->severity : $bug->status;?>
<td class='linkbox <?php echo $class;?>'><?php echo html::a($bugLink, sprintf('%03d', $bug->id));?></td>
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
<?php $class = 'confirm' . $bug->confirmed;?>
<td class='a-left nobr'><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
<td><?php echo html::a(inlink('confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin')?></td>
<?php else:?>
<td><?php echo $users[$bug->openedBy];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<?php endif;?>
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<?php endif;?>
<td>
<?php
$params = "bugID=$bug->id";
if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' ';
if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' ';
common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit);
if($this->cookie->windowWidth >= $this->config->wideSize) common::printLink('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $lang->bug->buttonCopy);
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 9;?>
<td colspan='<?php echo $columns;?>'>
<div class='f-left'>
<?php
foreach($lang->bug->statusList as $status => $label)
{
if($status != 'active')
{
echo "<span class='$status'> $label </span> ";
continue;
}
rsort($this->lang->bug->severityList);
foreach($this->lang->bug->severityList as $severity)
{
echo "<span class='$status$severity'> {$lang->bug->severity}:$severity </span> ";
}
}
?>
</div>
<div class='f-right'><?php $pager->show();?></div>
</td>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='a-center'>
<?php $class = $bug->status == 'active' ? 'active' . $bug->severity : $bug->status;?>
<td class='<?php echo $class;?>'>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
<?php $class = 'confirm' . $bug->confirmed;?>
<td class='a-left nobr'><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<?php endif;?>
<?php if($browseType == 'needconfirm'):?>
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
<td><?php echo html::a(inlink('confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin')?></td>
<?php else:?>
<td><?php echo $users[$bug->openedBy];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<?php endif;?>
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<?php endif;?>
<td>
<?php
$params = "bugID=$bug->id";
if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' ';
if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' ';
common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit);
if($this->cookie->windowWidth >= $this->config->wideSize) common::printLink('bug', 'create', "product=$bug->product&extra=bugID=$bug->id", $lang->bug->buttonCopy);
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 9;?>
<td colspan='<?php echo $columns;?>'>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
if(common::hasPriv('bug', 'batchEdit')) echo html::submitButton($lang->bug->batchEdit);
foreach($lang->bug->statusList as $status => $label)
{
if($status != 'active')
{
echo "<span class='$status'> $label </span> ";
continue;
}
rsort($this->lang->bug->severityList);
foreach($this->lang->bug->severityList as $severity)
{
echo "<span class='$status$severity'> {$lang->bug->severity}:$severity </span> ";
}
}
?>
</div>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>