* Finish task #8966,8965.

This commit is contained in:
tianshujie98
2021-01-14 16:01:14 +08:00
parent 84331f875b
commit c591e20aef
10 changed files with 383 additions and 119 deletions

View File

@@ -287,20 +287,22 @@ $lang->my->menu->team = array('link' => 'Team|my|team|', 'subModule' => '
$lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = 'Story|my|work|mode=story';
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->dividerMenu = ',myProject,team,';

View File

@@ -287,20 +287,22 @@ $lang->my->menu->team = array('link' => 'Team|my|team|', 'subModule' => '
$lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = 'Story|my|work|mode=story';
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->dividerMenu = ',myProject,team,';

View File

@@ -287,20 +287,22 @@ $lang->my->menu->team = array('link' => 'Team|my|team|', 'subModule' => '
$lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = 'Story|my|work|mode=story';
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->dividerMenu = ',myProject,team,';

View File

@@ -287,20 +287,22 @@ $lang->my->menu->team = array('link' => 'Team|my|team|', 'subModule' => '
$lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = 'Story|my|work|mode=story';
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = 'Test Case|my|work|mode=testtask';
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = 'Test Case|my|contribute|mode=testtask';
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
$lang->my->dividerMenu = ',myProject,team,';

View File

@@ -287,20 +287,22 @@ $lang->my->menu->team = array('link' => '团队|my|team|', 'subModule' =>
$lang->my->menu->contacts = '联系人|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = '任务|my|work|mode=task';
$lang->my->workMenu->story = '需求|my|work|mode=story';
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = '测试|my|work|mode=testtask&type=wait';
$lang->my->workMenu->issue = '问题|my|work|mode=issue';
$lang->my->workMenu->risk = '风险|my|work|mode=risk';
$lang->my->workMenu->task = '任务|my|work|mode=task';
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = '测试|my|work|mode=testtask&type=wait';
$lang->my->workMenu->issue = '问题|my|work|mode=issue';
$lang->my->workMenu->risk = '风险|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
$lang->my->contributeMenu->story = '需求|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = '用例|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->issue = '问题|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = '风险|my|contribute|mode=risk';
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = '用例|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->issue = '问题|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = '风险|my|contribute|mode=risk';
$lang->my->dividerMenu = ',myProject,team,';

View File

@@ -278,20 +278,22 @@ $lang->my->menu->score = '積分|my|score|';
$lang->my->menu->contacts = '聯繫人|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = '任務|my|work|mode=task';
$lang->my->workMenu->story = '需求|my|work|mode=story';
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = '測試|my|work|mode=testtask&type=wait';
$lang->my->workMenu->issue = '問題|my|work|mode=issue';
$lang->my->workMenu->risk = '風險|my|work|mode=risk';
$lang->my->workMenu->task = '任務|my|work|mode=task';
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testtask = '測試|my|work|mode=testtask&type=wait';
$lang->my->workMenu->issue = '問題|my|work|mode=issue';
$lang->my->workMenu->risk = '風險|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = '任務|my|contribute|mode=task';
$lang->my->contributeMenu->story = '需求|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = '用例|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->issue = '問題|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = '風險|my|contribute|mode=risk';
$lang->my->contributeMenu->task = '任務|my|contribute|mode=task';
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testtask = '用例|my|contribute|mode=testtask&type=done';
$lang->my->contributeMenu->issue = '問題|my|contribute|mode=issue';
$lang->my->contributeMenu->risk = '風險|my|contribute|mode=risk';
$lang->my->dividerMenu = ',myProject,team,';

View File

@@ -89,14 +89,7 @@ class my extends control
$moduleIndex = array_search('my', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
if($mode == 'story' or $mode == 'requirement')
{
echo $this->fetch('my', 'story', "type=$type&storyType=$mode&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
else
{
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
@@ -118,14 +111,7 @@ class my extends control
if(($mode == 'issue' or $mode == 'risk') and $type == 'openedBy') $type = 'createdBy';
if($mode == 'story' or $mode == 'requirement')
{
echo $this->fetch('my', 'story', "type=$type&storyType=$mode&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
else
{
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
@@ -192,7 +178,6 @@ class my extends control
* My stories.
*
* @param string $type
* @param string $storyType
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
@@ -200,7 +185,7 @@ class my extends control
* @access public
* @return void
*/
public function story($type = 'assignedTo', $storyType = 'story', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function story($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true));
@@ -216,7 +201,7 @@ class my extends control
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->story;
$this->view->position[] = $this->lang->my->story;
$this->view->stories = $this->loadModel('story')->getUserStories($this->app->user->account, $type, $sort, $pager, $storyType);
$this->view->stories = $this->loadModel('story')->getUserStories($this->app->user->account, $type, $sort, $pager, 'story');
$this->view->users = $this->user->getPairs('noletter');
$this->view->projects = $this->loadModel('program')->getPRJPairs();
$this->view->type = $type;
@@ -225,7 +210,48 @@ class my extends control
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->mode = $storyType;
$this->view->mode = 'story';
$this->display();
}
/**
* My requirements.
*
* @param string $type
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function requirement($type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true));
/* Load pager. */
$this->app->loadClass('pager', $static = true);
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->story;
$this->view->position[] = $this->lang->my->story;
$this->view->stories = $this->loadModel('story')->getUserStories($this->app->user->account, $type, $sort, $pager, 'requirement');
$this->view->users = $this->user->getPairs('noletter');
$this->view->projects = $this->loadModel('program')->getPRJPairs();
$this->view->type = $type;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->mode = 'requirement';
$this->display();
}

View File

@@ -3,7 +3,6 @@ $(function()
if(typeof mode === 'string')
{
if(mode == 'testcase') mode = 'testtask';
if(mode == 'requirement') mode = 'story';
$('#subNavbar li[data-id=' + mode + ']').addClass('active');
}
var scp = $('[data-id="changePassword"] a');

View File

@@ -0,0 +1,246 @@
<?php
/**
* The story view file of my module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package my
* @version $Id
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('mode', $mode);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
if($app->rawMethod == 'work') echo html::a(inlink($app->rawMethod, "mode=requirement&type=assignedTo&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute')
{
echo html::a(inlink($app->rawMethod, "mode=requirement&type=openedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=reviewedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=closedBy&&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
}
?>
</div>
</div>
<div id="mainContent">
<?php if(!$stories):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo sprintf($lang->my->noData, $lang->URCommon);?></span></p>
</div>
<?php else:?>
<form id='myStoryForm' class="main-table table-story" data-ride="table" method="post">
<table id='storyList' class="table has-sort-head table-fixed">
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = (common::hasPriv('story', 'batchClose') and strtolower($type) != 'closedby');
$canBatchReview = common::hasPriv('story', 'batchReview');
$canBatchAssignTo = common::hasPriv('story', 'batchAssignTo');
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchAssignTo);
?>
<thead>
<tr>
<th class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri w-40px'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-5'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($stories as $story):?>
<?php
$storyLink = $this->createLink('story', 'view', "id=$story->id");
$canBeChanged = common::canBeChanged('story', $story);
?>
<tr>
<td class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' <?php if(!$canBeChanged) echo 'disabled';?>/>
<label></label>
</div>
<?php endif;?>
<?php printf('%03d', $story->id);?>
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='c-name nobr <?php if(!empty($story->children)) echo "has-child" ?>'>
<?php echo html::a($storyLink, $story->title, null, "style='color: $story->color' data-group='product'");?>
<?php if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';;?>
</td>
<td class='c-product'><?php echo $story->productTitle;?></td>
<td class='c-user'><?php echo zget($users, $story->openedBy);?></td>
<td class='c-hours'><?php echo $story->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $story->status;?>'> <?php echo $this->processStatus('story', $story);?></span></td>
<td class='c-stage'><?php echo zget($lang->story->stageList, $story->stage);?></td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
$vars = "story={$story->id}";
common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars, $story, 'list');
common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap');
}
?>
</td>
</tr>
<?php if(!empty($story->children)):?>
<?php $i = 0;?>
<?php foreach($story->children as $key => $child):?>
<?php $storyLink = $this->createLink('story', 'view', "id=$child->id");?>
<?php $class = $i == 0 ? ' table-child-top' : '';?>
<?php $class .= ($i + 1 == count($story->children)) ? ' table-child-bottom' : '';?>
<tr class='table-children<?php echo $class;?> parent-<?php echo $story->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>'>
<td class="c-id">
<?php if($canBatchAction):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[<?php echo $child->id;?>]' value='<?php echo $child->id;?>' />
<label></label>
</div>
<?php endif;?>
<?php printf('%03d', $child->id);?>
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $child->pri;?>' title='<?php echo zget($lang->story->priList, $child->pri, $child->pri);?>'><?php echo zget($lang->story->priList, $child->pri, $child->pri);?></span></td>
<td class='c-name nobr'>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">SR</span> ' . html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product'");?>
</td>
<td class='c-product'><?php echo $child->productTitle;?></td>
<td class='c-user'><?php echo zget($users, $child->openedBy);?></td>
<td class='c-hours'><?php echo $child->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $child->status;?>'> <?php echo $this->processStatus('story', $child);?></span></td>
<td class='c-stage'><?php echo zget($lang->story->stageList, $child->stage);?></td>
<td class='c-actions'>
<?php
if($canBeChanged)
{
$vars = "story={$child->id}";
common::printIcon('story', 'change', $vars, $child, 'list', 'fork');
common::printIcon('story', 'review', $vars, $child, 'list', 'glasses');
common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars, $child, 'list');
common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=&param=0&$vars", $child, 'list', 'sitemap');
}
?>
</td>
</tr>
<?php $i ++;?>
<?php endforeach;?>
<?php endif;?>
<?php endforeach;?>
</tbody>
</table>
<div class="table-footer">
<?php if($canBatchAction):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<?php
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit');
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
?>
<?php if($canBatchReview):?>
<div class="btn-group dropup">
<button type='button' class='btn' data-toggle='dropdown'><?php echo $lang->story->review;?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php
unset($lang->story->reviewResultList['']);
unset($lang->story->reviewResultList['revert']);
foreach($lang->story->reviewResultList as $key => $result)
{
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
if($key == 'reject')
{
echo "<li class='dropdown-submenu'>";
echo html::a('#', $result, '', "id='rejectItem'");
echo "<ul class='dropdown-menu'>";
unset($lang->story->reasonList['']);
unset($lang->story->reasonList['subdivided']);
unset($lang->story->reasonList['duplicate']);
foreach($lang->story->reasonList as $key => $reason)
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
echo "</li>";
}
echo '</ul></li>';
}
else
{
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"") . '</li>';
}
}
?>
</ul>
</div>
<?php endif;?>
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo');
echo html::select('assignedTo', $users, '', 'class="hidden"');
if($withSearch)
{
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
echo '</div>';
$usersPinYin = common::convert2Pinyin($users);
}
else
{
echo "<div class='dropdown-menu search-list'>";
}
echo '<div class="list-group">';
foreach($users as $key => $value)
{
if(empty($key) or $key == 'closed') continue;
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
echo html::a('javascript:$(".table-actions #assignedTo").val("' . $key . '");setFormAction("' . $actionLink . '")', '<i class="icon icon-person icon-sm"></i> ' . $value, '', $searchKey);
}
echo "</div>";
echo "</div>";
?>
</div>
<?php endif;?>
<?php if($canBatchClose):?>
<?php
$actionLink = $this->createLink('story', 'batchClose');
$misc = "data-form-action=\"$actionLink\"";
echo html::commonButton($lang->close, $misc);
?>
<?php endif;?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>

View File

@@ -14,26 +14,14 @@
<?php js::set('mode', $mode);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php $recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<span class='nav-title' style='padding-left:0px;'><?php echo $lang->URCommon;?></span>
<?php
if($app->rawMethod == 'work') echo html::a(inlink($app->rawMethod, "mode=requirement&type=assignedTo&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' && $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' && $mode == 'requirement' ? ' btn-active-text' : '') . "'");
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
if($app->rawMethod == 'work') echo html::a(inlink($app->rawMethod, "mode=story&type=assignedTo&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute')
{
echo html::a(inlink($app->rawMethod, "mode=requirement&type=openedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' && $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' && $mode == 'requirement' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=reviewedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' && $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' && $mode == 'requirement' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=requirement&type=closedBy&&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' && $mode == 'requirement' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' && $mode == 'requirement' ? ' btn-active-text' : '') . "'");
}
?>
<span class='nav-title'> | </span>
<span class='nav-title'><?php echo $lang->SRCommon;?></span>
<?php
if($app->rawMethod == 'work') echo html::a(inlink($app->rawMethod, "mode=story&type=assignedTo&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->assignedToMe}</span>" . ($type == 'assignedTo' && $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assignedTo' && $mode == 'story' ? ' btn-active-text' : '') . "'");
if($app->rawMethod == 'contribute')
{
echo html::a(inlink($app->rawMethod, "mode=story&type=openedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' && $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' && $mode == 'story' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=reviewedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' && $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' && $mode == 'story' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=closedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' && $mode == 'story' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' && $mode == 'story' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=openedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->openedByMe}</span>" . ($type == 'openedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=reviewedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->reviewedByMe}</span>" . ($type == 'reviewedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewedBy' ? ' btn-active-text' : '') . "'");
echo html::a(inlink($app->rawMethod, "mode=story&type=closedBy&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->closedByMe}</span>" . ($type == 'closedBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'closedBy' ? ' btn-active-text' : '') . "'");
}
?>
</div>
@@ -41,7 +29,7 @@
<div id="mainContent">
<?php if(!$stories):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $mode == 'story' ? sprintf($lang->my->noData, $lang->SRCommon) : sprintf($lang->my->noData, $lang->URCommon);?></span></p>
<p><span class="text-muted"><?php echo sprintf($lang->my->noData, $lang->SRCommon);?></span></p>
</div>
<?php else:?>
<form id='myStoryForm' class="main-table table-story" data-ride="table" method="post">
@@ -67,9 +55,7 @@
<th class='c-pri w-40px'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
<?php if($mode == 'story'):?>
<th class='c-plan'> <?php common::printOrderLink('plan', $orderBy, $vars, $lang->story->plan);?></th>
<?php endif;?>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='c-hours'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
@@ -99,9 +85,7 @@
<?php if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';;?>
</td>
<td class='c-product'><?php echo $story->productTitle;?></td>
<?php if($mode == 'story'):?>
<td class='c-plan'><?php echo $story->planTitle;?></td>
<?php endif;?>
<td class='c-user'><?php echo zget($users, $story->openedBy);?></td>
<td class='c-hours'><?php echo $story->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $story->status;?>'> <?php echo $this->processStatus('story', $story);?></span></td>
@@ -138,13 +122,10 @@
</td>
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $child->pri;?>' title='<?php echo zget($lang->story->priList, $child->pri, $child->pri);?>'><?php echo zget($lang->story->priList, $child->pri, $child->pri);?></span></td>
<td class='c-name nobr'>
<?php $childrenAB = $mode == 'story' ? $this->lang->story->childrenAB : 'SR';?>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">' . $childrenAB . '</span> ' . html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product'");?>
<?php echo '<span class="label label-badge label-light" title="' . $this->lang->story->children .'">' . $this->lang->story->childrenAB . '</span> ' . html::a($storyLink, $child->title, null, "style='color: $child->color' data-group='product'");?>
</td>
<td class='c-product'><?php echo $child->productTitle;?></td>
<?php if($mode == 'story'):?>
<td class='c-plan'><?php echo $child->planTitle;?></td>
<?php endif;?>
<td class='c-user'><?php echo zget($users, $child->openedBy);?></td>
<td class='c-hours'><?php echo $child->estimate;?></td>
<td class='c-status'><span class='status-story status-<?php echo $child->status;?>'> <?php echo $this->processStatus('story', $child);?></span></td>