+ complete task #315:add assifntome, openedbyme, resolvedbyme and closedbyme to bug of my module.
This commit is contained in:
@@ -82,6 +82,7 @@ $lang->bug->assignToMe = 'Tome';
|
||||
$lang->bug->openedByMe = 'MyOpen';
|
||||
$lang->bug->resolvedByMe = 'MyResolve';
|
||||
$lang->bug->assignToNull = 'Assign null';
|
||||
$lang->bug->closedByMe = 'MyClose';
|
||||
$lang->bug->longLifeBugs = 'Long life';
|
||||
$lang->bug->postponedBugs = 'Postponed';
|
||||
$lang->bug->allBugs = 'All bug';
|
||||
|
||||
@@ -81,6 +81,7 @@ $lang->bug->byModule = '按模块';
|
||||
$lang->bug->assignToMe = '指派给我';
|
||||
$lang->bug->openedByMe = '由我创建';
|
||||
$lang->bug->resolvedByMe = '由我解决';
|
||||
$lang->bug->closedByMe = '由我关闭';
|
||||
$lang->bug->assignToNull = '未指派';
|
||||
$lang->bug->longLifeBugs = '久未处理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
|
||||
+34
-2
@@ -79,18 +79,50 @@ class my extends control
|
||||
}
|
||||
|
||||
/* 用户的bug列表。*/
|
||||
public function bug()
|
||||
public function bug($type = 'assignToMe', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* 登记session,加载语言。*/
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
$this->app->loadLang('bug');
|
||||
|
||||
/* 加载分页类。*/
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$bugs = array();
|
||||
if($type == 'assigntome')
|
||||
{
|
||||
$bugs = $this->dao->findByAssignedTo($this->app->user->account)->from(TABLE_BUG)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
elseif($type == 'openedbyme')
|
||||
{
|
||||
$bugs = $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_BUG)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
elseif($type == 'resolvedbyme')
|
||||
{
|
||||
$bugs = $this->dao->findByResolvedBy($this->app->user->account)->from(TABLE_BUG)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
elseif($type == 'closedbyme')
|
||||
{
|
||||
$bugs = $this->dao->findByClosedBy($this->app->user->account)->from(TABLE_BUG)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->bug;
|
||||
$this->view->position[] = $this->lang->my->bug;
|
||||
$this->view->bugs = $this->user->getBugs($this->app->user->account);
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->tabID = 'bug';
|
||||
$this->view->type = $type;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,17 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo "<span id='assigntomeTab'>" . html::a(inlink('bug', "type=assigntome"), $lang->bug->assignToMe) . "</span>";
|
||||
echo "<span id='openedbymeTab'>" . html::a(inlink('bug', "type=openedbyme"), $lang->bug->openedByMe) . "</span>";
|
||||
echo "<span id='resolvedbymeTab'>" . html::a(inlink('bug', "type=resolvedbyme"), $lang->bug->resolvedByMe) . "</span>";
|
||||
echo "<span id='closedByMeTab'>" . html::a(inlink('bug', "type=closedbyme"), $lang->bug->closedByMe) . "</span>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $vars = "type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<table class='table-1 fixed tablesorter'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
@@ -50,5 +61,9 @@
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php $pager->show();?>
|
||||
</div>
|
||||
<script language='javascript'>
|
||||
$("#<?php echo $type;?>Tab").addClass('active');
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user