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

This commit is contained in:
wangyidong
2018-11-14 09:25:00 +08:00
19 changed files with 84 additions and 21 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ $lang->admin->safe->weak = '常用弱口令';
$lang->admin->safe->reason = '类型';
$lang->admin->safe->checkWeak = '弱口令扫描';
$lang->admin->safe->changeWeak = '修改弱口令密码';
$lang->admin->safe->modifyPasswordFirstLogin = '首次登修改密码';
$lang->admin->safe->modifyPasswordFirstLogin = '首次登修改密码';
$lang->admin->safe->modeList[0] = '不检查';
$lang->admin->safe->modeList[1] = '中';
+3
View File
@@ -27,9 +27,12 @@
<?php endif; ?>
</div>
</div>
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<?php if(!$isOnlybody):?>
<div class="btn-toolbar pull-right">
<?php common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
</div>
<?php endif;?>
</div>
<div id="mainContent" class="main-row">
<div class="main-col col-8">
+1 -1
View File
@@ -52,7 +52,7 @@ $config->custom->fieldList['testcase']['edit'] = 'stage,story,pri,precondi
$config->custom->fieldList['testsuite'] = 'desc';
$config->custom->fieldList['testcase']['createcase'] = 'lib,stage,pri,precondition,keywords';
$config->custom->fieldList['testreport'] = 'begin,end,members,report';
$config->custom->fieldList['testtask'] = 'owner,pri,status,desc';
$config->custom->fieldList['testtask'] = 'owner,pri,status,desc,comment';
$config->custom->fieldList['doc'] = 'keywords,content';
$config->custom->fieldList['user']['create'] = 'dept,role,email,commiter';
$config->custom->fieldList['user']['edit'] = 'dept,role,email,commiter,skype,qq,mobile,phone,address,zipcode,wangwang,gtalk';
+20 -2
View File
@@ -387,6 +387,22 @@ class doc extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'view', "docID=$docID")));
}
$libs = $this->doc->getLibs();
foreach($libs as $id => $libName)
{
$lib = $this->doc->getLibById($id);
if($lib->project != 0)
{
$project = $this->loadModel('project')->getByID($lib->project);
$libs[$id] = $project->name . '/' . $libName;
}
if($lib->product != 0)
{
$product = $this->loadModel('product')->getByID($lib->product);
$libs[$id] = $product->name . '/' . $libName;
}
}
/* Get doc and set menu. */
$doc = $this->doc->getById($docID);
$libID = $doc->lib;
@@ -404,6 +420,7 @@ class doc extends control
$this->view->doc = $doc;
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
$this->view->type = $type;
$this->view->libs = $libs;
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->users = $this->user->getPairs('noletter', $doc->users);
$this->display();
@@ -617,10 +634,11 @@ class doc extends control
* @access public
* @return void
*/
public function ajaxGetChild($libID)
public function ajaxGetChild($libID, $type = 'module')
{
$childModules = $this->loadModel('tree')->getOptionMenu($libID, 'doc');
die(html::select('parent', $childModules, '', "class='form-control'"));
$select = ($type == 'module') ? html::select('module', $childModules, '', "class='form-control chosen'") : html::select('parent', $childModules, '', "class='form-control chosen'");
die($select);
}
/**
+11
View File
@@ -16,3 +16,14 @@ $(function()
}
})
})
function loadDocModule(libID)
{
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
$.post(link, function(data)
{
$('#module').replaceWith(data);
$('#module_chosen').remove();
$('#module').chosen();
})
}
+1 -1
View File
@@ -658,7 +658,7 @@ class docModel extends model
$doc = $this->loadModel('file')->processImgURL($doc, $this->config->doc->editor->edit['id'], $this->post->uid);
$doc->product = $lib->product;
$doc->project = $lib->project;
if($doc->type == 'url') $doc->content = $doc->url;
if(isset($doc->type) and $doc->type == 'url') $doc->content = $doc->url;
unset($doc->url);
$files = $this->file->saveUpload('doc', $docID);
+4 -1
View File
@@ -24,10 +24,13 @@
</div>
<form class='load-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->doc->lib;?></th>
<td> <?php echo html::select('lib', $libs, $doc->lib, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
</tr>
<tr>
<th><?php echo $lang->doc->module;?></th>
<td>
<?php echo html::hidden('lib', $doc->lib)?>
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->module, "class='form-control chosen'");?></span>
</td><td></td>
</tr>
+1 -1
View File
@@ -337,7 +337,7 @@ $lang->resource->project->printKanban = 'printKanban';
$lang->resource->project->tree = 'tree';
$lang->resource->project->treeTask = 'treeTask';
$lang->resource->project->treeStory = 'treeStory';
$lang->resource->project->all = 'all';
$lang->resource->project->all = 'allProjects';
$lang->resource->project->kanbanHideCols = 'kanbanHideCols';
$lang->resource->project->kanbanColsColor = 'kanbanColsColor';
$lang->resource->project->export = 'export';
+1 -1
View File
@@ -27,7 +27,7 @@
<?php foreach($plans as $plan):?>
<?php if(isset($plan->begin)):?>
<li <?php if(date('Y-m-d') < $plan->begin) echo "class='active'";?>>
<a href="<?php echo $this->createLink('plan', 'view', "planID={$plan->id}");?>">
<a href="<?php echo $this->createLink('productplan', 'view', "planID={$plan->id}");?>">
<span class="title"><?php echo $plan->title;?></span>
<span class="date"><?php echo $plan->begin;?></span>
</a>
+8 -8
View File
@@ -60,12 +60,12 @@ $lang->project->readjustTask = '顺延任务的起止时间';
$lang->project->effort = '日志';
$lang->project->relatedMember = '相关成员';
$lang->project->start = '开始';
$lang->project->activate = '激活';
$lang->project->putoff = '延期';
$lang->project->suspend = '挂起';
$lang->project->close = '关闭';
$lang->project->export = '导出';
$lang->project->start = "开始$lang->projectCommon";
$lang->project->activate = "激活$lang->projectCommon";
$lang->project->putoff = "延期$lang->projectCommon";
$lang->project->suspend = "挂起$lang->projectCommon";
$lang->project->close = "关闭$lang->projectCommon";
$lang->project->export = "导出$lang->projectCommon";
$lang->project->typeList['sprint'] = "短期$lang->projectCommon";
$lang->project->typeList['waterfall'] = "长期$lang->projectCommon";
@@ -115,7 +115,7 @@ $lang->project->latestDynamic = '最新动态';
$lang->project->build = '所有版本';
$lang->project->testtask = '测试任务';
$lang->project->burn = '燃尽图';
$lang->project->computeBurn = '更新';
$lang->project->computeBurn = '更新燃尽图';
$lang->project->burnData = '燃尽图数据';
$lang->project->fixFirst = '修改首天工时';
$lang->project->team = '团队成员';
@@ -142,7 +142,7 @@ $lang->project->batchUnlinkStory = '批量移除需求';
$lang->project->importTask = '转入任务';
$lang->project->importPlanStories = '按计划关联需求';
$lang->project->importBug = '导入Bug';
$lang->project->updateOrder = '排序';
$lang->project->updateOrder = "{$lang->projectCommon}排序";
$lang->project->tree = '树状图';
$lang->project->treeTask = '只看任务';
$lang->project->treeStory = '只看需求';
+3
View File
@@ -41,9 +41,12 @@
<?php endif; ?>
</div>
</div>
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<?php if(!$isOnlybody):?>
<div class="btn-toolbar pull-right">
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary'"); ?>
</div>
<?php endif;?>
</div>
<div id="mainContent" class="main-row">
<div class="main-col col-8">
+1 -1
View File
@@ -578,7 +578,7 @@ class taskModel extends model
->setDefault('story, estimate, left, consumed', 0)
->setDefault('estStarted', '0000-00-00')
->setDefault('deadline', '0000-00-00')
->setDefault('parent', 0)
->setIF($oldTask->parent == 0 && $this->post->parent == '', 'parent', 0)
->setIF(strpos($this->config->task->edit->requiredFields, 'estStarted') !== false, 'estStarted', $this->post->estStarted)
->setIF(strpos($this->config->task->edit->requiredFields, 'deadline') !== false, 'deadline', $this->post->deadline)
->setIF($this->post->story != false and $this->post->story != $oldTask->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
+3
View File
@@ -34,6 +34,8 @@
<?php endif;?>
</div>
</div>
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<?php if(!$isOnlybody):?>
<div class="btn-toolbar pull-right">
<?php
$checkObject = new stdclass();
@@ -42,6 +44,7 @@
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
?>
</div>
<?php endif;?>
</div>
<div id="mainContent" class="main-row">
<div class="main-col col-8">
+3 -1
View File
@@ -1197,7 +1197,9 @@ class testcase extends control
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
$browseType = isset($this->lang->testcase->featureBar['browse'][$browseType]) ? $this->lang->testcase->featureBar['browse'][$browseType] : '';
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
if($taskID) $taskName = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch('name');
$this->view->fileName = $productName . $this->lang->dash . ($taskID ? $taskName . $this->lang->dash : '') . $browseType . $fileName;
$this->view->allExportFields = $this->config->testcase->exportFields;
$this->view->customExport = true;
$this->display();
+3
View File
@@ -44,9 +44,12 @@
<?php endif; ?>
</div>
</div>
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<?php if(!$isOnlybody):?>
<div class='btn-toolbar pull-right'>
<?php common::printLink('testcase', 'create', "productID={$case->product}&branch={$case->branch}&moduleID={$case->module}", "<i class='icon icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'"); ?>
</div>
<?php endif;?>
</div>
<div id="mainContent" class="main-row">
+1 -1
View File
@@ -21,7 +21,7 @@ $lang->todo->close = "关闭";
$lang->todo->batchClose = "批量关闭";
$lang->todo->batchEdit = "批量编辑";
$lang->todo->view = "待办详情";
$lang->todo->finish = "完成";
$lang->todo->finish = "完成待办";
$lang->todo->batchFinish = "批量完成";
$lang->todo->export = "导出";
$lang->todo->delete = "删除";
+17 -1
View File
@@ -238,9 +238,25 @@ class tree extends control
$this->view->optionMenu = $this->tree->getOptionMenu($module->root, $module->type, 0, $branch);
}
$libs = $this->loadModel('doc')->getLibs();
foreach($libs as $id => $libName)
{
$lib = $this->doc->getLibById($id);
if($lib->project != 0)
{
$project = $this->loadModel('project')->getByID($lib->project);
$libs[$id] = $project->name . '/' . $libName;
}
if($lib->product != 0)
{
$product = $this->loadModel('product')->getByID($lib->product);
$libs[$id] = $product->name . '/' . $libName;
}
}
$this->view->module = $module;
$this->view->type = $type;
$this->view->libs = array('' => '') + $this->loadModel('doc')->getLibs();
$this->view->libs = $libs;
$this->view->branch = $branch;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted', $module->owner);
+1 -1
View File
@@ -96,7 +96,7 @@ $(function()
})
function loadDocModule(libID)
{
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID + '&type=parent');
$.post(link, function(data)
{
$('#parent').replaceWith(data);
+1
View File
@@ -25,6 +25,7 @@ class user extends control
$this->loadModel('company')->setMenu();
$this->loadModel('dept');
$this->loadModel('todo');
$this->app->loadModuleConfig($this->moduleName);//Finish task #5118.(Fix bug #2271)
}
/**