* adjust the UI.

This commit is contained in:
wangchunsheng
2009-12-18 02:24:28 +00:00
parent 7a0a28840f
commit 8e5bd73214
5 changed files with 262 additions and 276 deletions

View File

@@ -55,25 +55,23 @@ class bug extends control
$type = strtolower($type);
$this->session->set('bugList', $this->app->getURI(true));
$productID = common::saveProductState($productID, key($this->products));
$currentModuleID = ($type == 'bymodule') ? (int)$param : 0;
if($currentModuleID == 0)
{
$currentModuleName = $this->lang->bug->allBugs;
}
else
{
$currentModule = $this->tree->getById($currentModuleID);
$currentModuleName = sprintf($this->lang->bug->moduleBugs, $currentModule->name);
}
$productID = common::saveProductState($productID, key($this->products));
$moduleID = ($type == 'bymodule') ? (int)$param : 0;
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$bugs = array();
if($type == "bymodule")
if($type == 'all')
{
$childModuleIds = $this->tree->getAllChildId($currentModuleID);
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->eq($productID)->orderBy($orderBy)->page($pager)->fetchAll();
}
elseif($type == "bymodule")
{
$childModuleIds = $this->tree->getAllChildId($moduleID);
$bugs = $this->bug->getModuleBugs($productID, $childModuleIds, $orderBy, $pager);
}
elseif($type == 'assigntome')
@@ -125,8 +123,7 @@ class bug extends control
$this->assign('pager', $pager->get());
$this->assign('param', $param);
$this->assign('orderBy', $orderBy);
$this->assign('currentModuleID', $currentModuleID);
$this->assign('currentModuleName', $currentModuleName);
$this->assign('moduleID', $moduleID);
$this->display();
}
@@ -148,6 +145,9 @@ class bug extends control
$productID = common::saveProductState($productID, key($this->products));
$currentModuleID = (int)$moduleID;
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create;
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->create;
@@ -170,6 +170,9 @@ class bug extends control
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
$productName = $this->products[$productID];
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->view;
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName);
@@ -218,6 +221,9 @@ class bug extends control
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->edit;
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$projects = $this->product->getProjectPairs($bug->product);
$stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product);
$tasks = $this->task->getProjectTaskPairs($bug->project);
@@ -262,6 +268,9 @@ class bug extends control
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->resolve;
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$users = $this->user->getPairs($this->app->company->id);
$this->assign('header', $header);
$this->assign('position', $position);
@@ -289,6 +298,9 @@ class bug extends control
$productID = $bug->product;
$users = $this->user->getPairs($this->app->company->id);
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate;
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->activate;
@@ -317,6 +329,9 @@ class bug extends control
$bug = $this->bug->getById($bugID);
$productID = $bug->product;
/* 设置菜单。*/
$this->bug->setMenu($this->products, $productID);
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate;
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->activate;

View File

