* finish task#1557.
This commit is contained in:
+19
-6
@@ -507,12 +507,27 @@ class bug extends control
|
||||
|
||||
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
|
||||
|
||||
/* The bugs of a product. */
|
||||
if($productID)
|
||||
{
|
||||
$product = $this->product->getByID($productID);
|
||||
|
||||
/* Set product menu. */
|
||||
$this->bug->setMenu($this->products, $productID);
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->bug->batchEdit;
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
}
|
||||
/* The bugs of my. */
|
||||
else
|
||||
{
|
||||
$this->lang->bug->menu = $this->lang->my->menu;
|
||||
$this->lang->set('menugroup.bug', 'my');
|
||||
$this->lang->bug->menuOrder = $this->lang->my->menuOrder;
|
||||
$this->loadModel('my')->setMenu();
|
||||
$this->view->title = $this->lang->bug->batchEdit;
|
||||
}
|
||||
/* Initialize vars.*/
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');
|
||||
$product = $this->product->getByID($productID);
|
||||
|
||||
/* Set product menu. */
|
||||
$this->bug->setMenu($this->products, $productID);
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$showSuhosinInfo = false;
|
||||
@@ -521,8 +536,6 @@ class bug extends control
|
||||
if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo;
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->bug->batchEdit;
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->bug->common;
|
||||
$this->view->position[] = $this->lang->bug->batchEdit;
|
||||
$this->view->bugIDList = $bugIDList;
|
||||
|
||||
@@ -138,7 +138,7 @@ $lang->my->menu->account = '<span id="mybg"> </span>%s' . $lang->arr
|
||||
$lang->my->menu->index = 'Index|my|index';
|
||||
$lang->my->menu->todo = array('link' => 'Todo|my|todo|', 'subModule' => 'todo');
|
||||
$lang->my->menu->task = array('link' => 'Task|my|task|', 'subModule' => 'task');
|
||||
$lang->my->menu->bug = 'Bug|my|bug|';
|
||||
$lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug');
|
||||
$lang->my->menu->testtask = array('link' => 'Test|my|testtask|', 'alias' => 'testcase');
|
||||
$lang->my->menu->story = 'Story|my|story|';
|
||||
$lang->my->menu->myProject = 'Project|my|project|';
|
||||
|
||||
@@ -138,7 +138,7 @@ $lang->my->menu->account = '<span id="mybg"> </span>%s' . $lang->arr
|
||||
$lang->my->menu->index = '首页|my|index';
|
||||
$lang->my->menu->todo = array('link' => '待办|my|todo|', 'subModule' => 'todo');
|
||||
$lang->my->menu->task = array('link' => '任务|my|task|', 'subModule' => 'task');
|
||||
$lang->my->menu->bug = 'Bug|my|bug|';
|
||||
$lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug');
|
||||
$lang->my->menu->testtask = array('link' => '测试|my|testtask|', 'alias' => 'testcase');
|
||||
$lang->my->menu->story = '需求|my|story|';
|
||||
$lang->my->menu->myProject = '项目|my|project|';
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php $vars = "type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<form method='post' action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
|
||||
<table class='table-1 fixed tablesorter colored'>
|
||||
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
<thead>
|
||||
@@ -39,9 +40,13 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?></td>
|
||||
<td class='a-left'>
|
||||
<?php if($canBatchEdit):?><input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>' /><?php endif;?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id), '_blank');?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'severity' . $lang->bug->severityList[$bug->severity]?>'><?php echo isset($lang->bug->severityList[$bug->severity]) ? $lang->bug->severityList[$bug->severity] : $bug->severity;?></span></td>
|
||||
<td><span class='<?php echo 'pri' . $lang->bug->priList[$bug->pri]?>'><?php echo isset($lang->bug->priList[$bug->pri]) ? $lang->bug->priList[$bug->pri] : $bug->pri?></span></td>
|
||||
<td><?php echo $lang->bug->typeList[$bug->type]?></td>
|
||||
@@ -62,7 +67,17 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot><tr><td colspan='9'><?php $pager->show();?></td></tr></tfoot>
|
||||
<tfoot>
|
||||
<tr><td colspan='9'>
|
||||
<?php if($bugs and $canBatchEdit):?>
|
||||
<div class='f-left'>
|
||||
<?php echo html::selectAll() . html::selectReverse() . html::submitButton($lang->edit);?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php $pager->show();?>
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<script language='javascript'>$("#<?php echo $type;?>Tab").addClass('active');</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user