* Finish task #92295.
This commit is contained in:
@@ -3399,10 +3399,11 @@ class execution extends control
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @param string $extra
|
||||
* @param string $storyType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkStory($objectID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1, $extra = '')
|
||||
public function linkStory($objectID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1, $extra = '', $storyType = 'story')
|
||||
{
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('product');
|
||||
@@ -3563,6 +3564,7 @@ class execution extends control
|
||||
$this->view->branchGroups = $branchGroups;
|
||||
$this->view->browseLink = $browseLink;
|
||||
$this->view->project = $project;
|
||||
$this->view->storyType = $storyType;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
$(function()
|
||||
{
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
$('#subNavbar li[data-id="' + storyType + '"]').addClass('active');
|
||||
|
||||
if($('#navbar .nav>li[data-id=story] .dropdown-menu').length)
|
||||
{
|
||||
$('#navbar .nav li[data-id=story]').addClass('active');
|
||||
$("#navbar>ul>li[data-id='story']>ul>li[data-id!='" + storyType + "']").removeClass('active');
|
||||
$("#navbar>ul>li[data-id='story']>ul>li[data-id='" + storyType + "']").addClass('active');
|
||||
$('#navbar .nav>li[data-id=story]>a').html($('#navbar .nav li.active [data-id=' + storyType + ']').text() + '<span class="caret"></span>');
|
||||
}
|
||||
})
|
||||
@@ -15,6 +15,7 @@
|
||||
<style>
|
||||
.search-form .form-actions {padding-bottom: 10px!important;}
|
||||
</style>
|
||||
<?php js::set('storyType', $storyType);?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->execution->linkStory;?></span></span>
|
||||
|
||||
@@ -5,7 +5,7 @@ $(function()
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
|
||||
if(vision != 'lite' && rawModule == 'projectstory' && !projectHasProduct && URAndSR)
|
||||
if(vision != 'lite' && rawModule == 'projectstory' && (!projectHasProduct || projectModel == 'ipd') && URAndSR)
|
||||
{
|
||||
$('#navbar .nav>li[data-id=story]').addClass('active');
|
||||
$('#navbar .nav>li[data-id=story]>a').html($('.active [data-id=' + storyType + ']').text() + '<span class="caret"></span>');
|
||||
|
||||
@@ -26,6 +26,7 @@ $unfoldStories = zget($unfoldStories, $productID, array());
|
||||
$isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
$projectHasProduct = $isProjectStory && !empty($project->hasProduct);
|
||||
$projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
$projectModel = isset($project->model) ? $project->model : '';
|
||||
js::set('browseType', $browseType);
|
||||
js::set('account', $this->app->user->account);
|
||||
js::set('reviewStory', $lang->product->reviewStory);
|
||||
@@ -35,6 +36,7 @@ js::set('branch', $branch);
|
||||
js::set('rawModule', $this->app->rawModule);
|
||||
js::set('productType', $this->app->tab == 'product' ? $product->type : '');
|
||||
js::set('projectHasProduct', $projectHasProduct);
|
||||
js::set('projectModel', $projectModel);
|
||||
js::set('URAndSR', $this->config->URAndSR);
|
||||
js::set('unfoldStories', $unfoldStories);
|
||||
js::set('unfoldAll', $lang->execution->treeLevel['all']);
|
||||
@@ -226,7 +228,9 @@ js::set('vision', $this->config->vision);
|
||||
}
|
||||
if(common::hasPriv('projectstory', 'linkStory'))
|
||||
{
|
||||
$buttonLink = $this->createLink('projectstory', 'linkStory', "project=$projectID");
|
||||
if($storyType == 'requirement') $lang->execution->linkStory = str_replace($lang->SRCommon, $lang->URCommon, $lang->execution->linkStory);
|
||||
|
||||
$buttonLink = $this->createLink('projectstory', 'linkStory', "project=$projectID&browseType=¶m=0&recTotal=0&recPerPage=50&pageID=1&storyType=$storyType");
|
||||
$buttonTitle = $lang->execution->linkStory;
|
||||
$dataToggle = '';
|
||||
}
|
||||
@@ -234,7 +238,7 @@ js::set('vision', $this->config->vision);
|
||||
$hidden = empty($buttonLink) ? 'hidden' : '';
|
||||
echo html::a($buttonLink, "<i class='icon-link'></i> $buttonTitle", '', "class='btn btn-primary $hidden' $dataToggle");
|
||||
|
||||
if(!empty($productID) and common::hasPriv('projectstory', 'linkStory') and common::hasPriv('projectstory', 'importPlanStories'))
|
||||
if(!empty($productID) and common::hasPriv('projectstory', 'linkStory') and common::hasPriv('projectstory', 'importPlanStories') and $projectModel != 'ipd')
|
||||
{
|
||||
echo "<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
|
||||
@@ -2830,7 +2830,7 @@ class projectModel extends model
|
||||
$lang->project->dividerMenu = $lang->{$model}->dividerMenu;
|
||||
}
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
if(empty($project->hasProduct) or $project->model == 'ipd')
|
||||
{
|
||||
unset($lang->project->menu->settings['subMenu']->products);
|
||||
$projectProduct = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($objectID)->fetch('product');
|
||||
|
||||
@@ -100,12 +100,13 @@ class projectStory extends control
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @param string $storyType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkStory($projectID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
public function linkStory($projectID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1, $storyType = 'story')
|
||||
{
|
||||
echo $this->fetch('execution', 'linkStory', "projectID=$projectID&browseType=$browseType¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
echo $this->fetch('execution', 'linkStory', "projectID=$projectID&browseType=$browseType¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&extra=&storyType=$storyType");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -520,7 +520,7 @@ class story extends control
|
||||
$execution = $this->dao->findById((int)$executionID)->from(TABLE_EXECUTION)->fetch();
|
||||
if($execution->type == 'project')
|
||||
{
|
||||
$model = $execution->model == 'waterfallplus' ? 'waterfall' : $execution->model;
|
||||
$model = in_array($execution->model, array('waterfallplus', 'ipd')) ? 'waterfall' : $execution->model;
|
||||
$model = $execution->model == 'agileplus' ? 'scrum' : $model;
|
||||
$this->project->setMenu($executionID);
|
||||
$this->lang->navGroup->story = 'project';
|
||||
|
||||
Reference in New Issue
Block a user