* Adjust code.
This commit is contained in:
+17
-2
@@ -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;
|
||||
|
||||
@@ -135,7 +135,17 @@
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
<div class='file-name'><a href='<?php echo $this->createLink($file->objectType, 'view', "objectID=$file->objectID");?>' title='<?php echo substr($file->addedDate, 0, 10)?>'><?php echo $file->title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?></a></div>
|
||||
<?php
|
||||
if($type == 'project' && in_array($file->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");
|
||||
}
|
||||
?>
|
||||
<div class='file-name'><a href='<?php echo $objectLink;?>' title='<?php echo substr($file->addedDate, 0, 10)?>'><?php echo $file->title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?></a></div>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<?php if(common::hasPriv('file', 'delete') and $canBeChanged): ?>
|
||||
|
||||
@@ -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%;}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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('<i class="icon icon-chevron-double-down"></i>', '', 'btn-expand-form btn btn-info pull-right');
|
||||
|
||||
Reference in New Issue
Block a user