@@ -41,16 +41,19 @@ $lang->bug->assignToNull = '未指派';
$lang->bug->longLifeBugs = '久未处理';
$lang->bug->postponedBugs = '被延期';
$lang->bug->allBugs = '所有Bug';
$lang->bug->moduleBugs = '%s';
$lang->bug->moduleBugs = '按模块浏览';
$lang->bug->byQuery = '搜索';
$lang->bug->labProductAndModule = '所属产品::模块';
$lang->bug->labProjectAndTask = '相关项目::任务';
$lang->bug->labProductAndModule = '产品模块';
$lang->bug->labProjectAndTask = '项目任务';
$lang->bug->labStory = '相关需求';
$lang->bug->labBuild = '程序编译版本';
$lang->bug->labTypeAndSeverity = '类型::严重程度';
$lang->bug->labSystemBrowserAndHardware = '系统::浏览器';
$lang->bug->labAssignedTo = '指派';
$lang->bug->labTypeAndSeverity = '类型/严重程度';
$lang->bug->labSystemBrowserAndHardware = '系统/浏览器';
$lang->bug->labAssignedTo = '当前指派';
$lang->bug->labMailto = '抄送给';
$lang->bug->labLastEdited = '最后修改';
$lang->bug->labResolved = '由谁解决';
$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?';
@@ -62,12 +65,13 @@ $lang->bug->legendLinkBugs = '相关Bug';
$lang->bug->legendOpenInfo = '创建信息';
$lang->bug->legendResolveInfo = '解决信息';
$lang->bug->legendCloseInfo = '关闭信息';
$lang->bug->legendPrjStoryTask= '项目::需求::任务';
$lang->bug->legendPrjStoryTask= '项目/需求/任务';
$lang->bug->legendCases = '相关用例';
$lang->bug->legendSteps = '重现步骤';
$lang->bug->legendAction = '操作';
$lang->bug->legendHistory = '历史记录';
$lang->bug->legendComment = '备注';
$lang->bug->legendLife = 'BUG的一生';
$lang->bug->buttonEdit = '编辑';
$lang->bug->buttonActivate = '激活';
@@ -140,12 +144,12 @@ $lang->bug->status = 'Bug状态';
$lang->bug->mailto = '抄送给';
$lang->bug->openedBy = '由谁创建';
$lang->bug->openedDate = '创建日期';
$lang->bug->openedBuild = '创建Build';
$lang->bug->openedBuild = '创建版本';
$lang->bug->assignedTo = '指派给';
$lang->bug->assignedDate = '指派日期';
$lang->bug->resolvedBy = '解决者';
$lang->bug->resolution = '解决方案';
$lang->bug->resolvedBuild = '解决Build';
$lang->bug->resolvedBuild = '解决版本';
$lang->bug->resolvedDate = '解决日期';
$lang->bug->closedBy = '由谁关闭';
$lang->bug->closedDate = '关闭日期';

View File

