diff --git a/module/doc/model.php b/module/doc/model.php index c1a8d7fe5c..8513f66b62 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1335,8 +1335,21 @@ class docModel extends model } elseif($type == 'project') { - $taskIdList = $this->dao->select('id')->from(TABLE_TASK)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->sprints)->get(); - $buildIdList = $this->dao->select('id')->from(TABLE_BUILD)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); + $taskPairs = $this->dao->select('id, PRJ')->from(TABLE_TASK)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->sprints)->fetchPairs('id', 'PRJ'); + $taskIdList = 0; + if(!empty($taskPairs)) + { + $taskIdList = array_keys($taskPairs); + $taskIdList = implode(',', $taskIdList); + } + + $buildPairs = $this->dao->select('id, PRJ')->from(TABLE_BUILD)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->sprints)->fetchPairs('id', 'PRJ'); + $buildIdList = 0; + if(!empty($buildPairs)) + { + $buildIdList = array_keys($buildPairs); + $buildIdList = implode(',', $buildIdList); + } $files = $this->dao->select('*')->from(TABLE_FILE)->alias('t1') ->where('size')->gt('0') ->andWhere("(objectType = 'project' and objectID = $objectID)", true) @@ -1352,6 +1365,8 @@ class docModel extends model foreach($files as $fileID => $file) { + if($type == 'project' && $file->objectType == 'task') $file->PRJ = $taskPairs[$file->objectID]; + if($type == 'project' && $file->objectType == 'build') $file->PRJ = $buildPairs[$file->objectID]; $pathName = $this->file->getRealPathName($file->pathname); $file->realPath = $this->file->savePath . $pathName; $file->webPath = $this->file->webPath . $pathName; diff --git a/module/doc/view/showfiles.html.php b/module/doc/view/showfiles.html.php index 0955e7b5eb..06f1ebe58a 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -135,7 +135,17 @@ } ?> -
objectID");?>' title='addedDate, 0, 10)?>'>title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?>
+ objectType, array('task', 'build'))) + { + $objectLink = $this->createLink($file->objectType, 'view', "objectID=$file->objectID", '', '', $file->PRJ); + } + else + { + $objectLink = $this->createLink($file->objectType, 'view', "objectID=$file->objectID"); + } + ?> +
title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?>
diff --git a/module/index/css/index.css b/module/index/css/index.css index 945a519d84..a79b127045 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -89,7 +89,7 @@ body.menu-hide {padding-left: 0;} #searchbox .dropdown-menu>li.active>a, #searchbox .dropdown-menu>li.selected>a { position: relative; color: #fff; background-color: #16a8f8;} #searchbox .dropdown-menu>li.selected>a:after {position: absolute; top: 2px; right: 4px; display: block; font-family: ZentaoIcon; font-size: 18px; font-size: 14px; font-style: normal; font-weight: 400; font-variant: normal; line-height: 1; line-height: 20px; text-transform: none; content: "\e5ca"; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;} -#upgradeContent {display:none; position: absolute; right: 30px; top: -290px; height:282px; background-color: #fff; left: 0px; padding: 5px 0; border: 1px solid rgba(0,0,0,.15); border-color: rgba(0,0,0,.1); opacity: 1; border-radius: 4px; box-shadow: 0 6px 12px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.1);} +#upgradeContent {display:none; position: absolute; right: 10px; top: -290px; height:282px; background-color: #fff; left: 0px; padding: 5px 0; border: 1px solid rgba(0,0,0,.15); border-color: rgba(0,0,0,.1); opacity: 1; border-radius: 4px; box-shadow: 0 6px 12px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.1);} #latestVersionList {height: 190px; overflow: auto;} .version-name {width: 20%;} @@ -99,8 +99,8 @@ body.menu-hide {padding-left: 0;} @media screen and (max-height: 768px) { -.version-name {width: 25%;} -.version-date {width: 20%; color: #8a8a8a;} -.version-explain {width: 25%; color: #8a8a8a; overflow: hidden; text-overflow:ellipsis; white-space: nowrap;} -.version-actions {width: 30%;} + .version-name {width: 25%;} + .version-date {width: 20%; color: #8a8a8a;} + .version-explain {width: 25%; color: #8a8a8a; overflow: hidden; text-overflow:ellipsis; white-space: nowrap;} + .version-actions {width: 30%;} } diff --git a/module/misc/control.php b/module/misc/control.php index f35f652925..49e851aa82 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -66,7 +66,8 @@ class misc extends control public function checkUpdate($sn = '') { session_write_close(); - $link = $this->lang->misc->api . "/updater-getLatest-{$this->config->version}-zentao.html?lang=" . str_replace('-', '_', $this->app->getClientLang()); + $source = isset($this->config->qcVersion) ? 'qucheng' : 'zentao'; + $link = $this->lang->misc->api . "/updater-getLatest-{$this->config->version}-$source.html?lang=" . str_replace('-', '_', $this->app->getClientLang()); $latestVersionList = common::http($link); $this->loadModel('setting')->setItem('system.common.global.latestVersionList', $latestVersionList); } diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 32b06cdb46..c3fb79a45c 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -236,7 +236,7 @@ foreach($fieldParams as $fieldName => $param) echo html::submitButton($lang->search->common, '', 'btn btn-primary') . "   "; if($style != 'simple') { - if(common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), $lang->save, '', "class='btn-save-form btn btn-secondary'") . " "; + if(common::hasPriv('search', 'saveQuery')) echo html::a($this->createLink('search', 'saveQuery', "module=$module&onMenuBar=$onMenuBar"), $lang->save, '', "class='btn-save-form btn btn-secondary iframe'") . " "; echo html::commonButton($lang->search->reset, '', 'btn-reset-form btn'); } echo html::commonButton('', '', 'btn-expand-form btn btn-info pull-right');