* adjust the products of current project, if no products, no create story link.
This commit is contained in:
@@ -376,9 +376,15 @@ class project extends control
|
||||
$storyTasks = $this->task->getStoryTaskCounts(array_keys($stories), $projectID);
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* Get project's product. */
|
||||
$productID = 0;
|
||||
$products = $this->loadModel('product')->getProductsByProject($projectID);
|
||||
if($products) $productID = key($products);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='f-left'><?php echo $lang->project->story;?></div>
|
||||
<div class='f-right'>
|
||||
<?php
|
||||
common::printLink('story', 'create', "productID=0&moduleID=0&story=0&project=$project->id", $lang->story->create);
|
||||
if($productID) common::printLink('story', 'create', "productID=0&moduleID=0&story=0&project=$project->id", $lang->story->create);
|
||||
if(common::hasPriv('project', 'linkstory')) echo html::a($this->createLink('project', 'linkstory', "project=$project->id"), $lang->project->linkStory);
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user