Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2018-11-12 13:41:41 +08:00
9 changed files with 53 additions and 20 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ $lang->menu->report = 'Report|report|index';
$lang->menu->company = 'Company|company|index';
$lang->menu->admin = 'Admin|admin|index';
$lang->dividerMenu = ',qa,';
$lang->dividerMenu = ',qa,report,';
/* Object list in search form. */
$lang->searchObjects['bug'] = 'Bug';
+1 -1
View File
@@ -124,7 +124,7 @@ $lang->menu->report = '统计|report|index';
$lang->menu->company = '组织|company|index';
$lang->menu->admin = '后台|admin|index';
$lang->dividerMenu = ',qa,';
$lang->dividerMenu = ',qa,report,';
/* 查询条中可以选择的对象列表。*/
$lang->searchObjects['bug'] = 'Bug';
+9 -7
View File
@@ -32,7 +32,7 @@ var browseType = '<?php echo $browseType;?>';
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
<?php if($browseType != 'fastsearch'):?>
<?php if($browseType != 'bysearch'):?>
<i class="icon icon-folder-open-o text-muted"></i>
<?php else:?>
<i class="icon icon-search text-muted"></i>
@@ -57,7 +57,11 @@ var browseType = '<?php echo $browseType;?>';
<?php endif;?>
</nav>
</div>
<?php if(empty($docs) and empty($modules) and empty($libs) and empty($attachLibs)):?>
<?php if(empty($docs) and $browseType == 'bysearch'):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->doc->noSearchedDoc;?></span></p>
</div>
<?php elseif(empty($docs) and empty($modules) and empty($libs) and empty($attachLibs)):?>
<div class="table-empty-tip">
<p>
<?php if($libID):?>
@@ -66,8 +70,6 @@ var browseType = '<?php echo $browseType;?>';
<span class="text-muted"><?php echo $lang->youCould;?></span>
<?php echo html::a($this->createLink('doc', 'create', "libID={$libID}"), "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?>
<?php endif;?>
<?php elseif($browseType == 'fastsearch'):?>
<span class="text-muted"><?php echo $lang->doc->noSearchedDoc;?></span>
<?php elseif($browseType == 'byediteddate'):?>
<span class="text-muted"><?php echo $lang->doc->noEditedDoc;?></span>
<?php elseif($browseType == 'openedbyme'):?>
@@ -91,7 +93,7 @@ var browseType = '<?php echo $browseType;?>';
</tr>
</thead>
<tbody>
<?php if(!empty($libs)):?>
<?php if(!empty($libs) and $browseType != 'bysearch'):?>
<?php foreach($libs as $lib):?>
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
@@ -109,7 +111,7 @@ var browseType = '<?php echo $browseType;?>';
</tr>
<?php endforeach;?>
<?php endif;?>
<?php if(!empty($attachLibs)):?>
<?php if(!empty($attachLibs) and $browseType != 'bysearch'):?>
<?php foreach($attachLibs as $libType => $attachLib):?>
<tr>
<?php if($libType == 'project'):?>
@@ -125,7 +127,7 @@ var browseType = '<?php echo $browseType;?>';
</tr>
<?php endforeach;?>
<?php endif;?>
<?php if(isset($modules)):?>
<?php if(isset($modules) and $browseType != 'bysearch'):?>
<?php foreach($modules as $module):?>
<?php $star = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
+34 -4
View File
@@ -3,8 +3,14 @@
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
<i class="icon icon-folder-open-o text-muted"></i>
<?php echo $breadTitle;?>
<div class="panel-title font-normal">
<?php if($browseType != 'bysearch'):?>
<i class="icon icon-folder-open-o text-muted"></i>
<?php else:?>
<i class="icon icon-search text-muted"></i>
<?php endif;?>
<?php echo $breadTitle;?>
</div>
<nav class="panel-actions btn-toolbar">
<div class="btn-group">
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon'");?>
@@ -24,13 +30,32 @@
</nav>
</div>
</div>
<?php if(empty($docs) and empty($modules) and empty($libs) and empty($attachLibs)):?>
<?php if(empty($docs) and $browseType == 'bysearch'):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->doc->noDoc;?></span> <?php common::printLink('doc', 'create', "libID={$libID}", "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?></p>
<p><span class="text-muted"><?php echo $lang->doc->noSearchedDoc;?></span></p>
</div>
<?php elseif(empty($docs) and empty($modules) and empty($libs) and empty($attachLibs)):?>
<div class="table-empty-tip">
<p>
<?php if($libID):?>
<span class="text-muted"><?php echo $lang->doc->noDoc;?></span>
<?php if(common::hasPriv('doc', 'create')):?>
<span class="text-muted"><?php echo $lang->youCould;?></span>
<?php echo html::a($this->createLink('doc', 'create', "libID={$libID}"), "<i class='icon icon-plus'></i> " . $lang->doc->create, '', "class='btn btn-info'");?>
<?php endif;?>
<?php elseif($browseType == 'byediteddate'):?>
<span class="text-muted"><?php echo $lang->doc->noEditedDoc;?></span>
<?php elseif($browseType == 'openedbyme'):?>
<span class="text-muted"><?php echo $lang->doc->noOpenedDoc;?></span>
<?php elseif($browseType == 'collectedbyme'):?>
<span class="text-muted"><?php echo $lang->doc->noCollectedDoc;?></span>
<?php endif;?>
</p>
</div>
<?php else:?>
<div class="panel-body">
<div class="row row-grid files-grid" data-size="300">
<?php if(!empty($libs) and $browseType != 'bysearch'):?>
<?php foreach($libs as $lib):?>
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<div class="col">
@@ -45,6 +70,8 @@
</div>
</div>
<?php endforeach;?>
<?php endif;?>
<?php if(!empty($attachLibs) and $browseType != 'bysearch'):?>
<?php foreach($attachLibs as $libID => $attachLib):?>
<div class="col">
<?php
@@ -66,6 +93,8 @@
<div class="actions"></div>
</div>
<?php endforeach;?>
<?php endif;?>
<?php if(isset($modules) and $browseType != 'bysearch'):?>
<?php foreach($modules as $module):?>
<?php $star = strpos($module->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<div class="col">
@@ -80,6 +109,7 @@
</div>
</div>
<?php endforeach;?>
<?php endif;?>
<?php foreach($docs as $doc):?>
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
+1 -1
View File
@@ -72,7 +72,7 @@
</td>
<td class="c-pri"><span class='label-pri <?php echo 'label-pri-' . $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri);?>'><?php echo zget($lang->task->priList, $task->pri);?></span></td>
<td class='c-project' title="<?php echo $task->projectName;?>"><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></td>
<td class='c-name'>
<td class='c-name' title='<?php echo $task->name?>'>
<?php if(!empty($task->team)) echo '<span class="label label-badge label-light">' . $this->lang->task->multipleAB . '</span> ';?>
<?php if($task->parent > 0) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';?>
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, null, "style='color: $task->color'");?>
+1 -1
View File
@@ -190,7 +190,7 @@ $lang->project->aboveAllProduct = "All the above {$lang->productCommon}";
$lang->project->aboveAllProject = "All the above {$lang->projectCommon}";
/* 页面提示。*/
$lang->project->linkStoryByPlanTips = 'It will link stories to this project who are under the plan';
$lang->project->linkStoryByPlanTips = 'It will link stories to this project which are under the plan';
$lang->project->selectProject = "Select {$lang->projectCommon}";
$lang->project->beginAndEnd = 'Duration';
$lang->project->begin = 'Begin';
+1 -1
View File
@@ -2367,7 +2367,7 @@ class projectModel extends model
$this->config->project->search['actionURL'] = $actionURL;
$this->config->project->search['queryID'] = $queryID;
$this->config->project->search['params']['project']['values'] = array(''=>'', $projectID => $projects[$projectID], 'all' => $this->lang->project->allProject);
$this->config->project->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($projectID, 'task');
$this->config->project->search['params']['module']['values'] = $this->loadModel('tree')->getTaskOptionMenu($projectID, $startModuleID = 0);
$this->loadModel('search')->setSearchParams($this->config->project->search);
}
+2
View File
@@ -5,4 +5,6 @@ $(function()
$('#assignedTo').attr('disabled', $(this).is(':checked') ? 'disabled' : null).trigger('chosen:updated');
});
$('#needNotReview').change();
if($('.tabs .tab-content .tab-pane.active').children().length == 0) $('.tabs .nav-tabs li.active').css('border-bottom', '1px solid #ccc');
});
+3 -4
View File
@@ -212,7 +212,7 @@ class treeModel extends model
}
$treeMenu = array();
$lastMenu[] = '/';
$projectModules = $this->getTaskTreeModules($rootID, false, false);
$projectModules = $this->getTaskTreeModules($rootID, true);
$noProductModules = $this->dao->select('*')->from(TABLE_MODULE)->where("root = '" . (int)$rootID . "' and type = 'task' and parent = 0")->andWhere('deleted')->eq(0)->fetchPairs('id', 'name');
/* Fix for not in product modules. */
@@ -223,7 +223,7 @@ class treeModel extends model
{
if($type == 'product')
{
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task') OR (root = $id and type = 'story'))")
$modules = $this->dao->select('*')->from(TABLE_MODULE)->where("((root = '" . (int)$rootID . "' and type = 'task' and parent != 0) OR (root = $id and type = 'story'))")
->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi()
->andWhere('deleted')->eq(0)
->orderBy('grade desc, branch, type, `order`')
@@ -240,8 +240,7 @@ class treeModel extends model
foreach($modules as $module)
{
$parentModules = explode(',', trim($module->path, ','));
if($type == 'product' and isset($noProductModules[$parentModules[0]])) continue;
if($type == 'product' and !isset($projectModules[$module->id])) continue;
$rootName = ($productNum > 1 and $type == 'product') ? "/$rootModule/" : '/';
if($type == 'product' and $module->branch and isset($branchGroups[$id][$module->branch])) $rootName .= $branchGroups[$id][$module->branch] . '/';
$this->buildTreeArray($treeMenu, $modules, $module, $rootName);