* set homepage for product/project/qa.
This commit is contained in:
@@ -17,13 +17,20 @@ class qa extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function index($locate = 'yes', $productID = 0)
|
||||
public function index($locate = 'auto', $productID = 0)
|
||||
{
|
||||
if(!isset($this->config->qa->homepage)) die($this->fetch('custom', 'ajaxSetHomepage', "module=qa"));
|
||||
|
||||
$homepage = $this->config->qa->homepage;
|
||||
if($homepage == 'browse' and $locate == 'auto') $locate = 'yes';
|
||||
|
||||
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
|
||||
|
||||
$this->loadModel('product');
|
||||
$this->products = $this->product->getPairs('nocode');
|
||||
$this->qa->setMenu($this->products, $productID);
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$branch = $this->session->branch;
|
||||
$this->qa->setMenu($this->products, $productID, $branch);
|
||||
|
||||
$this->view->title = $this->lang->qa->index;
|
||||
$this->view->position[] = $this->lang->qa->index;
|
||||
|
||||
@@ -12,4 +12,12 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php echo $this->fetch('block', 'dashboard', 'module=qa');?>
|
||||
<script>
|
||||
<?php if($this->config->qa->homepage != 'index'):?>
|
||||
$(function()
|
||||
{
|
||||
$('#modulemenu .nav li.right:last').after("<li class='right'><a href='javascript:setHomepage(\"qa\", \"index\")'><i class='icon icon-home'></i><?php echo $lang->homepage?></a></li>")
|
||||
});
|
||||
<?php endif;?>
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user