* Fix show grade bug.
This commit is contained in:
@@ -65,7 +65,7 @@ window.renderCell = function(result, info)
|
||||
if(story.parent > 0) if($.cookie.get('tab') == 'project') html += story.parentName + ' / ';
|
||||
|
||||
let gradeLabel = gradeGroup[story.type][story.grade];
|
||||
if(!showGrade && story.grade < 2) gradeLabel = '';
|
||||
if(!showGrade && story.grade < 2 && storyType == story.type) gradeLabel = '';
|
||||
if(gradeLabel) html += "<span class='label gray-pale rounded-xl clip'>" + gradeLabel + "</span> ";
|
||||
if(story.color) result[0].props.style = 'color: ' + story.color;
|
||||
if(html) result.unshift({html});
|
||||
|
||||
@@ -18,6 +18,7 @@ jsVar('URChanged', $this->lang->story->URChanged);
|
||||
jsVar('gradeGroup', $gradeGroup);
|
||||
jsVar('showGrade', $showGrade);
|
||||
jsVar('oldShowGrades', $showGrades);
|
||||
jsVar('storyType', $storyType);
|
||||
|
||||
$storyCommon = $storyType == 'requirement' ? $lang->URCommon : $lang->SRCommon;
|
||||
$isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
@@ -320,7 +321,7 @@ if($isProjectStory and $storyType == 'requirement')
|
||||
$queryMenuLink = createLink($app->rawModule, $app->rawMethod, $projectIDParam . "productID=$productID&branch=$branch&browseType=bySearch¶m={queryID}");
|
||||
featureBar
|
||||
(
|
||||
$showGrade ? to::leading
|
||||
($showGrade || $storyType != 'story') ? to::leading
|
||||
(
|
||||
picker
|
||||
(
|
||||
|
||||
@@ -1470,7 +1470,7 @@ class productZen extends product
|
||||
$this->view->project = $project;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->gradeGroup = $gradeGroup;
|
||||
$this->view->showGrade = count($gradeGroup[$storyType]) > 1;
|
||||
$this->view->showGrade = count($gradeGroup[$storyType]) > 2;
|
||||
$this->view->gradeMenu = $this->loadModel('story')->getGradeMenu($storyType);
|
||||
$this->view->showGrades = isset($this->config->{$storyType}->showGrades) ? $this->config->{$storyType}->showGrades : $this->story->getDefaultShowGrades($this->view->gradeMenu);
|
||||
$this->view->storyType = $storyType;
|
||||
|
||||
@@ -5011,6 +5011,8 @@ class storyModel extends model
|
||||
{
|
||||
$grades = $this->getGradePairs($storyType);
|
||||
|
||||
if($this->config->edition == 'open') return false;
|
||||
|
||||
return count($grades) > 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user