* finish task#1303.
This commit is contained in:
@@ -528,6 +528,7 @@ $lang->resource->user->editGroup = 'editGroup';
|
||||
$lang->resource->user->unlock = 'unlock';
|
||||
$lang->resource->user->delete = 'delete';
|
||||
$lang->resource->user->todo = 'todo';
|
||||
$lang->resource->user->story = 'story';
|
||||
$lang->resource->user->task = 'task';
|
||||
$lang->resource->user->bug = 'bug';
|
||||
$lang->resource->user->project = 'project';
|
||||
|
||||
@@ -1031,10 +1031,10 @@ class storyModel extends model
|
||||
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($type == 'assignedto')->andWhere('assignedTo')->eq($this->app->user->account)->fi()
|
||||
->beginIF($type == 'openedby')->andWhere('openedby')->eq($this->app->user->account)->fi()
|
||||
->beginIF($type == 'reviewedby')->andWhere('reviewedby')->like('%' . $this->app->user->account . '%')->fi()
|
||||
->beginIF($type == 'closedby')->andWhere('closedby')->eq($this->app->user->account)->fi()
|
||||
->beginIF($type == 'assignedto')->andWhere('assignedTo')->eq($account)->fi()
|
||||
->beginIF($type == 'openedby')->andWhere('openedby')->eq($account)->fi()
|
||||
->beginIF($type == 'reviewedby')->andWhere('reviewedby')->like('%' . $account . '%')->fi()
|
||||
->beginIF($type == 'closedby')->andWhere('closedby')->eq($account)->fi()
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
|
||||
|
||||
@@ -92,6 +92,41 @@ class user extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Story of a user.
|
||||
*
|
||||
* @param int $account
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function story($account, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Save session. */
|
||||
$this->session->set('storyList', $this->app->getURI(true));
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$this->user->setMenu($this->user->getPairs('noempty|noclosed'), $account);
|
||||
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed'), $account);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->story;
|
||||
$this->view->position[] = $this->lang->user->story;
|
||||
$this->view->stories = $this->loadModel('story')->getUserStories($account, 'assignedto', 'id_desc', $pager);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->account = $account;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tasks of a user.
|
||||
*
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
$date = isset($date) ? $date : helper::today();
|
||||
|
||||
echo $userList . $lang->arrow;
|
||||
echo "<span id='todoTab'>"; common::printLink('user', 'todo',"account=$account", $lang->user->todo); echo '</span>';
|
||||
echo "<span id='taskTab'>"; common::printLink('user', 'task',"account=$account", $lang->user->task); echo '</span>';
|
||||
echo "<span id='bugTab'>" ; common::printLink('user', 'bug', "account=$account", $lang->user->bug); echo '</span>';
|
||||
echo "<span id='todoTab'>"; common::printLink('user', 'todo',"account=$account", $lang->user->todo); echo '</span>';
|
||||
echo "<span id='storyTab'>"; common::printLink('user', 'story',"account=$account", $lang->user->story); echo '</span>';
|
||||
echo "<span id='taskTab'>"; common::printLink('user', 'task',"account=$account", $lang->user->task); echo '</span>';
|
||||
echo "<span id='bugTab'>" ; common::printLink('user', 'bug', "account=$account", $lang->user->bug); echo '</span>';
|
||||
echo "<span id='dynamicTab'>"; common::printLink('user', 'dynamic', "type=today&account=$account", $lang->user->dynamic); echo '</span>' ;
|
||||
echo "<span id='projectTab'>"; common::printLink('user', 'project', "account=$account", $lang->user->project); echo '</span>';
|
||||
echo "<span id='profileTab'>"; common::printLink('user', 'profile', "account=$account", $lang->user->profile); echo '</span>';
|
||||
|
||||
@@ -4,12 +4,45 @@
|
||||
*
|
||||
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @author Congzhi Chen <congzhi@cnezsoft.com>
|
||||
* @package dashboard
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php include './featurebar.html.php';?>
|
||||
<table class='table-1 tablesorter fixed'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='w-200px'> <?php echo $lang->story->product;?></th>
|
||||
<th> <?php echo $lang->story->title;?></th>
|
||||
<th class='w-150px'> <?php echo $lang->story->plan;?></th>
|
||||
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-hour'> <?php echo $lang->story->estimateAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->story->stageAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php $storyLink = $this->createLink('story', 'view', "id=$story->id");?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo html::a($storyLink, sprintf('%03d', $story->id));?></td>
|
||||
<td><span class='<?php echo 'pri' . $story->pri;?>'><?php echo $story->pri?></span></td>
|
||||
<td><?php echo $story->productTitle;?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($storyLink, $story->title);?></td>
|
||||
<td><?php echo $story->planTitle;?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td class='<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot><tr><td colspan='9'><?php echo $pager->show();?></td></tr></tfoot>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user