* Fix bug#14454.
This commit is contained in:
@@ -1711,12 +1711,13 @@ class block extends control
|
||||
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true;
|
||||
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
|
||||
|
||||
$params = $this->get->param;
|
||||
$params = json_decode(base64_decode($params));
|
||||
$count = array();
|
||||
$objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories');
|
||||
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount');
|
||||
$objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories', 'requirement' => 'requirements');
|
||||
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount');
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$objectList += array('risk' => 'risks', 'issue' => 'issues');
|
||||
@@ -1728,18 +1729,19 @@ class block extends control
|
||||
{
|
||||
if(!isset($hasViewPriv[$objectType])) continue;
|
||||
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
$table = $objectType == 'requirement' ? TABLE_STORY : $this->config->objectTables[$objectType];
|
||||
$orderBy = $objectType == 'todo' ? "`date` desc" : 'id_desc';
|
||||
$limitCount = isset($params->{$objectCount}) ? $params->{$objectCount} : 0;
|
||||
$objects = $this->dao->select('t1.*')->from($table)->alias('t1')
|
||||
->beginIF($objectType == 'story')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')->fi()
|
||||
->beginIF($objectType == 'story' or $objectType == 'requirement')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')->fi()
|
||||
->beginIF($objectType == 'bug')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')->fi()
|
||||
->beginIF($objectType == 'task')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id')->fi()
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
|
||||
->beginIF($objectType == 'story')->andWhere('t1.type')->eq('story')->andWhere('t2.deleted')->eq('0')->fi()
|
||||
->beginIF($objectType == 'requirement')->andWhere('t1.type')->eq('requirement')->andWhere('t2.deleted')->eq('0')->fi()
|
||||
->beginIF($objectType == 'bug')->andWhere('t2.deleted')->eq('0')->fi()
|
||||
->beginIF($objectType == 'story')->andWhere('t2.deleted')->eq('0')->fi()
|
||||
->beginIF($objectType == 'story' or $objectType == 'requirement')->andWhere('t2.deleted')->eq('0')->fi()
|
||||
->beginIF($objectType == 'todo')->andWhere('t1.cycle')->eq(0)->andWhere('t1.status')->eq('wait')->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF($objectType != 'todo')->andWhere('t1.status')->ne('closed')->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
+16
-15
@@ -337,21 +337,22 @@ $lang->block->count = 'Count';
|
||||
$lang->block->type = 'Type';
|
||||
$lang->block->orderBy = 'Order by';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = 'My schedule';
|
||||
$lang->block->availableBlocks->task = 'My Tasks';
|
||||
$lang->block->availableBlocks->bug = 'My Bugs';
|
||||
$lang->block->availableBlocks->case = 'My Cases';
|
||||
$lang->block->availableBlocks->story = 'My Stories';
|
||||
$lang->block->availableBlocks->product = $lang->productCommon . 's';
|
||||
$lang->block->availableBlocks->execution = $lang->executionCommon . 's';
|
||||
$lang->block->availableBlocks->plan = 'Plans';
|
||||
$lang->block->availableBlocks->release = 'Releases';
|
||||
$lang->block->availableBlocks->build = 'Builds';
|
||||
$lang->block->availableBlocks->testtask = 'Requests';
|
||||
$lang->block->availableBlocks->risk = 'My Risks';
|
||||
$lang->block->availableBlocks->issue = 'My Issues';
|
||||
$lang->block->availableBlocks->meeting = 'My Meetings';
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = 'My schedule';
|
||||
$lang->block->availableBlocks->task = 'My Tasks';
|
||||
$lang->block->availableBlocks->bug = 'My Bugs';
|
||||
$lang->block->availableBlocks->case = 'My Cases';
|
||||
$lang->block->availableBlocks->story = 'My Stories';
|
||||
$lang->block->availableBlocks->requirement = 'My Requirements';
|
||||
$lang->block->availableBlocks->product = $lang->productCommon . 's';
|
||||
$lang->block->availableBlocks->execution = $lang->executionCommon . 's';
|
||||
$lang->block->availableBlocks->plan = 'Plans';
|
||||
$lang->block->availableBlocks->release = 'Releases';
|
||||
$lang->block->availableBlocks->build = 'Builds';
|
||||
$lang->block->availableBlocks->testtask = 'Requests';
|
||||
$lang->block->availableBlocks->risk = 'My Risks';
|
||||
$lang->block->availableBlocks->issue = 'My Issues';
|
||||
$lang->block->availableBlocks->meeting = 'My Meetings';
|
||||
|
||||
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
|
||||
+16
-15
@@ -337,21 +337,22 @@ $lang->block->count = '数量';
|
||||
$lang->block->type = '类型';
|
||||
$lang->block->orderBy = '排序';
|
||||
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = '我的日程';
|
||||
$lang->block->availableBlocks->task = '我的任务';
|
||||
$lang->block->availableBlocks->bug = '我的Bug';
|
||||
$lang->block->availableBlocks->case = '我的用例';
|
||||
$lang->block->availableBlocks->story = "我的{$lang->SRCommon}";
|
||||
$lang->block->availableBlocks->product = $lang->productCommon . '列表';
|
||||
$lang->block->availableBlocks->execution = $lang->executionCommon . '列表';
|
||||
$lang->block->availableBlocks->plan = "计划列表";
|
||||
$lang->block->availableBlocks->release = '发布列表';
|
||||
$lang->block->availableBlocks->build = '版本列表';
|
||||
$lang->block->availableBlocks->testtask = '测试版本列表';
|
||||
$lang->block->availableBlocks->risk = '我的风险';
|
||||
$lang->block->availableBlocks->issue = '我的问题';
|
||||
$lang->block->availableBlocks->meeting = '我的会议';
|
||||
$lang->block->availableBlocks = new stdclass();
|
||||
$lang->block->availableBlocks->todo = '我的日程';
|
||||
$lang->block->availableBlocks->task = '我的任务';
|
||||
$lang->block->availableBlocks->bug = '我的Bug';
|
||||
$lang->block->availableBlocks->case = '我的用例';
|
||||
$lang->block->availableBlocks->story = "我的{$lang->SRCommon}";
|
||||
$lang->block->availableBlocks->requirement = "我的{$lang->URCommon}";
|
||||
$lang->block->availableBlocks->product = $lang->productCommon . '列表';
|
||||
$lang->block->availableBlocks->execution = $lang->executionCommon . '列表';
|
||||
$lang->block->availableBlocks->plan = "计划列表";
|
||||
$lang->block->availableBlocks->release = '发布列表';
|
||||
$lang->block->availableBlocks->build = '版本列表';
|
||||
$lang->block->availableBlocks->testtask = '测试版本列表';
|
||||
$lang->block->availableBlocks->risk = '我的风险';
|
||||
$lang->block->availableBlocks->issue = '我的问题';
|
||||
$lang->block->availableBlocks->meeting = '我的会议';
|
||||
|
||||
if($config->systemMode == 'new') $lang->block->moduleList['project'] = '项目';
|
||||
$lang->block->moduleList['product'] = $lang->productCommon;
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* The requirement block view file of block 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 Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package block
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php $this->app->loadLang('story');?>
|
||||
<?php if(empty($requirements)): ?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<style>
|
||||
.block-stories .c-id {width: 55px;}
|
||||
.block-stories .c-pri {width: 45px;text-align: center;}
|
||||
.block-stories .c-estimate {width: 65px; text-align: right;}
|
||||
.block-stories .c-status {width: 80px;}
|
||||
.block-stories .c-stage {width: 80px;}
|
||||
.block-stories.block-sm .estimate,
|
||||
.block-stories.block-sm .c-stage,
|
||||
.block-stories.block-sm .c-status {text-align: center;}
|
||||
</style>
|
||||
<div class='panel-body has-table scrollbar-hover'>
|
||||
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-id"><?php echo $lang->idAB?></th>
|
||||
<th class="c-pri"><?php echo $lang->priAB?></th>
|
||||
<th class="c-name"><?php echo $lang->URCommon;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-estimate'><?php echo $lang->story->estimateAB;?></th>
|
||||
<th class="c-status"><?php echo $lang->statusAB;?></th>
|
||||
<th class='c-stage'><?php echo $lang->story->stageAB;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($requirements as $story):?>
|
||||
<?php
|
||||
$appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : '';
|
||||
$viewLink = $this->createLink('story', 'view', "storyID={$story->id}");
|
||||
?>
|
||||
<tr <?php echo $appid?>>
|
||||
<td class="c-id-xs"><?php echo sprintf('%03d', $story->id);?></td>
|
||||
<td class="c-pri"><span class="label-pri label-pri-<?php echo $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" style='color: <?php echo $story->color?>' title='<?php echo $story->title?>'><?php echo html::a($viewLink, $story->title);?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-estimate text-center' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit?></td>
|
||||
<?php $status = $this->processStatus('story', $story);?>
|
||||
<td class='c-status' title='<?php echo $status;?>'>
|
||||
<span class="status-story status-<?php echo $story->status?>"><?php echo $status;?></span>
|
||||
</td>
|
||||
<td class='c-stage'>
|
||||
<span class='story-stage-<?php echo $story->stage?>'>
|
||||
<?php echo zget($lang->story->stageList, $story->stage, $story->stage);?>
|
||||
</span>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
Reference in New Issue
Block a user