* show child label.
This commit is contained in:
@@ -46,7 +46,12 @@
|
||||
<?php echo html::checkbox('stories', array($story->id => sprintf('%03d', $story->id)), ($story->stage == 'developed' or $story->status == 'closed') ? $story->id : '');?>
|
||||
</td>
|
||||
<td><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='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
|
||||
@@ -130,7 +130,12 @@ tbody tr td:first-child input{display:none;}
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td><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='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($storyLink,$story->title, '', "class='iframe' data-width='1000'");?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink,$story->title, '', "class='iframe' data-width='1000'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td>
|
||||
|
||||
@@ -50,7 +50,12 @@
|
||||
<td><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><?php echo $story->planTitle;?></td>
|
||||
<td title='<?php echo $modules[$story->module]?>' class='text-left'><?php echo $modules[$story->module];?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
|
||||
@@ -145,7 +145,12 @@
|
||||
<?php if($canOrder):?><td class='sort-handler'><i class='icon-move'></i></td><?php endif;?>
|
||||
<td><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='text-left nobr'><?php echo zget($modulePairs, $story->module, '');?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($viewLink , $story->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($viewLink , $story->title);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
|
||||
@@ -64,7 +64,12 @@
|
||||
<td><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='text-left' title='<?php echo $products[$story->product]->name?>'><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo zget($modules, $story->module, '')?>'><?php echo zget($modules, $story->module, '')?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story->title?>"><?php echo html::a($storyLink, $story->title);?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story->title?>">
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink, $story->title);
|
||||
?>
|
||||
</td>
|
||||
<td title='<?php echo $story->planTitle;?>'><?php echo $story->planTitle;?></td>
|
||||
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
|
||||
<?php if($productType != 'normal'):?>
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
<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' title="<?php echo $story->title?>">
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch])) echo "<span class='label label-outline label-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";?>
|
||||
<?php echo html::a($storyLink,$story->title, null, "style='color: $story->color'");?>
|
||||
</td>
|
||||
<td class='c-user' title='<?php echo zget($users, $story->openedBy);?>'><?php echo zget($users, $story->openedBy);?></td>
|
||||
|
||||
@@ -50,7 +50,12 @@
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
|
||||
@@ -105,7 +105,12 @@
|
||||
<?php echo sprintf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><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='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($storyLink,$story->title, '', "class='preview'");?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink,$story->title, '', "class='preview'");
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td>
|
||||
|
||||
@@ -1332,7 +1332,7 @@ class story extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetProductStories($productID, $branch = 0, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full')
|
||||
public function ajaxGetProductStories($productID, $branch = 0, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '', $limit = 0, $type = 'full', $hasParent = 1)
|
||||
{
|
||||
if($moduleID)
|
||||
{
|
||||
@@ -1348,7 +1348,7 @@ class story extends control
|
||||
$storyStatus = array_keys($storyStatus);
|
||||
}
|
||||
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type);
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
$select = html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");
|
||||
|
||||
/* If only need options, remove select wrap. */
|
||||
|
||||
@@ -1610,10 +1610,11 @@ class storyModel extends model
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
* @param string $storyType requirement|story
|
||||
* @param bool $hasParent
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProductStoryPairs($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story')
|
||||
public function getProductStoryPairs($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story', $hasParent = true)
|
||||
{
|
||||
if($branch) $branch = "0,$branch";//Fix bug 1059.
|
||||
$stories = $this->dao->select('t1.id, t1.title, t1.module, t1.pri, t1.estimate, t2.name AS product')
|
||||
@@ -1622,6 +1623,7 @@ class storyModel extends model
|
||||
->beginIF($productID)->andWhere('t1.product')->in($productID)->fi()
|
||||
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
|
||||
->beginIF(!$hasParent)->andWhere('t1.parent')->ge(0)->fi()
|
||||
->beginIF($status and $status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t1.type')->eq($storyType)
|
||||
|
||||
@@ -328,7 +328,7 @@ class testcase extends control
|
||||
$modules = $this->loadModel('tree')->getStoryModule($currentModuleID);
|
||||
$modules = $this->tree->getAllChildID($modules);
|
||||
}
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch, $modules, array_keys($storyStatus), 'id_desc', 50, 'null');
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch, $modules, array_keys($storyStatus), 'id_desc', 50, 'null', 'story', false);
|
||||
if($storyID and !isset($stories[$storyID])) $stories = $this->story->formatStories(array($storyID => $story)) + $stories;//Fix bug #2406.
|
||||
|
||||
/* Set custom. */
|
||||
|
||||
@@ -23,7 +23,7 @@ $(document).ready(function()
|
||||
}
|
||||
}
|
||||
}
|
||||
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ ($(select).val() || '0') + '&onlyOption=true&status=noclosed&limit=0&type=null');
|
||||
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ ($(select).val() || '0') + '&onlyOption=true&status=noclosed&limit=0&type=null&hasParent=0');
|
||||
var $story = $('#story' + index);
|
||||
if($story.data('loadLink') !== link)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user