* Finish task #64967.

This commit is contained in:
tianshujie
2022-08-19 16:29:53 +08:00
parent 36347984e3
commit c990e09f61
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -97,6 +97,7 @@ class datatable extends control
unset($cols['taskCount']);
unset($cols['bugCount']);
unset($cols['caseCount']);
$cols['title']['title'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->title);
}
$this->view->cols = $cols;
+4 -3
View File
@@ -402,12 +402,13 @@
<div class='tab-pane active' id='legendStories'>
<ul class="list-unstyled">
<?php
$relation = array();
$canViewLinkStory = $story->type == 'story' ? common::hasPriv('requirement', 'view') : common::hasPriv('story', 'view');
$relation = array();
$relationType = $story->type == 'story' ? 'requirement' : 'story';
$canViewLinkStory = common::hasPriv($relationType, 'view', null, "storyType=$relationType");
foreach($relations as $item) $relation[$item->id] = $item->title;
foreach($relation as $id => $title)
{
echo "<li title='$title'>" . ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id&version=0&param=0&storyType=$story->type", '', true), "#$id $title", '', "class='iframe' data-width='80%'") : "#$id $title");
echo "<li title='$title'>" . ($canViewLinkStory ? html::a($this->createLink('story', 'view', "id=$id&version=0&param=0&storyType=$relationType", '', true), "#$id $title", '', "class='iframe' data-width='80%'") : "#$id $title");
echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=remove&linkedID=$id"), '<i class="icon icon-close"></i>', 'hiddenwin', "class='deleter hide removeButton'");
}
?>