Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -453,7 +453,7 @@ $lang->action->label->testtask = '测试单|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = '用例库|caselib|view|libID=%s';
|
||||
$lang->action->label->todo = '待办|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = '文档库|doc|doclibbrowse|libID=%s';
|
||||
$lang->action->label->doclib = '文档库|doc|objectLibs|type=&objectID=&libID=%s';
|
||||
$lang->action->label->doc = '文档|doc|view|docID=%s';
|
||||
$lang->action->label->user = '用户|user|view|account=%s';
|
||||
$lang->action->label->testreport = '报告|testreport|view|report=%s';
|
||||
|
||||
@@ -73,7 +73,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->selectProduct = 'Product selection';
|
||||
$lang->block->of = ' von ';
|
||||
$lang->block->leftHour = 'Left';
|
||||
$lang->block->remain = 'Left';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = 'Name';
|
||||
|
||||
@@ -73,7 +73,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->selectProduct = 'Product selection';
|
||||
$lang->block->of = ' of ';
|
||||
$lang->block->leftHour = 'Left';
|
||||
$lang->block->remain = 'Left';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = 'Name';
|
||||
|
||||
@@ -73,7 +73,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->selectProduct = 'Product selection';
|
||||
$lang->block->of = ' di ';
|
||||
$lang->block->leftHour = 'Left';
|
||||
$lang->block->remain = 'Left';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = 'Nom';
|
||||
|
||||
@@ -73,7 +73,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->selectProduct = 'Product selection';
|
||||
$lang->block->of = ' thực ';
|
||||
$lang->block->leftHour = 'Left';
|
||||
$lang->block->remain = 'Left';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = 'Tên';
|
||||
|
||||
@@ -73,7 +73,7 @@ $lang->block->time = '第';
|
||||
$lang->block->week = '周';
|
||||
$lang->block->selectProduct = '选择产品';
|
||||
$lang->block->of = '的';
|
||||
$lang->block->leftHour = '剩余工时';
|
||||
$lang->block->remain = '剩余工时';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = '参数名称';
|
||||
|
||||
@@ -77,7 +77,7 @@ $lang->block->time = '第';
|
||||
$lang->block->week = '周';
|
||||
$lang->block->selectProduct = '選擇產品';
|
||||
$lang->block->of = '的';
|
||||
$lang->block->leftHour = '剩餘工時';
|
||||
$lang->block->remain = '剩餘工時';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = '參數名稱';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->workestimation->totalLaborCost;?></th>
|
||||
<td><?php echo '¥' . zget($budget, 'totalLaborCost', 0);?></td>
|
||||
<th class='w-100px'><?php echo $lang->block->leftHour;?></th>
|
||||
<th class='w-100px'><?php echo $lang->block->remain;?></th>
|
||||
<td><?php echo $totalLeft ? $totalLeft : 0;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -514,7 +514,7 @@ class bug extends control
|
||||
if($projectID)
|
||||
{
|
||||
$products = array();
|
||||
$productList = $this->product->getOrderedProducts('all', 40, $projectID);
|
||||
$productList = $this->config->CRProduct ? $this->product->getOrderedProducts('all', 40, $projectID) : $this->product->getOrderedProducts('normal', 40, $projectID);
|
||||
foreach($productList as $product) $products[$product->id] = $product->name;
|
||||
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
@@ -821,6 +821,13 @@ class bug extends control
|
||||
{
|
||||
$this->view->products = $this->config->CRProduct ? $this->products : $this->product->getPairs('noclosed');
|
||||
}
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$products = array();
|
||||
$productList = $this->config->CRProduct ? $this->product->getOrderedProducts('all', 40, $bug->project) : $this->product->getOrderedProducts('normal', 40, $bug->project);
|
||||
foreach($productList as $product) $products[$product->id] = $product->name;
|
||||
$this->view->products = $products;
|
||||
}
|
||||
|
||||
/* Set header and position. */
|
||||
$this->view->title = $this->lang->bug->edit . "BUG #$bug->id $bug->title - " . $this->products[$productID];
|
||||
|
||||
@@ -945,6 +945,7 @@ class bugModel extends model
|
||||
$buildData = new stdclass();
|
||||
$buildData->product = (int)$oldBug->product;
|
||||
$buildData->branch = (int)$oldBug->branch;
|
||||
$buildData->project = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($bug->buildExecution)->fetch('project');
|
||||
$buildData->execution = $bug->buildExecution;
|
||||
$buildData->name = $bug->buildName;
|
||||
$buildData->date = date('Y-m-d');
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->extension->common = 'Extension';
|
||||
$lang->company->common = 'Company';
|
||||
$lang->dept->common = 'Dept';
|
||||
$lang->program->list = 'Program List';
|
||||
$lang->execution->list = "{$lang->executionCommon} List";
|
||||
|
||||
$lang->personnel->common = 'Member';
|
||||
$lang->personnel->invest = 'Investment';
|
||||
|
||||
@@ -226,7 +226,7 @@ $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->
|
||||
/* Execution menu. */
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
if($config->systemMode == 'new') $lang->execution->homeMenu->index = "$lang->dashboard|execution|index|";
|
||||
$lang->execution->homeMenu->list = array('link' => "{$lang->executionCommon}列表|execution|all|", 'alias' => 'create,batchedit');
|
||||
$lang->execution->homeMenu->list = array('link' => "{$lang->execution->list}|execution|all|", 'alias' => 'create,batchedit');
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
|
||||
@@ -154,6 +154,7 @@ $lang->extension->common = '插件';
|
||||
$lang->company->common = '公司';
|
||||
$lang->dept->common = '部门';
|
||||
$lang->program->list = '项目集列表';
|
||||
$lang->execution->list = "{$lang->executionCommon}列表";
|
||||
|
||||
$lang->personnel->common = '人员';
|
||||
$lang->personnel->invest = '投入人员';
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
|
||||
<?php if(empty($config->noHiddenwin)):?>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin hidden'></iframe>
|
||||
<?php endif;?>
|
||||
<?php if($this->loadModel('cron')->runable()) js::execute('startCron()');?>
|
||||
<script>
|
||||
<?php if(isset($pageJS)) echo $pageJS;?>
|
||||
|
||||
@@ -32,11 +32,4 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#mainHeader #navbar li[data-id=model]').removeClass('active');
|
||||
})
|
||||
</script>
|
||||
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+7
-25
@@ -780,31 +780,6 @@ class doc extends control
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Doc lib browse.
|
||||
*
|
||||
* @param int $libID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function doclibBrowse($libID = 0)
|
||||
{
|
||||
$doclib = $this->doc->getLibById($libID);
|
||||
|
||||
$objecitID = 0;
|
||||
if($doclib->type == 'product')
|
||||
{
|
||||
$objectID = $doclib->product;
|
||||
}
|
||||
elseif($doclib->type == 'project' or $doclib->type == 'execution')
|
||||
{
|
||||
$doclib->type = 'project';
|
||||
$objectID = $doclib->project;
|
||||
}
|
||||
|
||||
die(js::locate($this->createLink('doc', 'objectLibs', "type={$doclib->type}&objectID=$objectID&libID=$libID")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show libs for product or project.
|
||||
*
|
||||
@@ -818,6 +793,13 @@ class doc extends control
|
||||
*/
|
||||
public function objectLibs($type, $objectID = 0, $libID = 0, $docID = 0, $version = 0)
|
||||
{
|
||||
if(empty($type))
|
||||
{
|
||||
$doclib = $this->doc->getLibById($libID);
|
||||
$type = $doclib->type == 'execution' ? 'project' : $doclib->type;
|
||||
$objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type;
|
||||
}
|
||||
|
||||
$this->session->set('docList', $this->app->getURI(true), $this->app->openApp);
|
||||
|
||||
$objects = $this->doc->getOrderedObjects($type);
|
||||
|
||||
@@ -70,15 +70,13 @@ $lang->doc->index = 'Home';
|
||||
$lang->doc->create = 'Dokument hinzufügen';
|
||||
$lang->doc->edit = 'Bearbeiten';
|
||||
$lang->doc->delete = 'Löschen';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Liste';
|
||||
$lang->doc->view = 'Details';
|
||||
$lang->doc->diff = 'Diff';
|
||||
$lang->doc->diffAction = 'Diff Document';
|
||||
$lang->doc->sort = 'Sortierung';
|
||||
$lang->doc->manageType = 'Kategorie verwalten';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->manageBook = 'Manage Book';
|
||||
$lang->doc->editBook = 'Edit Book';
|
||||
$lang->doc->editType = 'Bearbeiten';
|
||||
$lang->doc->deleteType = 'Löschen';
|
||||
$lang->doc->addType = 'Hinzufügen';
|
||||
|
||||
@@ -71,15 +71,13 @@ $lang->doc->index = 'Document Home';
|
||||
$lang->doc->create = 'Create Document';
|
||||
$lang->doc->edit = 'Edit Document';
|
||||
$lang->doc->delete = 'Delete Document';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Document List';
|
||||
$lang->doc->view = 'Document Detail';
|
||||
$lang->doc->diff = 'Diff';
|
||||
$lang->doc->diffAction = 'Diff Document';
|
||||
$lang->doc->sort = 'Rank Document';
|
||||
$lang->doc->manageType = 'Manage Category';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->manageBook = 'Manage Book';
|
||||
$lang->doc->editBook = 'Edit Book';
|
||||
$lang->doc->editType = 'Edit';
|
||||
$lang->doc->deleteType = 'Delete';
|
||||
$lang->doc->addType = 'Add';
|
||||
@@ -182,7 +180,7 @@ $lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries. ';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s'>office convert</a>.<p>";
|
||||
$lang->doc->noSearchedDoc = 'No documents found.';
|
||||
$lang->doc->noEditedDoc = 'You have not edited any documents.';
|
||||
$lang->doc->noOpenedDoc = 'You have not created any documents.';
|
||||
|
||||
@@ -70,15 +70,13 @@ $lang->doc->index = 'Accueil Documents';
|
||||
$lang->doc->create = 'Ajouter Document';
|
||||
$lang->doc->edit = 'Editer Document';
|
||||
$lang->doc->delete = 'Supprimer Document';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Liste Documents';
|
||||
$lang->doc->view = 'Détail Document';
|
||||
$lang->doc->diff = 'Diff';
|
||||
$lang->doc->diffAction = 'Document Diff';
|
||||
$lang->doc->sort = 'Rang Document';
|
||||
$lang->doc->manageType = 'Gérer Catégories';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->manageBook = 'Manage Book';
|
||||
$lang->doc->editBook = 'Edit Book';
|
||||
$lang->doc->editType = 'Editer';
|
||||
$lang->doc->deleteType = 'Supprimer';
|
||||
$lang->doc->addType = 'Ajouter';
|
||||
|
||||
@@ -70,15 +70,13 @@ $lang->doc->index = 'Document Home';
|
||||
$lang->doc->create = 'Tạo tài liệu';
|
||||
$lang->doc->edit = 'Sửa tài liệu';
|
||||
$lang->doc->delete = 'Xóa tài liệu';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->browse = 'Document danh sách';
|
||||
$lang->doc->view = 'Document Detail';
|
||||
$lang->doc->diff = 'Diff';
|
||||
$lang->doc->diffAction = 'Diff tài liệu';
|
||||
$lang->doc->sort = 'Đánh giá tài liệu';
|
||||
$lang->doc->manageType = 'Quản lý danh mục';
|
||||
$lang->doc->createBook = 'Create Book';
|
||||
$lang->doc->manageBook = 'Manage Book';
|
||||
$lang->doc->editBook = 'Edit Book';
|
||||
$lang->doc->editType = 'Sửa';
|
||||
$lang->doc->deleteType = 'Xóa';
|
||||
$lang->doc->addType = 'Thêm';
|
||||
|
||||
@@ -71,15 +71,13 @@ $lang->doc->index = '文档主页';
|
||||
$lang->doc->create = '创建文档';
|
||||
$lang->doc->edit = '编辑文档';
|
||||
$lang->doc->delete = '删除文档';
|
||||
$lang->doc->createBook = '创建手册';
|
||||
$lang->doc->browse = '文档列表';
|
||||
$lang->doc->view = '文档详情';
|
||||
$lang->doc->diff = '对比';
|
||||
$lang->doc->diffAction = '对比文档';
|
||||
$lang->doc->sort = '文档排序';
|
||||
$lang->doc->manageType = '维护目录';
|
||||
$lang->doc->createBook = '创建手册';
|
||||
$lang->doc->manageBook = '维护手册';
|
||||
$lang->doc->editBook = '编辑手册';
|
||||
$lang->doc->editType = '编辑目录';
|
||||
$lang->doc->deleteType = '删除目录';
|
||||
$lang->doc->addType = '增加目录';
|
||||
@@ -182,7 +180,7 @@ $lang->doc->noArticle = '暂时没有文章。';
|
||||
$lang->doc->noLib = '暂时没有文档库。';
|
||||
$lang->doc->noBook = 'WIKI库还未创建手册,请新建 :)';
|
||||
$lang->doc->cannotCreateOffice = '<p>对不起,企业版才能创建%s文档。<p><p>试用企业版,请联系我们:4006-8899-23 0532-86893032。</p>';
|
||||
$lang->doc->notSetOffice = "<p>创建%s文档,需要配置<a href='%s' target='_parent'>Office转换设置</a>。<p>";
|
||||
$lang->doc->notSetOffice = "<p>创建%s文档,需要配置<a href='%s'>Office转换设置</a>。<p>";
|
||||
$lang->doc->noSearchedDoc = '没有搜索到任何文档。';
|
||||
$lang->doc->noEditedDoc = '您还没有编辑任何文档。';
|
||||
$lang->doc->noOpenedDoc = '您还没有创建任何文档。';
|
||||
|
||||
@@ -139,7 +139,7 @@ class docModel extends model
|
||||
|
||||
if($lib->type == 'execution' and $lib->execution)
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getByID($lib->execution);
|
||||
$execution = $this->loadModel('execution')->getByID($lib->execution);
|
||||
$lib->project = $execution->project;
|
||||
}
|
||||
|
||||
@@ -1813,7 +1813,8 @@ EOF;
|
||||
$output .= "<div class='table-col'><div class='list-group'>";
|
||||
foreach($objects as $key => $object)
|
||||
{
|
||||
$output .= html::a(inlink('objectLibs', "type=$type&objectID=$key"), $object, '', "data-app='{$this->app->openApp}'");
|
||||
$selected = $key == $objectID ? 'selected' : '';
|
||||
$output .= html::a(inlink('objectLibs', "type=$type&objectID=$key"), $object, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
$output .= "</div></div></div></div></div>";
|
||||
}
|
||||
@@ -1825,7 +1826,8 @@ EOF;
|
||||
$output .= "<div class='table-col'><div class='list-group'>";
|
||||
foreach($libs as $key => $lib)
|
||||
{
|
||||
$output .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "data-app='{$this->app->openApp}'");
|
||||
$selected = $key == $libID ? 'selected' : '';
|
||||
$output .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
$output .= "</div></div></div></div></div>";
|
||||
}
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
</div>
|
||||
<?php if(isset($this->config->bizVersion)):?>
|
||||
<div class='alert alert-warning strong'>
|
||||
<?php
|
||||
$isonlybody = isonlybody();
|
||||
unset($_GET['onlybody']);
|
||||
|
||||
printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');
|
||||
if($isonlybody) $_GET['onlybody'] = 'yes';
|
||||
?>
|
||||
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');?>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='alert alert-warning strong'><?php printf($lang->doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?></div>
|
||||
|
||||
@@ -38,4 +38,16 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<script>
|
||||
$('#pageNav .btn-group.angle-btn').click(function()
|
||||
{
|
||||
if($(this).hasClass('opened')) return;
|
||||
$(this).addClass('opened');
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
scrollToSelected();
|
||||
}, 100);
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -194,7 +194,6 @@ $lang->execution->copy = "Copy {$lang->executionCommon}";
|
||||
$lang->execution->delete = "Delete {$lang->executionCommon}";
|
||||
$lang->execution->deleteAB = "Delete Execution";
|
||||
$lang->execution->browse = "{$lang->executionCommon} List";
|
||||
$lang->execution->list = "{$lang->executionCommon} List";
|
||||
$lang->execution->edit = "Edit {$lang->executionCommon}";
|
||||
$lang->execution->editAction = "Edit Execution";
|
||||
$lang->execution->batchEdit = "Edit";
|
||||
|
||||
@@ -194,7 +194,6 @@ $lang->execution->copy = "复制{$lang->executionCommon}";
|
||||
$lang->execution->delete = "删除{$lang->executionCommon}";
|
||||
$lang->execution->deleteAB = "删除{$lang->execution->common}";
|
||||
$lang->execution->browse = "浏览{$lang->execution->common}";
|
||||
$lang->execution->list = "{$lang->executionCommon}列表";
|
||||
$lang->execution->edit = "编辑{$lang->executionCommon}";
|
||||
$lang->execution->editAction = "编辑{$lang->execution->common}";
|
||||
$lang->execution->batchEdit = "编辑";
|
||||
|
||||
@@ -127,5 +127,9 @@ js::set('defaultOpen', $open);
|
||||
<?php js::set('searchAB', $lang->searchAB);?>
|
||||
<?php js::set('searchObjectList', ',' . implode(',', array_keys($lang->searchObjects)) . ',');?>
|
||||
<?php js::set('searchCommon', $lang->index->search);?>
|
||||
<?php $config->noHiddenwin = true;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
<script>
|
||||
<?php if(isset($pageJS)) echo $pageJS;?>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -365,7 +365,7 @@ class productModel extends model
|
||||
$products = array();
|
||||
if($projectID)
|
||||
{
|
||||
$pairs = $this->getProducts($projectID);
|
||||
$pairs = $this->getProducts($projectID, $status == 'normal' ? 'noclosed' : '');
|
||||
$products = $this->getByIdList(array_keys($pairs));
|
||||
}
|
||||
else
|
||||
@@ -433,8 +433,9 @@ class productModel extends model
|
||||
{
|
||||
$storyMethods = ",track,create,batchcreate,batchclose,zerocase,";
|
||||
if(strpos($storyMethods, "," . $currentMethod . ",") === false) $currentModule = 'product';
|
||||
if($currentMethod == 'view' || $currentMethod == 'change' || $currentMethod == 'review') $currentMethod = 'browse';
|
||||
if($currentMethod == 'view' or $currentMethod == 'change' or $currentMethod == 'review') $currentMethod = 'browse';
|
||||
}
|
||||
if($currentModule == 'testcase' and $currentMethod == 'view') $currentMethod = 'browse';
|
||||
if($currentMethod == 'report') $currentMethod = 'browse';
|
||||
|
||||
$currentProductName = $this->lang->product->common;
|
||||
|
||||
@@ -260,7 +260,7 @@ class projectModel extends model
|
||||
|
||||
$teams = $this->dao->select('root, count(*) as teams')->from(TABLE_TEAM)
|
||||
->where('root')->in($projectIdList)
|
||||
->andWhere('type')->in('project')
|
||||
->andWhere('type')->eq('project')
|
||||
->groupBy('root')->fetchPairs();
|
||||
|
||||
$hours = $this->dao->select('project,
|
||||
@@ -402,7 +402,7 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get team members in pair.
|
||||
* Get team members in project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $params
|
||||
|
||||
+4
-17
@@ -242,13 +242,7 @@ class repoModel extends model
|
||||
->join('product', ',')
|
||||
->get();
|
||||
|
||||
if($this->post->SCM == 'Gitlab')
|
||||
{
|
||||
$data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
unset($data->gitlabHost);
|
||||
unset($data->gitlabToken);
|
||||
}
|
||||
if($this->post->SCM == 'Gitlab') $data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
|
||||
@@ -262,7 +256,7 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
if($data->encrypt == 'base64') $data->password = base64_encode($data->password);
|
||||
$this->dao->insert(TABLE_REPO)->data($data, $skip = 'gitlabProject')
|
||||
$this->dao->insert(TABLE_REPO)->data($data, $skip = 'gitlabHost,gitlabToken,gitlabProject')
|
||||
->batchCheck($this->config->repo->create->requiredFields, 'notempty')
|
||||
->checkIF($data->SCM == 'GitLab', 'gitlabProject', 'notempty')
|
||||
->checkIF($data->SCM == 'Subversion', $this->config->repo->svn->requiredFields, 'notempty')
|
||||
@@ -294,14 +288,7 @@ class repoModel extends model
|
||||
->join('product', ',')
|
||||
->get();
|
||||
|
||||
if($this->post->SCM == 'Gitlab')
|
||||
{
|
||||
$data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
unset($data->gitlabHost);
|
||||
unset($data->gitlabToken);
|
||||
unset($data->gitlabProject);
|
||||
}
|
||||
if($this->post->SCM == 'Gitlab') $data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
|
||||
@@ -322,7 +309,7 @@ class repoModel extends model
|
||||
if(!$this->checkConnection()) return false;
|
||||
|
||||
if($data->encrypt == 'base64') $data->password = base64_encode($data->password);
|
||||
$this->dao->update(TABLE_REPO)->data($data, $skip = 'gitlabProject')
|
||||
$this->dao->update(TABLE_REPO)->data($data, $skip = 'gitlabHost,gitlabToken,gitlabProject')
|
||||
->batchCheck($this->config->repo->edit->requiredFields, 'notempty')
|
||||
->checkIF($data->SCM == 'Subversion', $this->config->repo->svn->requiredFields, 'notempty')
|
||||
->checkIF($data->SCM == 'GitLab', 'gitlabProject', 'notempty')
|
||||
|
||||
@@ -616,7 +616,8 @@ class testcase extends control
|
||||
}
|
||||
}
|
||||
|
||||
$branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($case->product);
|
||||
$product = $this->product->getByID($case->product);
|
||||
$branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($case->product);
|
||||
$isLibCase = ($case->lib and empty($case->product));
|
||||
if($isLibCase)
|
||||
{
|
||||
@@ -639,7 +640,7 @@ class testcase extends control
|
||||
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->branchName = $this->session->currentProductType == 'normal' ? '' : zget($branches, $case->branch, '');
|
||||
$this->view->branchName = $product->type == 'normal' ? '' : zget($branches, $case->branch, '');
|
||||
}
|
||||
|
||||
$caseFails = $this->dao->select('COUNT(*) AS count')->from(TABLE_TESTRESULT)
|
||||
|
||||
+10
-4
@@ -835,16 +835,22 @@ function adjustMenuWidth()
|
||||
/**
|
||||
* Scroll to selected item in drop menu.
|
||||
*
|
||||
* @param string $id
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function scrollToSelected()
|
||||
function scrollToSelected(id)
|
||||
{
|
||||
$('#dropMenu .table-row .list-group').mouseout(function(){$(this).find('.active').removeClass('active')});
|
||||
if($('#dropMenu .table-row .col-left .list-group .selected').length > 0)
|
||||
if(typeof(id) == 'undefined') id = '#dropMenu .table-col .list-group'
|
||||
|
||||
$id = $(id);
|
||||
$selected = $id.find('.selected');
|
||||
|
||||
$id.mouseout(function(){$(this).find('.active').removeClass('active')});
|
||||
if($selected.length > 0)
|
||||
{
|
||||
var offsetHeight = 75;
|
||||
$('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - offsetHeight);
|
||||
$id.scrollTop($selected.position().top - offsetHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user