From cb642cff44efa472687b1b4cfc910c2948ad5e52 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 14 Feb 2020 11:48:47 +0800 Subject: [PATCH] * code for task #6870. --- module/bug/control.php | 16 ++++++++++++++-- module/repo/css/common.css | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 22b7e70f3c..05ca830344 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -544,7 +544,7 @@ class bug extends control * @access public * @return void */ - public function view($bugID) + public function view($bugID, $from = 'bug') { /* Judge bug exits or not. */ $bug = $this->bug->getById($bugID, true); @@ -555,7 +555,18 @@ class bug extends control if($bug->assignedTo == $this->app->user->account) $this->loadModel('action')->read('bug', $bugID); /* Set menu. */ - $this->bug->setMenu($this->products, $bug->product, $bug->branch); + if($from == 'bug') + { + $this->bug->setMenu($this->products, $bug->product, $bug->branch); + } + elseif($from == 'repo') + { + session_write_close(); + $this->lang->set('menugroup.bug', 'repo'); + $repos = $this->loadModel('repo')->getRepoPairs(); + $this->repo->setMenu($repos); + $this->lang->bug->menu = $this->lang->repo->menu; + } /* Get product info. */ $productID = $bug->product; @@ -576,6 +587,7 @@ class bug extends control $this->view->modulePath = $this->tree->getParents($bug->module); $this->view->bugModule = empty($bug->module) ? '' : $this->tree->getById($bug->module); $this->view->bug = $bug; + $this->view->from = $from; $this->view->branchName = $this->session->currentProductType == 'normal' ? '' : zget($branches, $bug->branch, ''); $this->view->users = $this->user->getPairs('noletter'); $this->view->actions = $this->action->getList('bug', $bugID); diff --git a/module/repo/css/common.css b/module/repo/css/common.css index 7b90ae2ae8..5b76cbfba2 100644 --- a/module/repo/css/common.css +++ b/module/repo/css/common.css @@ -76,11 +76,11 @@ h3 {font-size:16px;} .repoCode tr.commented .comment-btn {display: block;} .repoCode tr.commented .comment-btn .icon-wrapper {background: none; border: none; width: 24px; line-height: 18px; height: 18px; left: -6px; color: #4183c4} .repoCode tr.commented .comment-btn .icon-wrapper:hover {border-color: #169; color: #169} -.repoCode tr.commented .comment-btn .icon-wrapper > i:before {content: '\e750'; font-size: 18px; transform: scale(-1, 1); display: inline-block;} +.repoCode tr.commented .comment-btn .icon-wrapper > i:before {font-size: 18px; transform: scale(-1, 1); display: inline-block;} .repoCode tr.commented .comment-btn .icon-wrapper:before {display: none} .repoCode tr.over.commented .comment-btn .icon-wrapper, .repoCode tr.selected.commented .comment-btn .icon-wrapper {line-height: 20px; height: 20px; background: #4183C4; color: #fff; left: -6px} -.repoCode tr.over.commented .comment-btn .icon-wrapper > i:before {content: "\e661"; font-size: 14px;} +.repoCode tr.over.commented .comment-btn .icon-wrapper > i:before {font-size: 14px;} .repoCode tr.selected.commented .comment-btn .icon-wrapper > i:before {font-size: 14px;} .repoCode tr.over.commented .comment-btn .icon-wrapper:before, .repoCode tr.selected.commented .comment-btn .icon-wrapper:before {display: block;}