This commit is contained in:
mayue
2022-06-21 13:30:00 +08:00
parent 0f0fd55ba3
commit d97b5aeb97
16 changed files with 33 additions and 15 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ tbody tr td:first-child input {display: none;}
<tbody class='text-center'>
<?php $objectID = $this->app->tab == 'execution' ? $build->execution : $build->project;?>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=0&param=$objectID", '', true);?>
<?php $storyLink = $this->app->tab == 'execution' ? $this->createLink('execution', 'storyView', "storyID=$story->id", '', true) : $this->createLink('story', 'view', "storyID=$story->id&version=0&param=$objectID", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink):?>
+15
View File
@@ -871,6 +871,21 @@ class execution extends control
$this->display();
}
/**
* View a story.
*
* @param int $storyID
* @access public
* @return void
*/
public function storyView($storyID)
{
$this->session->set('productList', $this->app->getURI(true), 'product');
$story = $this->loadModel('story')->getByID($storyID);
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version&param=" . $this->session->execution);
}
/**
* Browse bugs of a execution.
*
+1 -1
View File
@@ -501,7 +501,7 @@ function renderStoryItem(item, $item, col)
if(!$title.length)
{
$title = $('<a class="title iframe">' + (scaleSize <= 1 ? '<i class="icon icon-lightbulb text-muted"></i> ' : '') + '<span class="text"></span></a>')
.attr('href', $.createLink('story', 'view', 'storyID=' + item.id + '&version=0&param=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%');
.attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id + '&version=0&param=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%');
$title.appendTo($item);
}
var title = rdSearchValue != '' ? "<span class='text'>" + item.title.replaceAll(rdSearchValue, "<span class='text-danger'>" + rdSearchValue + "</span>") + "</span>": "<span class='text'>" + item.title + "</span>";
+1 -1
View File
@@ -123,7 +123,7 @@ function renderStoryItem(item, $item, col)
if(!$title.length)
{
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-lightbulb text-muted"></i> ' : '') + '<span class="text"></span></a>')
.attr('href', $.createLink('story', 'view', 'storyID=' + item.id, '', true));
.attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id, '', true));
$title.appendTo($item);
}
var title = searchValue != '' ? "<span class='text'>" + item.title.replaceAll(searchValue, "<span class='text-danger'>" + searchValue + "</span>") + "</span>": "<span class='text'>" + item.title + "</span>";
+1
View File
@@ -94,6 +94,7 @@ $lang->execution->viewBug = 'Bugs';
$lang->execution->noProduct = "No {$lang->productCommon} yet.";
$lang->execution->createStory = "Create Story";
$lang->execution->storyTitle = "Story Name";
$lang->execution->storyView = "Story Detail";
$lang->execution->all = "All {$lang->executionCommon}s";
$lang->execution->undone = 'Unfinished ';
$lang->execution->unclosed = 'Unclosed';
+1
View File
@@ -94,6 +94,7 @@ $lang->execution->viewBug = '查看bug';
$lang->execution->noProduct = "无{$lang->executionCommon}";
$lang->execution->createStory = "提{$lang->SRCommon}";
$lang->execution->storyTitle = "{$lang->SRCommon}名称";
$lang->execution->storyView = "{$lang->SRCommon}详情";
$lang->execution->all = '所有';
$lang->execution->undone = '未完成';
$lang->execution->unclosed = '未关闭';
+1 -1
View File
@@ -3848,7 +3848,7 @@ class executionModel extends model
$storyItem->storyId = $story->id;
$storyItem->openedBy = zget($users, $story->openedBy);
$storyItem->assignedTo = zget($users, $story->assignedTo);
$storyItem->url = helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=execution&param=$executionID");
$storyItem->url = helper::createLink('execution', 'storyView', "storyID=$story->id&version=$story->version&from=execution&param=$executionID");
$storyItem->taskCreateUrl = helper::createLink('task', 'batchCreate', "executionID={$executionID}&story={$story->id}");
$storyTasks = isset($taskGroups[$node->id][$story->id]) ? $taskGroups[$node->id][$story->id] : array();
+2 -2
View File
@@ -69,9 +69,9 @@
<?php
if($task->storyID)
{
if(common::hasPriv('story', 'view'))
if(common::hasPriv('execution', 'storyView'))
{
echo html::a($this->createLink('story', 'view', "storyid=$task->storyID"), $task->storyTitle, '', "class='preview'", true, isonlybody());
echo html::a($this->createLink('execution', 'storyView', "storyid=$task->storyID"), $task->storyTitle, '', "class='preview'", true, isonlybody());
}
else
{
+1 -1
View File
@@ -55,7 +55,7 @@
<tbody>
<?php $storyCount = 0;?>
<?php foreach($allStories as $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
<?php $storyLink = $this->createLink('execution', 'storyView', "storyID=$story->id", '', true);?>
<tr>
<td class='cell-id'>
<?php echo html::checkbox('stories', array($story->id => sprintf('%03d', $story->id)));?>
+1 -1
View File
@@ -215,7 +215,7 @@
<tbody id='storyTableList' class='sortable'>
<?php foreach($stories as $key => $story):?>
<?php
$storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=$story->version&param=$execution->id");
$storyLink = $this->createLink('execution', 'storyView', "storyID=$story->id&version=$story->version&param=$execution->id");
$totalEstimate += $story->estimate;
?>
<tr id="story<?php echo $story->id;?>" data-id='<?php echo $story->id;?>' data-order='<?php echo $story->order ?>' data-estimate='<?php echo $story->estimate?>' data-cases='<?php echo zget($storyCases, $story->id, 0)?>'>
+1 -1
View File
@@ -80,7 +80,7 @@ $account = $this->app->user->account;
<?php if(!empty($stories[$col])):?>
<?php foreach($stories[$col] as $story):?>
<div class='board-item' data-id='<?php echo $story->id?>' id='story-<?php echo $story->id?>' data-type='story'>
<?php echo html::a($this->createLink('story', 'view', "story=$story->id", '', true), "#{$story->id} {$story->title}", '', 'class="title kanbaniframe" title="' . $story->title . '"');?>
<?php echo html::a($this->createLink('execution', 'storyView', "story=$story->id", '', true), "#{$story->id} {$story->title}", '', 'class="title kanbaniframe" title="' . $story->title . '"');?>
<div class='info'>
<span class='label-pri label-pri-<?php echo $story->pri?>' title='<?php echo $lang->story->pri?>'><?php echo zget($lang->story->priList, $story->pri);?></span>
<span class='status status-story status-<?php echo $story->status;?>' title='<?php echo $lang->story->status?>'><span class="label label-dot"></span> <?php echo $lang->story->statusList[$story->status];?></span>
+3 -3
View File
@@ -89,7 +89,7 @@
{
foreach($story->planTitle as $planID => $planTitle)
{
if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $lanTitle;
if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle)) echo $planTitle;
echo '<br />';
}
}
@@ -258,7 +258,7 @@
<?php
foreach($linkStories as $linkStoryID)
{
if(isset($story->extraStories[$linkStoryID])) echo '<li>' . html::a($this->createLink('story', 'view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '</li>';
if(isset($story->extraStories[$linkStoryID])) echo '<li>' . html::a($this->createLink('execution', 'storyView', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID]) . '</li>';
}
?>
</ul>
@@ -276,7 +276,7 @@
<?php
foreach($childStories as $childStoryID)
{
if(isset($story->extraStories[$childStoryID])) echo '<li>' . html::a($this->createLink('story', 'view', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '</li>';
if(isset($story->extraStories[$childStoryID])) echo '<li>' . html::a($this->createLink('execution', 'storyView', "storyID=$childStoryID"), "#$childStoryID " . $story->extraStories[$childStoryID]) . '</li>';
}
?>
</ul>
+1
View File
@@ -769,6 +769,7 @@ $lang->resource->execution->whitelist = 'whitelist';
$lang->resource->execution->addWhitelist = 'addWhitelist';
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
$lang->resource->execution->storyEstimate = 'storyEstimate';
$lang->resource->execution->storyView = 'storyView';
if($config->systemMode == 'new') $lang->resource->execution->executionkanban = 'kanbanAction';
$lang->resource->execution->kanban = 'RDKanban';
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
+1 -1
View File
@@ -4137,7 +4137,7 @@ class storyModel extends model
$canView = common::hasPriv($module, 'view');
$tab = $this->app->tab;
$executionID = empty($execution) ? $this->session->execution : $execution->id;
$storyLink = $tab == 'execution' ? helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&param=$executionID") : helper::createLink($module, 'view', "storyID=$story->id");
$storyLink = $tab == 'execution' ? helper::createLink('execution', 'storyView', "storyID=$story->id") : helper::createLink($module, 'view', "storyID=$story->id");
$account = $this->app->user->account;
/* Check the product is closed. */
+1 -1
View File
@@ -268,7 +268,7 @@
{
foreach($story->planTitle as $planID => $planTitle)
{
if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle, '', "data-app='product'")) echo $lanTitle;
if(!common::printLink('productplan', 'view', "planID=$planID", $planTitle, '', "data-app='product'")) echo $planTitle;
echo '<br />';
}
}
+1 -1
View File
@@ -246,7 +246,7 @@
<?php
if(!$task->storyTitle) echo $lang->noData;
$class = isonlybody() ? 'showinonlybody' : 'iframe';
if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class=$class data-width='80%'", true, true)) echo $task->storyTitle;
if($task->storyTitle and !common::printLink('execution', 'storyView', "storyID=$task->story", $task->storyTitle, '', "class=$class data-width='80%'", true, true)) echo $task->storyTitle;
if($task->needConfirm)
{
echo "(<span class='warning'>{$lang->story->changed}</span> ";