* Fix bug #30132.
This commit is contained in:
@@ -1434,6 +1434,35 @@ class block extends control
|
||||
$this->view->releases = $releases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print scrum issue block.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function printScrumIssueBlock()
|
||||
{
|
||||
$uri = $this->app->tab == 'my' ? $this->createLink('my', 'index') : $this->server->http_referer;
|
||||
$this->session->set('issueList', $uri, 'project');
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print scrum risk block.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function printScrumRiskBlock()
|
||||
{
|
||||
$uri = $this->app->tab == 'my' ? $this->createLink('my', 'index') : $this->server->http_referer;
|
||||
$this->session->set('riskList', $uri, 'project');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->risks = $this->loadModel('risk')->getBlockRisks($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print sprint block.
|
||||
*
|
||||
|
||||
@@ -750,6 +750,51 @@ class blockModel extends model
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scrum issue params.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getScrumIssueParams($module = '')
|
||||
{
|
||||
$this->app->loadLang('issue');
|
||||
|
||||
$params = $this->appendCountParams();
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->issue->labelList;
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
$params->orderBy['options'] = $this->lang->block->orderByList->product;
|
||||
$params->orderBy['control'] = 'select';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scrum risk params.
|
||||
*
|
||||
* @param string $module▫
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getScrumRiskParams($module = '')
|
||||
{
|
||||
$this->app->loadLang('risk');
|
||||
$params = $this->appendCountParams();
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->risk->featureBar['browse'];
|
||||
$params->type['control'] = 'select';
|
||||
|
||||
$params->orderBy['name'] = $this->lang->block->orderBy;
|
||||
$params->orderBy['options'] = $this->lang->block->orderByList->product;
|
||||
$params->orderBy['control'] = 'select';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get execution params.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php if(empty($issues)): ?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<style>
|
||||
.block-issues .c-id {width: 55px;}
|
||||
.block-issues .c-status {width: 80px;}
|
||||
.block-issues.block-sm .c-status {text-align: center;}
|
||||
.c-assignedTo {width: 100px; padding:0px !important;text-align:center;}
|
||||
.c-severity, .c-pri {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-issues <?php if(!$longBlock) echo 'block-sm';?>'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-status'><?php echo $lang->issue->type;?></th>
|
||||
<th class='c-name'> <?php echo $lang->issue->title;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-status'><?php echo $lang->issue->severity;?></th>
|
||||
<th class='c-number'><?php echo $lang->issue->pri;?></th>
|
||||
<th class='c-user'><?php echo $lang->issue->owner;?></th>
|
||||
<th class='c-assignedTo'><?php echo $lang->issue->assignedTo;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-status'><?php echo $lang->issue->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($issues as $issue):?>
|
||||
<?php
|
||||
$viewLink = $this->createLink('issue', 'view', "issueID={$issue->id}");
|
||||
?>
|
||||
<tr>
|
||||
<td class='c-id-xs'><?php echo sprintf('%03d', $issue->id);?></td>
|
||||
<td class='c-type'><?php echo zget($lang->issue->typeList, $issue->type);?></td>
|
||||
<td class='c-name' title='<?php echo $issue->title?>'><?php echo html::a($viewLink, $issue->title);?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-severity'><?php echo zget($lang->issue->severityList, $issue->severity, $issue->severity)?></td>
|
||||
<td class='c-pri'><?php echo zget($lang->issue->priList, $issue->pri, $issue->pri)?></td>
|
||||
<td><?php echo zget($users, $issue->owner, $issue->owner)?></td>
|
||||
<td class='c-assignedTo'><?php echo zget($users, $issue->assignedTo, $issue->assignedTo)?></td>
|
||||
<?php endif;?>
|
||||
<td class='c-status'>
|
||||
<span class="status-issue status-<?php echo $issue->status?>"><?php echo zget($lang->issue->statusList, $issue->status);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php if(empty($risks)): ?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<style>
|
||||
.block-risks .c-id {width: 40px;}
|
||||
.block-risks .c-pri {width: 85px; text-align: center;}
|
||||
.block-risks .c-strategy, .block-risks .c-status {width: 80px;}
|
||||
.block-risks .c-user, .block-risks .c-rate, .block-risks .c-category {width: 110px;}
|
||||
.c-rate, .c-category {text-align:center;}
|
||||
.c-assignedTo {width: 100px; padding:0px !important;text-align:center;}
|
||||
.pri-low {color: #000000;}
|
||||
.pri-middle {color: #FF9900;}
|
||||
.pri-high {color: #E53333;}
|
||||
</style>
|
||||
<div class='panel-body has-table scrollbar-hover'>
|
||||
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-risks <?php if(!$longBlock) echo 'block-sm';?>'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-name'><?php echo $lang->risk->name;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-strategy'> <?php echo $lang->risk->strategy;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-status'><?php echo $lang->risk->status;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-rate'><?php echo $lang->risk->rate;?></th>
|
||||
<th class='c-pri'><?php echo $lang->risk->pri;?></th>
|
||||
<th class='c-assignedTo text-center'><?php echo $lang->risk->assignedTo;?></th>
|
||||
<th class='c-category'><?php echo $lang->risk->category;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($risks as $risk):?>
|
||||
<?php
|
||||
$viewLink = $this->createLink('risk', 'view', "riskID={$risk->id}");
|
||||
?>
|
||||
<tr>
|
||||
<td class='c-id-xs'><?php echo sprintf('%03d', $risk->id);?></td>
|
||||
<td class='c-name' title='<?php echo $risk->name?>'><?php echo html::a($viewLink, $risk->name);?></td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-strategy'><?php echo zget($lang->risk->strategyList, $risk->strategy, $risk->strategy)?></td>
|
||||
<?php endif;?>
|
||||
<td class='c-status'>
|
||||
<span class="status-risk status-<?php echo $risk->status?>"><?php echo zget($lang->risk->statusList, $risk->status);?></span>
|
||||
</td>
|
||||
<?php if($longBlock):?>
|
||||
<td class='c-rate'><?php echo $risk->rate?></td>
|
||||
<td class='c-pri'><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
|
||||
<td class='c-assignedTo'><?php echo zget($users, $risk->assignedTo, $risk->assignedTo)?></td>
|
||||
<td class='c-category'><?php echo zget($lang->risk->categoryList, $risk->category, $risk->category)?></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
Reference in New Issue
Block a user