@@ -25,8 +25,15 @@
<?php
class bugModel extends model
{
/* 设置菜单。*/
public function setMenu($products, $productID)
{
$selectHtml = html::select('productID', $products, $productID, "onchange=\"switchProduct(this.value, 'bug');\"");
common::setMenuVars($this->lang->bug->menu, 'product', $selectHtml . $this->lang->arrow);
}
/* 创建一个Bug。*/
function create()
public function create()
{
$now = date('Y-m-d H:i:s');
$bug = fixer::input('post')

View File

@@ -25,91 +25,80 @@
<?php include '../../common/header.html.php';?>
<?php include '../../common/treeview.html.php';?>
<script language='Javascript'>
function selectProduct(productID)
/* 切换浏览方式。*/
function browseByModule(active)
{
link = createLink('bug', 'browse', 'productID=' + productID + '&type=byModule&param=0');
location.href=link;
$('#mainbox').addClass('yui-t7');
$('#treebox').removeClass('hidden');
$('#bymoduletab').addClass('active');
$('#querybox').addClass('hidden');
$('#' + active + 'tab').removeClass('active');
}
function search(active)
{
$('#mainbox').removeClass('yui-t7');
$('#treebox').addClass('hidden');
$('#querybox').removeClass('hidden');
$('#byquerytab').addClass('active');
$('#' + active + 'tab').removeClass('active');
}
</script>
<div class="yui-d0 yui-t3">
<div class="yui-b">
<table class='table-1'>
<caption>
<?php echo $lang->bug->selectProduct;?>
<?php echo html::select('productID', $products, $productID, 'onchange="selectProduct(this.value);"');?>
</caption>
<tr>
<td>
<div id='main'><?php echo $moduleTree;?></div>
<div class='a-right'>
<?php echo html::a($this->createLink('bug', 'browse', "productID=$productID"), $lang->bug->allBugs);?>
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manageBug);?>
</div>
</td>
</tr>
</table>
<div class='yui-d0'>
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduletab' onclick=\"browseByModule('$type')\">" . $lang->bug->moduleBugs . "</span> ";
echo "<span id='assigntometab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=assignToMe&param=0"), $lang->bug->assignToMe) . "</span>";
echo "<span id='openedbymetab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=openedByMe&param=0"), $lang->bug->openedByMe) . "</span>";
echo "<span id='resolvedbymetab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=resolvedByMe&param=0"), $lang->bug->resolvedByMe) . "</span>";
echo "<span id='assigntonulltab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=assignToNull&param=0"), $lang->bug->assignToNull) . "</span>";
echo "<span id='longlifebugstab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=longLifeBugs&param=0"), $lang->bug->longLifeBugs) . "</span>";
echo "<span id='postponedbugstab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=postponedBugs&param=0"), $lang->bug->postponedBugs) . "</span>";
echo "<span id='byquerytab' onclick=\"search('$type')\">{$lang->bug->byQuery}</span> ";
echo "<span id='alltab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=all&param=0"), $lang->bug->allBugs) . "</span>";
?>
</div>
<div class='f-right'>
<?php common::printLink('bug', 'create', "productID=$productID&moduleID=$moduleID", $lang->bug->create); ?>
</div>
</div>
<div id='querybox' class='<?php if($type !='byquery') echo 'hidden';?>'><?php echo $searchForm;?></div>
</div>
<div class='yui-d0 <?php if($type == 'bymodule') echo 'yui-t7';?>' id='mainbox'>
<div class='yui-b <?php if($type != 'bymodule') echo 'hidden';?>' 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>
<div class="yui-main">
<div class="yui-b">
<div><?php echo $searchForm;?></div>
<div id='tabbar' class='yui-d0' style='clear:right'>
<ul>
<?php
echo "<li><nobr>$productName</nobr></li>";
echo "<li id='bymoduletab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=byModule&param=$currentModuleID"), $currentModuleName) . "</nobr></li>";
echo "<li id='assigntometab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=assignToMe&param=0"), $lang->bug->assignToMe) . "</nobr></li>";
echo "<li id='openedbymetab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=openedByMe&param=0"), $lang->bug->openedByMe) . "</nobr></li>";
echo "<li id='resolvedbymetab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=resolvedByMe&param=0"), $lang->bug->resolvedByMe) . "</nobr></li>";
echo "<li id='assigntonulltab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=assignToNull&param=0"), $lang->bug->assignToNull) . "</nobr></li>";
echo "<li id='longlifebugstab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=longLifeBugs&param=0"), $lang->bug->longLifeBugs) . "</nobr></li>";
echo "<li id='postponedbugstab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=postponedBugs&param=0"), $lang->bug->postponedBugs) . "</nobr></li>";
echo <<<EOT
<script language="Javascript">
$("#{$type}tab").addClass('active');
</script>
EOT;
?>
</ul>
<?php if(common::hasPriv('bug', 'create')) echo '<div>' . html::a($this->createLink('bug', 'create', "type=product&productID=$productID&moduleID=$currentModuleID"), $lang->bug->create) . '</div>';?>
</div>
<?php
$app->global->vars = "productID=$productID&type=$type&param=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage";
$app->global->orderBy = $orderBy;
function printOrderLink($fieldName)
{
global $app, $lang;
if(strpos($app->global->orderBy, $fieldName) !== false)
{
if(stripos($app->global->orderBy, 'desc') !== false) $orderBy = str_replace('desc', 'asc', $app->global->orderBy);
if(stripos($app->global->orderBy, 'asc') !== false) $orderBy = str_replace('asc', 'desc', $app->global->orderBy);
}
else
{
$orderBy = $fieldName . '|' . 'asc';
}
$link = helper::createLink('bug', 'browse', sprintf($app->global->vars, $orderBy));
echo html::a($link, $lang->bug->$fieldName);
}
?>
<table class='table-1'>
<?php $vars = "productID=$productID&type=$type&param=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?>
<table class='table-1 fixed'>
<thead>
<tr class='colhead'>
<th><?php printOrderLink('id');?></th>
<th><?php printOrderLink('severity');?></th>
<th><?php printOrderLink('title');?></th>
<th><?php printOrderLink('openedBy');?></th>
<th><?php printOrderLink('assignedTo');?></th>
<th><?php printOrderLink('resolvedBy');?></th>
<th><?php printOrderLink('resolution');?></th>
<th><?php common::printOrderLink('id', $orderBy, $vars, $lang->bug->id);?></th>
<th><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severity);?></th>
<th class='w-p50'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->bug->openedBy);?></th>
<th><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedTo);?></th>
<th><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
<th><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolution);?></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<tr class='a-center'>
<td class='a-right'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?></td>
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?></td>
<td><?php echo $bug->severity?></td>
<td width='50%' class='a-left'><?php echo $bug->title;?></td>
<td class='a-left nobr'><?php echo $bug->title;?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'style=color:red';?>><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
@@ -122,4 +111,8 @@ EOT;
</div>
</div>
</div>
<script language='javascript'>
$("#<?php echo $type;?>tab").addClass('active');
$("#module<?php echo $moduleID;?>").addClass('active');
</script>
<?php include '../../common/footer.html.php';?>

