This commit is contained in:
liuruogu
2022-09-15 00:46:51 +00:00
parent ef75b463b4
commit eb0265df2e
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -309,6 +309,11 @@ class product extends control
$productName = ($this->app->rawModule == 'projectstory' and empty($productID)) ? $this->lang->product->all : $this->products[$productID];
$project = $this->loadModel('project')->getByID($projectID);
if(empty($project->hasProduct)) unset($this->config->product->search['fields']['product']);
var_dump(empty($project->hasProduct));
/* Assign. */
$this->view->title = $productName . $this->lang->colon . $this->lang->product->browse;
$this->view->position[] = $productName;
@@ -347,7 +352,7 @@ class product extends control
$this->view->storyType = $storyType;
$this->view->from = $this->app->tab;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
$this->view->project = $this->loadModel('project')->getByID($projectID);
$this->view->project = $project;
$this->display();
}
+2
View File
@@ -59,6 +59,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<?php endif;?>
<div class="btn-toolbar pull-left">
<?php if($isProjectStory): ?>
<?php if(!empty($project->hasProduct)):?>
<div class='btn-group'>
<a href='javascript:;' class='btn btn-link btn-limit text-ellipsis' data-toggle='dropdown' style="max-width: 120px;"><span class='text' title='<?php echo $productName;?>'><?php echo $productName;?></span> <span class='caret'></span></a>
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
@@ -71,6 +72,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
?>
</ul>
</div>
<?php endif;?>
<div class="btn-group">
<a href="javascript:;" class="btn btn-link" style="padding-right: 0;"> <?php echo $moduleName;?> </a>
<?php