* set homepage for product/project/qa.

This commit is contained in:
wangyidong
2016-04-15 11:32:46 +08:00
parent 7e7e14b9db
commit c5dcca79bf
17 changed files with 128 additions and 15 deletions
+9 -2
View File
@@ -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;
+8
View File
@@ -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';?>