* finish task #2585.

This commit is contained in:
wangyidong
2016-05-24 09:30:05 +08:00
parent 02794d696c
commit 40d63415eb
6 changed files with 17 additions and 11 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ $useGuest = $this->app->user->account == 'guest';
config.ordersSaved = '<?php echo $lang->block->ordersSaved; ?>';
config.confirmRemoveBlock = '<?php echo $lang->block->confirmRemoveBlock; ?>';
var module = '<?php echo $module?>';
var useGuest = <?php echo $useGuest?>;
var useGuest = <?php echo $useGuest ? 'true' : 'false';?>;
</script>
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<?php if(isset($pageJS)) js::execute($pageJS);?>
+10 -5
View File
@@ -96,6 +96,11 @@ class productModel extends model
if($productID == 0 and $this->cookie->lastProduct) $this->session->set('product', (int)$this->cookie->lastProduct);
if($productID == 0 and $this->session->product == '') $this->session->set('product', key($products));
if(!isset($products[$this->session->product])) $this->session->set('product', key($products));
if($this->cookie->preProductID != $productID)
{
$this->cookie->set('preBranch', 0);
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot);
}
return $this->session->product;
}
@@ -778,7 +783,7 @@ class productModel extends model
public function getProductLink($module, $method, $extra, $branch = false)
{
$link = '';
if(strpos('product,roadmap,bug,testcase,testtask,story', $module) !== false)
if(strpos('product,roadmap,bug,testcase,testtask,story,qa', $module) !== false)
{
if($module == 'product' && $method == 'project')
{
@@ -788,13 +793,13 @@ class productModel extends model
{
$link = helper::createLink($module, $method, "productID=%s");
}
elseif($module == 'product' && $method == 'index')
elseif($module == 'qa' && $method == 'index')
{
$link = helper::createLink($module, $method, "locate=no&productID=%s");
$link = helper::createLink('bug', 'browse', "productID=%s" . ($branch ? "&branch=%s" : ''));
}
elseif($module == 'product' && $method == 'browse')
elseif($module == 'product' && ($method == 'browse' or $method == 'index' or $method == 'all'))
{
$link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : ''));
$link = helper::createLink($module, 'browse', "productID=%s" . ($branch ? "&branch=%s" : ''));
}
else
{
+1 -1
View File
@@ -39,7 +39,7 @@
</ul>
<div>
<?php echo html::a($this->createLink('product', 'index', "locate=no&productID=$productID"), "<i class='icon-cubes mgr-5px'></i> " . $lang->product->allProduct)?>
<?php echo html::a($this->createLink('product', 'all', "productID=$productID"), "<i class='icon-cubes mgr-5px'></i> " . $lang->product->allProduct)?>
<?php if($closeds):?>
<div class='pull-right actions'><a id='more' href='javascript:switchMore()'><?php echo $lang->product->closed;?> <i class='icon-angle-right'></i></a></div>
<?php endif;?>
+2 -1
View File
@@ -53,7 +53,8 @@ class project extends control
if($locate == 'yes') $this->locate($this->createLink('project', 'task'));
unset($this->lang->project->menu->index);
$this->project->setMenu($this->projects, key($this->projects));
$this->commonAction($projectID);
//$this->project->setMenu($this->projects, key($this->projects));
$this->view->title = $this->lang->project->index;
$this->view->position[] = $this->lang->project->index;
+2 -2
View File
@@ -1687,9 +1687,9 @@ class projectModel extends model
{
$link = helper::createLink($module, $method, "projectID=%s&type=$extra");
}
elseif($module == 'project' && $method == 'index')
elseif($module == 'project' && ($method == 'index' or $method == 'all'))
{
$link = helper::createLink($module, $method, "locate=no&status=undone&projectID=%s");
$link = helper::createLink($module, 'task', "projectID=%s");
}
else
{
+1 -1
View File
@@ -40,7 +40,7 @@
</ul>
<div>
<?php echo html::a($this->createLink('project', 'index', "locate=no&status=undone&projectID=$projectID"), "<i class='icon-th-large mgr-5px'></i> " . $lang->project->allProject)?>
<?php echo html::a($this->createLink('project', 'all', "status=undone&projectID=$projectID"), "<i class='icon-th-large mgr-5px'></i> " . $lang->project->allProject)?>
<?php if($dones):?>
<div class='pull-right actions'><a id='more' href='javascript:switchMore()'><?php echo $lang->project->doneProjects . ' <i class="icon-angle-right"></i>';?></a></div>
<?php endif;?>