View File

@@ -29,197 +29,164 @@
<div id='main'>BUG #<?php echo $bug->id . $lang->colon . $bug->title;?></div>
<div>
<?php
if(common::hasPriv('bug', 'edit')) echo html::a($this->createLink('bug', 'edit', "bugID=$bug->id"), $lang->bug->buttonEdit);
if(common::hasPriv('bug', 'resolve') and $bug->status == 'active') echo html::a($this->createLink('bug', 'resolve', "bugID=$bug->id"), $lang->bug->buttonResolve); else echo $lang->bug->buttonResolve . ' ';
if(common::hasPriv('bug', 'close') and $bug->status == 'resolved') echo html::a($this->createLink('bug', 'close', "bugID=$bug->id"), $lang->bug->buttonClose); else echo $lang->bug->buttonClose . ' ';
if(common::hasPriv('bug', 'activate') and ($bug->status == 'closed' or $bug->status == 'resolved')) echo html::a($this->createLink('bug', 'activate', "bugID=$bug->id"), $lang->bug->buttonActivate); else echo $lang->bug->buttonActivate . ' ';
common::printLink('bug', 'edit', "bugID=$bug->id", $lang->bug->buttonEdit);
if($bug->status == 'active') common::printLink('bug', 'resolve', "bugID=$bug->id", $lang->bug->buttonResolve); else echo $lang->bug->buttonResolve . ' ';
if($bug->status == 'resolved') common::printLink('bug', 'close', "bugID=$bug->id", $lang->bug->buttonClose); else echo $lang->bug->buttonClose . ' ';
if($bug->status == 'closed' or $bug->status == 'resolved') common::printLink('bug', 'activate', "bugID=$bug->id", $lang->bug->buttonActivate); else echo $lang->bug->buttonActivate . ' ';
if(common::hasPriv('bug', 'browse')) echo html::a($this->session->bugList, $lang->bug->buttonToList);
?>
</div>
</div>
</div>
<div class='yui-doc3 yui-t7'>
<div class='yui-g'>
<div class='yui-u first'>
<div class='yui-d0 yui-t6'>
<div class='yui-main'>
<div class='yui-b'>
<fieldset>
<legend><?php echo $lang->bug->legendBasicInfo;?></legend>
<table class='table-1 a-left' cellpadding='0' cellspacing='0'>
<tr>
<td class='rowhead'><?php echo $lang->bug->labProductAndModule;?></td>
<td>
<?php
echo $productName;
if(!empty($modulePath)) echo $lang->arrow;
foreach($modulePath as $key => $module)
{
echo $module->name;
if(isset($modulePath[$key + 1])) echo $lang->arrow;
}
?>
</td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->type;?></td>
<td><?php echo $lang->bug->typeList[$bug->type];?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->os;?></td>
<td><?php echo $lang->bug->osList->{$bug->os};?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->severity;?></td>
<td><?php echo $bug->severity;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->status;?></td>
<td><?php echo $bug->status;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->assignedTo;?></td>
<td><?php echo $users[$bug->assignedTo];?></td>
</tr>
<tr>
<td width='40%' class='rowhead'><?php echo $lang->bug->assignedDate;?></td>
<td><?php echo $bug->assignedDate;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->lastEditedBy;?></td>
<td><?php echo $users[$bug->lastEditedBy];?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->lastEditedDate;?></td>
<td><?php echo $bug->lastEditedDate;?></td>
</tr>
</table>
<legend><?php echo $lang->bug->legendSteps;?></legend>
<div class='content'><?php echo nl2br($bug->steps);?></div>
</fieldset>
<?php include '../../common/action.html.php';?>
<fieldset>
<legend><?php echo $lang->bug->legendPrjStoryTask;?></legend>
<table class='table-1 a-left'>
<tr>
<td class='rowhead'><?php echo $lang->bug->project;?></td>
<td><?php echo $bug->projectName;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->story;?></td>
<td><?php echo $bug->storyTitle;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->task;?></td>
<td><?php echo $bug->taskName;?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendMailto;?></legend>
<div><?php $mailto = explode(',', $bug->mailto); foreach($mailto as $account) echo ' ' . $users[$account]; ?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendAttatch;?></legend>
<div>
<?php
foreach($bug->files as $file) echo html::a($file->fullPath, $file->title, '_blank');
?>
<legend><?php echo $lang->bug->legendAction;?></legend>
<div class='a-center' style='font-size:16px; font-weight:bold'>
<?php
if(common::hasPriv('bug', 'edit')) echo html::a($this->createLink('bug', 'edit', "bugID=$bug->id"), $lang->bug->buttonEdit);
if(common::hasPriv('bug', 'resolve') and $bug->status == 'active') echo html::a($this->createLink('bug', 'resolve', "bugID=$bug->id"), $lang->bug->buttonResolve); else echo $lang->bug->buttonResolve . ' ';
if(common::hasPriv('bug', 'close') and $bug->status == 'resolved') echo html::a($this->createLink('bug', 'close', "bugID=$bug->id"), $lang->bug->buttonClose); else echo $lang->bug->buttonClose . ' ';
if(common::hasPriv('bug', 'activate') and ($bug->status == 'closed' or $bug->status == 'resolved')) echo html::a($this->createLink('bug', 'activate', "bugID=$bug->id"), $lang->bug->buttonActivate); else echo $lang->bug->buttonActivate . ' ';
if(common::hasPriv('bug', 'browse')) echo html::a($this->session->bugList, $lang->bug->buttonToList);
?>
</div>
</fieldset>
</div>
<div class='yui-u'>
<fieldset>
<legend><?php echo $lang->bug->legendOpenInfo;?></legend>
<table class='table-1 a-left'>
<tr>
<td width='40%' class='rowhead'><?php echo $lang->bug->openedBy;?></td>
<td><?php echo $users[$bug->openedBy];?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->openedDate;?></td>
<td><?php echo $bug->openedDate;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->openedBuild;?></td>
<td><?php echo $bug->openedBuild;?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendResolveInfo;?></legend>
<table class='table-1 a-left'>
<tr>
<td width='40%' class='rowhead'><?php echo $lang->bug->resolvedBy;?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->resolvedDate;?></td>
<td><?php echo $bug->resolvedDate;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->resolvedBuild;?></td>
<td><?php echo $bug->resolvedBuild;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->resolution;?></td>
<td>
<?php
echo $lang->bug->resolutionList[$bug->resolution];
if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug"), $bug->duplicateBugTitle);
?>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendCloseInfo;?></legend>
<table class='table-1 a-left'>
<tr>
<td width='40%' class='rowhead'><?php echo $lang->bug->closedBy;?></td>
<td><?php echo $users[$bug->closedBy];?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->closedDate;?></td>
<td><?php echo $bug->closedDate;?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendLinkBugs;?></legend>
<div>&nbsp;</div>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendCases;?></legend>
<div>&nbsp;</div>
</fieldset>
</div>
</div>
</div>
<div class='yui-d0'>
<fieldset>
<legend><?php echo $lang->bug->legendAction;?></legend>
<div class='a-center' style='font-size:16px; font-weight:bold'>
<?php
if(common::hasPriv('bug', 'edit')) echo html::a($this->createLink('bug', 'edit', "bugID=$bug->id"), $lang->bug->buttonEdit);
if(common::hasPriv('bug', 'resolve') and $bug->status == 'active') echo html::a($this->createLink('bug', 'resolve', "bugID=$bug->id"), $lang->bug->buttonResolve); else echo $lang->bug->buttonResolve . ' ';
if(common::hasPriv('bug', 'close') and $bug->status == 'resolved') echo html::a($this->createLink('bug', 'close', "bugID=$bug->id"), $lang->bug->buttonClose); else echo $lang->bug->buttonClose . ' ';
if(common::hasPriv('bug', 'activate') and ($bug->status == 'closed' or $bug->status == 'resolved')) echo html::a($this->createLink('bug', 'activate', "bugID=$bug->id"), $lang->bug->buttonActivate); else echo $lang->bug->buttonActivate . ' ';
if(common::hasPriv('bug', 'browse')) echo html::a($this->session->bugList, $lang->bug->buttonToList);
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendSteps;?></legend>
<div class='content'><?php echo nl2br($bug->steps);?></div>
</fieldset>
<?php include '../../common/action.html.php';?>
</div>
<div class='yui-b'>
<fieldset>
<legend><?php echo $lang->bug->legendBasicInfo;?></legend>
<table class='table-1 a-left fixed'>
<tr>
<th class='w-p25 rowhead'><?php echo $lang->bug->labProductAndModule;?></th>
<td class='nobr'>
<?php
echo $productName;
if(!empty($modulePath)) echo $lang->arrow;
foreach($modulePath as $key => $module)
{
echo $module->name;
if(isset($modulePath[$key + 1])) echo $lang->arrow;
}
?>
</td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->type;?></td>
<td><?php echo $lang->bug->typeList[$bug->type];?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->os;?></td>
<td><?php echo $lang->bug->osList->{$bug->os};?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->severity;?></td>
<td><?php echo $bug->severity;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->status;?></td>
<td><?php echo $bug->status;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->labAssignedTo;?></td>
<td><?php if($bug->assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendLife;?></legend>
<table class='table-1 a-left fixed'>
<tr>
<th class='rowhead w-p25'><?php echo $lang->bug->openedBy;?></th>
<td> <?php echo $users[$bug->openedBy] . $lang->at . $bug->openedDate;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></th>
<td><?php echo $bug->openedBuild;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->labResolved;?></th>
<td><?php if($bug->resolvedBy) echo $users[$bug->resolvedBy] . $lang->at . $bug->resolvedDate;?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->resolvedBuild;?></th>
<td><?php echo $bug->resolvedBuild;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->resolution;?></th>
<td>
<?php
echo $lang->bug->resolutionList[$bug->resolution];
if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug"), $bug->duplicateBugTitle);
?>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->closedBy;?></th>
<td><?php if($bug->closedBy) echo $users[$bug->closedBy] . $lang->at . $bug->closedDate;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->labLastEdited;?></th>
<td><?php if($bug->lastEditedBy) echo $users[$bug->lastEditedBy] . $lang->at . $bug->lastEditedDate?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendPrjStoryTask;?></legend>
<table class='table-1 a-left fixed'>
<tr>
<td class='rowhead w-p25'><?php echo $lang->bug->project;?></td>
<td><?php if($bug->project) echo html::a($this->createLink('project', 'browse', "projectid=$bug->project"), $bug->projectName);?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->story;?></td>
<td><?php if($bug->story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story"), $bug->storyTitle);?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->task;?></td>
<td><?php if($bug->task) echo html::a($this->createLink('task', 'view', "taskID=$bug->task"), $bug->taskName);?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendMailto;?></legend>
<div><?php $mailto = explode(',', $bug->mailto); foreach($mailto as $account) echo ' ' . $users[$account]; ?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendAttatch;?></legend>
<div>
<?php
foreach($bug->files as $file) echo html::a($file->fullPath, $file->title, '_blank');
?>
</div>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendLinkBugs;?></legend>
<div>&nbsp;</div>
</fieldset>
<fieldset>
<legend><?php echo $lang->bug->legendCases;?></legend>
<div>&nbsp;</div>
</fieldset>
</div>
</div>
<?php include '../../common/footer.html.php';?>