Merge remote-tracking branch 'origin/cyy_gitlab'

This commit is contained in:
liyuchun
2022-07-05 00:45:11 +00:00
67 changed files with 884 additions and 278 deletions
@@ -17,6 +17,7 @@ body {margin-bottom: 25px;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;}
.body-modal #mainMenu>.btn-toolbar {width: auto;}
.assignedTo{border-radius: 4px !important;}
</style>
<?php js::set('browseType', $browseType);?>
<?php js::set('productID', $productID);?>
@@ -411,7 +412,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<button data-toggle="dropdown" type="button" class="btn assignedTo"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
@@ -0,0 +1,3 @@
<script>
if(config.onlybody == 'yes') $('#storyList .c-title').width(110);
</script>
@@ -46,7 +46,7 @@
<th class='c-spec<?php echo zget($visibleFields, 'spec', ' hidden') . zget($requiredFields, 'spec', '', ' required');?>'><?php echo $lang->story->spec;?></th>
<th class='c-pri<?php echo zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->story->pri;?></th>
<th class='c-estimate<?php echo zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->story->estimate;?></th>
<th style="width: 200px !important"><?php echo $lang->story->reviewedBy;?></th>
<th class="<?php if($forceReview) echo ' required'?>" style="width: 200px !important"><?php echo $lang->story->reviewedBy;?></th>
<th class='c-keywords<?php echo zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->story->keywords;?></th>
<?php
$extendFields = $this->story->getFlowExtendFields();
+1 -1
View File
@@ -99,7 +99,7 @@
<tr>
<th><?php echo $lang->task->story;?></th>
<td colspan='3'>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=story"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=story&_single"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
@@ -0,0 +1,2 @@
<?php
$this->config->workflowdatasource->excludeDatasource = 'litefeedbackStatus,litefeedbackModules,litefeedbackType,litefeedbackSolution,litefeedbackclosedReason';
@@ -0,0 +1,19 @@
<?php
/**
* Get datasource list.
*
* @param string $orderBy
* @param objcet $pager
* @access public
* @return array
*/
public function getList($orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('*')->from(TABLE_WORKFLOWDATASOURCE)
->where(1)
->beginIF(!empty($this->config->vision))->andWhere('vision')->eq($this->config->vision)->fi()
->beginIF($this->config->visions == ',lite,')->andWhere('code')->notin($this->config->workflowdatasource->excludeDatasource)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
@@ -127,10 +127,10 @@ $(function()
<div class="tile-title"><?php echo $lang->SRCommon;?></div>
<?php if($product->stories):?>
<div class="tile-amount"><?php echo array_sum($product->stories);?></div>
<?php common::printLink('product', 'browse', "productID={$product->id}&branch=&type=allstory", $lang->story->viewAll . '<span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span>', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm"');?>
<?php common::printLink('product', 'browse', "productID={$product->id}&branch=&type=allstory", $lang->story->viewAll . '<span class="label label-badge label-icon"><i class="icon icon-arrow-right"></i></span>', '', 'class="btn btn-primary btn-circle btn-icon-right btn-sm" data-app="product"');?>
<?php else:?>
<div class="tile-amount">0</div>
<?php common::printLink('story', 'create', "productID={$product->id}", '<span class="label label-badge label-icon"><i class="icon icon-plus"></i></span>' . $lang->story->create, '', 'class="btn btn-primary btn-circle btn-icon-left btn-sm"');?>
<?php common::printLink('story', 'create', "productID={$product->id}", '<span class="label label-badge label-icon"><i class="icon icon-plus"></i></span>' . $lang->story->create, '', 'class="btn btn-primary btn-circle btn-icon-left btn-sm" data-app="product"');?>
<?php endif;?>
</div>
<ul class="types-line">
@@ -157,7 +157,7 @@ $(function()
</div>
<?php else:?>
<div class="actions">
<?php common::printLink('productplan', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info'");?>
<?php common::printLink('productplan', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info' data-app='product'");?>
</div>
<?php endif;?>
<div class="type-info">
@@ -190,7 +190,7 @@ $(function()
</div>
<?php else:?>
<div class="actions">
<?php common::printLink('release', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php common::printLink('release', 'create', "productID={$product->id}", "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info' data-app='product'");?>
</div>
<?php endif;?>
<div class="type-info">
@@ -5,6 +5,8 @@
.block-issues .c-id {width: 55px;}
.block-issues .c-status {width: 80px;}
.block-issues.block-sm .c-status {text-align: center;}
.c-assignedTo {width: 100px; padding:0px !important;text-align:center;}
.c-severity, .c-pri {text-align:center;}
</style>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-issues <?php if(!$longBlock) echo 'block-sm';?>'>
@@ -17,7 +19,7 @@
<th class='c-status'><?php echo $lang->issue->severity;?></th>
<th class='c-number'><?php echo $lang->issue->pri;?></th>
<th class='c-user'><?php echo $lang->issue->owner;?></th>
<th class='c-user'><?php echo $lang->issue->assignedTo;?></th>
<th class='c-assignedTo'><?php echo $lang->issue->assignedTo;?></th>
<?php endif;?>
<th class='c-status'><?php echo $lang->issue->status;?></th>
</tr>
@@ -35,7 +37,7 @@
<td class='c-severity'><?php echo zget($lang->issue->severityList, $issue->severity, $issue->severity)?></td>
<td class='c-pri'><?php echo zget($lang->issue->priList, $issue->pri, $issue->pri)?></td>
<td><?php echo zget($users, $issue->owner, $issue->owner)?></td>
<td><?php echo zget($users, $issue->assignedTo, $issue->assignedTo)?></td>
<td class='c-assignedTo'><?php echo zget($users, $issue->assignedTo, $issue->assignedTo)?></td>
<?php endif;?>
<td class='c-status'>
<span class="status-issue status-<?php echo $issue->status?>"><?php echo zget($lang->issue->statusList, $issue->status);?></span>
@@ -3,9 +3,11 @@
<?php else:?>
<style>
.block-risks .c-id {width: 40px;}
.block-risks .c-pri {width: 70px; text-align: center;}
.block-risks .c-strategy, .block-risks .c-status {width: 60px;}
.block-risks .c-user, .block-risks .c-rate, .block-risks .c-category {width: 80px;}
.block-risks .c-pri {width: 85px; text-align: center;}
.block-risks .c-strategy, .block-risks .c-status {width: 80px;}
.block-risks .c-user, .block-risks .c-rate, .block-risks .c-category {width: 110px;}
.c-rate, .c-category {text-align:center;}
.c-assignedTo {width: 100px; padding:0px !important;text-align:center;}
.pri-low {color: #000000;}
.pri-middle {color: #FF9900;}
.pri-high {color: #E53333;}
@@ -23,7 +25,7 @@
<?php if($longBlock):?>
<th class='c-rate'><?php echo $lang->risk->rate;?></th>
<th class='c-pri'><?php echo $lang->risk->pri;?></th>
<th class='c-user'><?php echo $lang->risk->assignedTo;?></th>
<th class='c-assignedTo text-center'><?php echo $lang->risk->assignedTo;?></th>
<th class='c-category'><?php echo $lang->risk->category;?></th>
<?php endif;?>
</tr>
@@ -44,8 +46,8 @@
</td>
<?php if($longBlock):?>
<td class='c-rate'><?php echo $risk->rate?></td>
<td><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
<td><?php echo zget($users, $risk->assignedTo, $risk->assignedTo)?></td>
<td class='c-pri'><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
<td class='c-assignedTo'><?php echo zget($users, $risk->assignedTo, $risk->assignedTo)?></td>
<td class='c-category'><?php echo zget($lang->risk->categoryList, $risk->category, $risk->category)?></td>
<?php endif;?>
</tr>
+85
View File
@@ -4,8 +4,93 @@ $(function()
var $titleCol = $('#batchCreateForm table thead tr th.c-title');
if($titleCol.width() < 150) $titleCol.width(150);
$('#customField').click(function()
{
hiddenRequireFields();
});
/* Implement a custom form without feeling refresh. */
$('#formSettingForm .btn-primary').click(function()
{
var fields = '';
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
{
fields += ',' + $(this).val();
});
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=bug&section=custom&key=batchCreateFields');
$.post(link, {'fields' : fields}, function()
{
checkedShowFields(fields);
$('#formSetting').parent().removeClass('open');
if($('#batchCreateForm table thead tr th.c-title').width() < 150) $titleCol.width(150);
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
$('.form-actions').attr('colspan', fieldCount);
if(fieldCount > 10)
{
$('#batchCreateForm > .table-responsive').removeClass('scroll-none');
$('#batchCreateForm > .table-responsive').css('overflow', 'auto');
}
else
{
$('#batchCreateForm > .table-responsive').addClass('scroll-none');
$('#batchCreateForm > .table-responsive').css('overflow', 'visible');
}
});
return false;
});
})
/**
* Checked show fields.
*
* @param string fields
* @access public
* @return void
*/
function checkedShowFields(fields)
{
var fieldList = ',' + fields + ',';
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var $field = $('[name^=' + $(this).val() + ']');
var required = ',' + requiredFields + ',';
var $fieldBox = $('.' + $(this).val() + 'Box' );
if(fieldList.indexOf(field) >= 0 || required.indexOf(field) >= 0)
{
$fieldBox.removeClass('hidden');
$field.removeAttr('disabled');
}
else if(!$fieldBox.hasClass('hidden'))
{
$fieldBox.addClass('hidden');
$field.attr('disabled', true);
}
});
}
/**
* Hidden require field.
*
* @access public
* @return void
*/
function hiddenRequireFields()
{
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var required = ',' + requiredFields + ',';
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
});
}
/**
* Set opened builds.
*
+63 -62
View File
@@ -14,6 +14,24 @@
include '../../common/view/header.html.php';
js::set('requiredFields', $config->bug->create->requiredFields);
?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->bug->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<?php js::set('showFields', $showFields);?>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2>
@@ -30,49 +48,32 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<?php endif;?>
</div>
</div>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->bug->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->bug->list->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
?>
<form class='main-form' method='post' target='hiddenwin' id='batchCreateForm'>
<div class="table-responsive">
<table class='table table-form'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox'> <?php echo $lang->product->branch;?></th>
<th class='c-module<?php echo zget($requiredFields, 'module', '', ' required');?>'> <?php echo $lang->bug->module;?></th>
<?php if($config->systemMode == 'new'):?>
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?> projectBox'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
<?php endif;?>
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?> executionBox'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
<th class='c-build required'><?php echo $lang->bug->openedBuild;?></th>
<th class='c-title required'><?php echo $lang->bug->title;?></th>
<?php if(isset($executionType) and $executionType == 'kanban'):?>
<th class='c-execution'><?php echo $lang->kanbancard->region;?></th>
<th class='c-execution'><?php echo $lang->kanbancard->lane;?></th>
<?php endif;?>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->bug->deadline;?></th>
<th class='c-steps<?php echo zget($visibleFields, 'steps', ' hidden') . zget($requiredFields, 'steps', '', ' required');?>'><?php echo $lang->bug->steps;?></th>
<th class='c-type<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $lang->typeAB;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->bug->pri;?></th>
<th class='c-severity<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?>'><?php echo $lang->bug->severity;?></th>
<th class='c-os<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?>'><?php echo $lang->bug->os;?></th>
<th class='c-browser<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?>'><?php echo $lang->bug->browser;?></th>
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->bug->deadline;?></th>
<th class='c-steps<?php echo zget($visibleFields, 'steps', ' hidden') . zget($requiredFields, 'steps', '', ' required');?> stepsBox'><?php echo $lang->bug->steps;?></th>
<th class='c-type<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?> typeBox'><?php echo $lang->typeAB;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->bug->pri;?></th>
<th class='c-severity<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?> severityBox'><?php echo $lang->bug->severity;?></th>
<th class='c-os<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?> osBox'><?php echo $lang->bug->os;?></th>
<th class='c-browser<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?> browserBox'><?php echo $lang->bug->browser;?></th>
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?> keywordsBox'><?php echo $lang->bug->keywords;?></th>
<?php
$extendFields = $this->bug->getFlowExtendFields();
foreach($extendFields as $extendField)
@@ -107,12 +108,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
?>
<tr>
<td class='text-center'><?php echo $i;?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
<?php if($config->systemMode == 'new'):?>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, 'trunk', "class='form-control chosen' multiple");?></td>
<td>
<div class='input-group'>
@@ -132,14 +133,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen'");?></td>
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?> browserBox' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?> keywordsBox'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
@@ -161,12 +162,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
?>
<tr>
<td><?php echo $i;?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> branchBox' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
<?php if($config->systemMode == 'new'):?>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='form-control chosen' multiple");?></td>
<td>
<div class='input-group'>
@@ -186,14 +187,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<td><?php echo html::select("regions[$i]", $regionPairs, $regionID, "class='form-control chosen' onchange='setLane(this.value, $i)'");?></td>
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[$i]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[$i]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[$i]", $lang->bug->priList, $pri, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[$i]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?> browserBox' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?> keywordsBox'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
@@ -203,7 +204,7 @@ js::set('requiredFields', $config->bug->create->requiredFields);
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($visibleFields) + 3?>' class='text-center form-actions'>
<td colspan='<?php echo count($visibleFields) + 4?>' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
@@ -217,12 +218,12 @@ js::set('requiredFields', $config->bug->create->requiredFields);
<tbody>
<tr>
<td>%s</td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?> productBox' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
<td><?php echo html::select("modules[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
<?php if($config->systemMode == 'new'):?>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
<?php endif;?>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
<td id='buildBox%s'><?php echo html::select("openedBuilds[%s][]", $builds, '', "class='form-control chosen' multiple");?></td>
<td>
<div class='input-group'>
@@ -238,14 +239,14 @@ js::set('requiredFields', $config->bug->create->requiredFields);
</div>
</div>
</td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?>'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?>' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[%s]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox'><?php echo html::input("deadlines[%s]", '', "class='form-control form-date'");?></td>
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?> stepsBox'><?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?> typeBox' style='overflow:visible'> <?php echo html::select("types[%s]", $lang->bug->typeList, $type, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox' style='overflow:visible'> <?php echo html::select("pris[%s]", $lang->bug->priList, '', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?> severityBox' style='overflow:visible'><?php echo html::select("severities[%s]", $lang->bug->severityList, '3', "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?> osBox' style='overflow:visible'> <?php echo html::select("oses[%s]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?> browserBox' style='overflow:visible'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?> keywordsBox'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
+1
View File
@@ -1 +1,2 @@
.table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;}
.c-pri{width: 70px;}
+16 -8
View File
@@ -20,6 +20,7 @@ $(function()
});
</script>
<?php else:?>
<?php js::set('requiredFields', $requiredFields);?>
<div id="mainContent" class="main-content">
<div class="main-header clearfix">
<h2><?php echo $lang->caselib->import;?></h2>
@@ -29,13 +30,13 @@ $(function()
<thead>
<tr>
<th class='c-number'><?php echo $lang->testcase->id?></th>
<th><?php echo $lang->testcase->title?></th>
<th class='c-module'><?php echo $lang->testcase->module?></th>
<th class='c-status'><?php echo $lang->testcase->pri?></th>
<th class='c-status'><?php echo $lang->testcase->type?></th>
<th><?php echo $lang->testcase->stage?></th>
<th class='c-text'><?php echo $lang->testcase->keywords?></th>
<th><?php echo $lang->testcase->precondition?></th>
<th class='c-title' id='title'> <?php echo $lang->testcase->title?></th>
<th class='c-module' id='module'> <?php echo $lang->testcase->module?></th>
<th class='c-pri' id='pri'> <?php echo $lang->testcase->pri?></th>
<th class='c-type' id='type'> <?php echo $lang->testcase->type?></th>
<th class='c-stage' id='stage'> <?php echo $lang->testcase->stage?></th>
<th class='c-text' id='keywords'> <?php echo $lang->testcase->keywords?></th>
<th class='c-precondition' id='precondition'><?php echo $lang->testcase->precondition?></th>
<th class='c-case-step col-content'>
<table class='w-p100 table-borderless'>
<tr>
@@ -127,6 +128,13 @@ $(function()
<style>#mainContent .col-content{display: none;}</style>
<?php endif;?>
<script>
$(function(){$.fixedTableHead('#showData');});
$(function()
{
$.fixedTableHead('#showData');
$("#showData th").each(function()
{
if(requiredFields.indexOf(this.id) !== -1) $("#" + this.id).addClass('required');
});
});
</script>
<?php include '../../common/view/footer.html.php';?>
+2
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = 'Waterfall';
$lang->scrumModel = 'Scrum';
$lang->all = 'All';
$lang->viewDetails = 'View Details';
$lang->app = 'APP';
$lang->actions = 'Aktionen';
$lang->restore = 'Wiederherstellen';
@@ -282,6 +283,7 @@ $lang->devops->mr = 'Merge Request';
$lang->devops->repo = 'Repo';
$lang->devops->rules = 'Rule';
$lang->devops->settings = 'Setting Merge Request';
$lang->devops->set = 'Set';
$lang->admin->system = 'System';
$lang->admin->entry = 'Application';
+2
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = 'Waterfall';
$lang->scrumModel = 'Scrum';
$lang->all = 'All';
$lang->viewDetails = 'View Details';
$lang->app = 'APP';
$lang->actions = 'Action';
$lang->restore = 'Reset';
@@ -282,6 +283,7 @@ $lang->devops->mr = 'Merge Request';
$lang->devops->repo = 'Repo';
$lang->devops->rules = 'Rule';
$lang->devops->settings = 'Setting Merge Request';
$lang->devops->set = 'Set';
$lang->admin->system = 'System';
$lang->admin->entry = 'Application';
+2
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = 'Waterfall';
$lang->scrumModel = 'Scrum';
$lang->all = 'All';
$lang->viewDetails = 'View Details';
$lang->app = 'APP';
$lang->actions = 'Action';
$lang->restore = 'Réinitialiser';
@@ -282,6 +283,7 @@ $lang->devops->mr = 'Merge Request';
$lang->devops->repo = 'Repo';
$lang->devops->rules = 'Rule';
$lang->devops->settings = 'Setting Merge Request';
$lang->devops->set = 'Set';
$lang->admin->system = 'System';
$lang->admin->entry = 'Application';
+16 -13
View File
@@ -395,22 +395,25 @@ $lang->qa->dividerMenu = ',bug,testtask,caselib,';
/* DevOps menu. */
$lang->devops->menu = new stdclass();
$lang->devops->menu->code = array('link' => "{$lang->repo->common}|repo|browse|repoID=%s", 'alias' => 'diff,view,revision,log,blame,showsynccommit');
$lang->devops->menu->compile = array('link' => "{$lang->devops->compile}|job|browse", 'subModule' => 'compile,job');
$lang->devops->menu->mr = array('link' => "{$lang->devops->mr}|mr|browse|repoID=%s");
$lang->devops->menu->gitlab = array('link' => "GitLab|gitlab|browse", 'alias' => 'create,edit');
$lang->devops->menu->sonarqube = array('link' => "SonarQube|sonarqube|browse");
$lang->devops->menu->jenkins = array('link' => "Jenkins|jenkins|browse", 'alias' => 'create,edit');
$lang->devops->menu->maintain = array('link' => "{$lang->devops->repo}|repo|maintain", 'alias' => 'create,edit');
$lang->devops->menu->rules = array('link' => "{$lang->devops->rules}|repo|setrules");
$lang->devops->menu->compile = array('link' => "{$lang->devops->compile}|job|browse", 'subModule' => 'compile,job');
$lang->devops->menu->app = array('link' => "{$lang->app}|devops|app|%s");
$lang->devops->menu->set = array('link' => "{$lang->devops->set}|repo|maintain", 'subModule' => 'gitlab,jenkins,sonarqube', 'alias' => 'setrules,create,edit');
$lang->devops->menuOrder[5] = 'code';
$lang->devops->menuOrder[10] = 'compile';
$lang->devops->menuOrder[15] = 'mr';
$lang->devops->menuOrder[20] = 'gitlab';
$lang->devops->menuOrder[25] = 'sonarqube';
$lang->devops->menuOrder[30] = 'jenkins';
$lang->devops->menuOrder[35] = 'maintain';
$lang->devops->menuOrder[40] = 'rules';
$lang->devops->menuOrder[10] = 'mr';
$lang->devops->menuOrder[15] = 'compile';
$lang->devops->menuOrder[20] = 'app';
$lang->devops->menuOrder[25] = 'set';
$lang->devops->dividerMenu = ',set,';
$lang->devops->menu->set['subMenu'] = new stdclass();
$lang->devops->menu->set['subMenu']->repo = array('link' => "{$lang->devops->repo}|repo|maintain", 'alias' => 'create,edit');
$lang->devops->menu->set['subMenu']->gitlab = array('link' => 'GitLab|gitlab|browse', 'subModule' => 'gitlab');
$lang->devops->menu->set['subMenu']->jenkins = array('link' => 'Jenkins|jenkins|browse', 'subModule' => '');
$lang->devops->menu->set['subMenu']->sonarqube = array('link' => 'SonarQube|sonarqube|browse', 'subModule' => 'sonarqube');
$lang->devops->menu->set['subMenu']->setrules = array('link' => "{$lang->devops->rules}|repo|setrules");
/* Kanban menu. */
$lang->kanban->menu = new stdclass();
+9
View File
@@ -65,6 +65,7 @@ $lang->noData = 'Không có dữ liệu.';
$lang->fullscreen = 'Fullscreen';
$lang->retrack = 'Retrack';
$lang->whitelist = 'Lista bianca';
$lang->app = 'APP';
$lang->actions = 'Hành động';
$lang->restore = 'Thiết lập lại';
@@ -125,6 +126,7 @@ $lang->nameAB = 'Name';
$lang->common = new stdclass();
$lang->common->common = 'Module chung';
$lang->devops->common = 'DevOps';
global $config;
list($programModule, $programMethod) = explode('-', $config->programLink);
@@ -229,6 +231,13 @@ $lang->system->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subMod
$lang->measurement = new stdclass();
$lang->measurement->menu = new stdclass();
$lang->devops->compile = 'Compile';
$lang->devops->mr = 'Merge Request';
$lang->devops->repo = 'Repo';
$lang->devops->rules = 'Rule';
$lang->devops->settings = 'Setting Merge Request';
$lang->devops->set = 'Set';
$lang->searchTips = '';
$lang->searchAB = 'Tìm ki?m';
+2
View File
@@ -84,6 +84,7 @@ $lang->waterfallModel = '瀑布模型';
$lang->scrumModel = '敏捷模型';
$lang->all = '所有';
$lang->viewDetails = '查看详情';
$lang->app = '应用';
$lang->actions = '操作';
$lang->restore = '恢复默认';
@@ -282,6 +283,7 @@ $lang->devops->mr = '合并请求';
$lang->devops->repo = '版本库';
$lang->devops->rules = '指令';
$lang->devops->settings = '合并请求设置';
$lang->devops->set = '设置';
$lang->admin->system = '系统';
$lang->admin->entry = '应用';
+1
View File
@@ -78,6 +78,7 @@ $lang->globalSetting = '全局設置';
$lang->waterfallModel = '瀑布模型';
$lang->all = '所有';
$lang->viewDetails = '查看詳情';
$lang->app = '應用';
$lang->actions = '操作';
$lang->restore = '恢復預設';
+1
View File
@@ -2453,6 +2453,7 @@ EOD;
if($module == 'company' and $method == 'dynamic') return true;
if($module == 'action' and $method == 'editcomment') return true;
if($module == 'action' and $method == 'comment') return true;
if($module == 'report' and $method == 'export') return true;
if(!isset($acls['views'][$menu])) return false;
return true;
+3 -1
View File
@@ -16,10 +16,12 @@
#formSettingForm .checkboxes {padding: 10px 3px;}
#formSettingForm .checkbox-primary {width: 50%; float: left; margin: 3px 0;}
#formSetting .btn {margin-right: 8px;}
[lang^='de'] #formSetting {min-width: 360px;}
[lang^='fr'] #formSetting {min-width: 320px;}
</style>
<button type="button" title="<?php echo $lang->customField;?>" class="btn btn-link" id="customField" data-toggle="dropdown"><i class="icon icon-cog"></i></button>
<div class="dropdown-menu pull-right" id="formSetting">
<form class='with-padding load-indicator' id='formSettingForm' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
<form class='with-padding load-indicator not-watch' id='formSettingForm' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
<div><?php echo $lang->customField;?></div>
<div class="clearfix checkboxes">
<?php echo html::checkbox('fields', $customFields, $showFields);?>
+4 -1
View File
@@ -676,14 +676,17 @@ class custom extends control
$account = $this->app->user->account;
if($this->server->request_method == 'POST')
{
$fields = $this->post->fields;
$fields = $this->post->fields;
if(is_array($fields)) $fields = join(',', $fields);
$this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields);
if(in_array($module, array('task', 'testcase', 'story')) and $section == 'custom' and in_array($key, array('createFields', 'batchCreateFields'))) return;
if($module == 'bug' and $section == 'custom' and $key == 'batchCreateFields') return;
}
else
{
$this->loadModel('setting')->deleteItems("owner=$account&module=$module&section=$section&key=$key");
}
return print(js::reload('parent'));
}
+3 -2
View File
@@ -12,10 +12,11 @@
<?php endif;?>
</div>
<div class="info">
<div class="version">
<?php $version = $version ? $version : $doc->version;?>
<div class="version" data-version='<?php echo $version;?>'>
<div class='btn-group'>
<a href='javascript:;' class='btn btn-link btn-limit text-ellipsis' data-toggle='dropdown' style="max-width: 120px;">
#<?php echo $version ? $version : $doc->version;?>
#<?php echo $version;?>
<span class="caret"></span>
</a>
<ul class='dropdown-menu doc-version-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
+10 -1
View File
@@ -805,6 +805,14 @@ class execution extends control
}
$actionURL = $this->createLink('execution', 'story', "executionID=$executionID&orderBy=$orderBy&type=bySearch&queryID=myQueryID");
$branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
$branchOption = array();
foreach($branchGroups as $productID => $branches)
{
foreach($branches as $branchID => $name)
{
$branchOption[$branchID] = $name;
}
}
$this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'executionStory', $executionID);
/* Header and position. */
@@ -867,9 +875,10 @@ class execution extends control
$this->view->pager = $pager;
$this->view->setModule = true;
$this->view->branchGroups = $branchGroups;
$this->view->branchOption = $branchOption;
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->view->showBranch = $showBranch;
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->display();
}
+1 -1
View File
@@ -1,7 +1,6 @@
td.delayed {background: #e84e0f !important; color: white;}
#int-dropdown {margin-left: -8px; border-radius: 4px; border: 1px solid #0c64eb;}
#projectTaskForm table tbody tr td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
th.c-deadline {text-align: center;}
.table td.c-estimate, .table td.c-consumed, .table td.c-left {padding-right: 12px;}
.c-estimate {text-align: right;}
.c-consumed {text-align: right;}
@@ -10,3 +9,4 @@ th.c-deadline {text-align: center;}
.btn-toolbar > .btn {margin-right: 5px !important;}
#taskList .c-progress{padding-right: 8px; text-align: right;}
#datatable-taskList .c-progress{padding-right: 8px; text-align: right;}
.c-finishedBy, .c-lastEditedBy {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
+1 -1
View File
@@ -231,7 +231,7 @@
<tr id="story<?php echo $story->id;?>" data-id='<?php echo $story->id;?>' data-order='<?php echo $story->order ?>' data-estimate='<?php echo $story->estimate?>' data-cases='<?php echo zget($storyCases, $story->id, 0)?>'>
<?php foreach($setting as $key => $value)
{
$this->story->printCell($value, $story, $users, '', $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch);
$this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch);
}
?>
</tr>
+4
View File
@@ -124,3 +124,7 @@ $config->gitlab->accessLevel['owner'] = 50;
/* Minimum compatible version. */
$config->gitlab->minCompatibleVersion = '9.0';
$config->gitlab->menus['project'] = 'browseProject';
$config->gitlab->menus['group'] = 'browseGroup';
$config->gitlab->menus['user'] = 'browseUser';
+16 -3
View File
@@ -325,8 +325,9 @@ class gitlab extends control
if(!$openID) return print(js::alert($this->lang->gitlab->mustBindUser) . js::locate($this->createLink('gitlab', 'browse')));
}
$groups = $this->gitlab->apiGetGroups($gitlabID, $orderBy);
$adminGroups = $this->gitlab->apiGetGroups($gitlabID, $orderBy, 'owner');
$keyword = fixer::input('post')->setDefault('keyword', '')->get('keyword');
$groups = $this->gitlab->apiGetGroups($gitlabID, $orderBy, '', $keyword);
$adminGroups = $this->gitlab->apiGetGroups($gitlabID, $orderBy, 'owner', $keyword);
$adminGroupIDList = array();
foreach($adminGroups as $group) $adminGroupIDList[] = $group->id;
@@ -337,6 +338,7 @@ class gitlab extends control
$this->view->gitlabGroupList = $groups;
$this->view->adminGroupIDList = $adminGroupIDList;
$this->view->orderBy = $orderBy;
$this->view->keyword = $keyword;
$this->display();
}
@@ -558,11 +560,22 @@ class gitlab extends control
if(!$user->is_admin) $isAdmin = false;
}
$keyword = fixer::input('post')->setDefault('keyword', '')->get('keyword');
$users = $this->gitlab->apiGetUsers($gitlabID, false, $orderBy);
if($keyword)
{
foreach($users as $key => $user)
{
if(strpos($user->realname, $keyword) === false) unset($users[$key]);
}
}
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->browseUser;
$this->view->gitlabID = $gitlabID;
$this->view->gitlabUserList = $this->gitlab->apiGetUsers($gitlabID, false, $orderBy);
$this->view->gitlabUserList = $users;
$this->view->orderBy = $orderBy;
$this->view->isAdmin = $isAdmin;
$this->view->keyword = $keyword;
$this->display();
}
-17
View File
@@ -1,17 +0,0 @@
$(document).ready(function()
{
$('#projectSearch').click(function()
{
triggerSearch();
});
$('#keyword').keypress(function(event)
{
if(event.which == 13) triggerSearch();
})
});
function triggerSearch()
{
$("#gitlabprojectForm").submit();
}
+19 -1
View File
@@ -17,4 +17,22 @@ function setAvatar()
$(".avatar img").attr("src", window.URL.createObjectURL(files[0]));
$(".avatar").removeClass('hidden');
});
}
}
$(document).ready(function()
{
$('#gitlabSearch').click(function()
{
triggerSearch();
});
$('#keyword').keypress(function(event)
{
if(event.which == 13) triggerSearch();
})
});
function triggerSearch()
{
$("#gitlabForm").submit();
}
+6 -5
View File
@@ -24,14 +24,14 @@ $lang->gitlab->lastUpdate = 'Last Update';
$lang->gitlab->confirmAddWebhook = 'Are you sure about creating Webhook?';
$lang->gitlab->addWebhookSuccess = 'Webhook created successfully';
$lang->gitlab->failCreateWebhook = 'Failed to create Webhook, please view the log';
$lang->gitlab->placeholderSearch = 'Project name';
$lang->gitlab->placeholderSearch = 'Enter name';
$lang->gitlab->browseAction = 'GitLab List';
$lang->gitlab->deleteAction = 'Delete GitLab';
$lang->gitlab->gitlabProject = "GitLab Project";
$lang->gitlab->browseProject = "GitLab Project List";
$lang->gitlab->browseUser = "User List";
$lang->gitlab->browseGroup = "Group List";
$lang->gitlab->browseProject = "Project";
$lang->gitlab->browseUser = "User";
$lang->gitlab->browseGroup = "Group";
$lang->gitlab->browseBranch = "GitLab Branch List";
$lang->gitlab->browseTag = "GitLab Tag List";
$lang->gitlab->browseTagPriv = "GitLab Tag protected List";
@@ -62,12 +62,13 @@ $lang->gitlab->editTagPriv = 'Edit tag protected';
$lang->gitlab->deleteTagPriv = 'Delete tag protected';
$lang->gitlab->id = 'ID';
$lang->gitlab->name = "GitLab Server";
$lang->gitlab->name = "Server Name";
$lang->gitlab->url = 'Server URL';
$lang->gitlab->token = 'Token';
$lang->gitlab->defaultProject = 'Default Project';
$lang->gitlab->private = 'MD5 Verify';
$lang->gitlab->server = "Server List";
$lang->gitlab->lblCreate = 'Create GitLab Server';
$lang->gitlab->desc = 'Description';
$lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be used first';
+6 -5
View File
@@ -24,14 +24,14 @@ $lang->gitlab->lastUpdate = 'Last Update';
$lang->gitlab->confirmAddWebhook = 'Are you sure about creating Webhook?';
$lang->gitlab->addWebhookSuccess = 'Webhook created successfully';
$lang->gitlab->failCreateWebhook = 'Failed to create Webhook, please view the log';
$lang->gitlab->placeholderSearch = 'Project name';
$lang->gitlab->placeholderSearch = 'Enter name';
$lang->gitlab->browseAction = 'GitLab List';
$lang->gitlab->deleteAction = 'Delete GitLab';
$lang->gitlab->gitlabProject = "GitLab Project";
$lang->gitlab->browseProject = "GitLab Project List";
$lang->gitlab->browseUser = "User List";
$lang->gitlab->browseGroup = "Group List";
$lang->gitlab->browseProject = "Project";
$lang->gitlab->browseUser = "User";
$lang->gitlab->browseGroup = "Group";
$lang->gitlab->browseBranch = "GitLab Branch List";
$lang->gitlab->browseTag = "GitLab Tag List";
$lang->gitlab->browseTagPriv = "GitLab Tag protected List";
@@ -62,12 +62,13 @@ $lang->gitlab->editTagPriv = 'Edit tag protected';
$lang->gitlab->deleteTagPriv = 'Delete tag protected';
$lang->gitlab->id = 'ID';
$lang->gitlab->name = "GitLab Server";
$lang->gitlab->name = "Server Name";
$lang->gitlab->url = 'Server URL';
$lang->gitlab->token = 'Token';
$lang->gitlab->defaultProject = 'Default Project';
$lang->gitlab->private = 'MD5 Verify';
$lang->gitlab->server = "Server List";
$lang->gitlab->lblCreate = 'Create GitLab Server';
$lang->gitlab->desc = 'Description';
$lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be used first';
+6 -5
View File
@@ -24,14 +24,14 @@ $lang->gitlab->lastUpdate = 'Last Update';
$lang->gitlab->confirmAddWebhook = 'Are you sure about creating Webhook?';
$lang->gitlab->addWebhookSuccess = 'Webhook created successfully';
$lang->gitlab->failCreateWebhook = 'Failed to create Webhook, please view the log';
$lang->gitlab->placeholderSearch = 'Project name';
$lang->gitlab->placeholderSearch = 'Enter name';
$lang->gitlab->browseAction = 'GitLab List';
$lang->gitlab->deleteAction = 'Delete GitLab';
$lang->gitlab->gitlabProject = "GitLab Project";
$lang->gitlab->browseProject = "GitLab Project List";
$lang->gitlab->browseUser = "User List";
$lang->gitlab->browseGroup = "Group List";
$lang->gitlab->browseProject = "Project";
$lang->gitlab->browseUser = "User";
$lang->gitlab->browseGroup = "Group";
$lang->gitlab->browseBranch = "GitLab Branch List";
$lang->gitlab->browseTag = "GitLab Tag List";
$lang->gitlab->browseTagPriv = "GitLab Tag protected List";
@@ -62,12 +62,13 @@ $lang->gitlab->editTagPriv = 'Edit tag protected';
$lang->gitlab->deleteTagPriv = 'Delete tag protected';
$lang->gitlab->id = 'ID';
$lang->gitlab->name = "GitLab Server";
$lang->gitlab->name = "Server Name";
$lang->gitlab->url = 'Server URL';
$lang->gitlab->token = 'Token';
$lang->gitlab->defaultProject = 'Default Project';
$lang->gitlab->private = 'MD5 Verify';
$lang->gitlab->server = "Server List";
$lang->gitlab->lblCreate = 'Create GitLab Server';
$lang->gitlab->desc = 'Description';
$lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be used first';
+239
View File
@@ -0,0 +1,239 @@
<?php
$lang->gitlab = new stdclass;
$lang->gitlab->common = 'GitLab';
$lang->gitlab->browse = 'GitLab Browse';
$lang->gitlab->search = 'Search';
$lang->gitlab->create = 'Create GitLab';
$lang->gitlab->edit = 'Edit GitLab';
$lang->gitlab->view = 'View GitLab';
$lang->gitlab->bindUser = 'Bind User';
$lang->gitlab->webhook = 'Webhook';
$lang->gitlab->bindProduct = 'Import Product';
$lang->gitlab->importIssue = 'Import Issue';
$lang->gitlab->delete = 'Delete GitLab';
$lang->gitlab->confirmDelete = 'Do you want to delete this GitLab server?';
$lang->gitlab->gitlabAccount = 'GitLab Account';
$lang->gitlab->zentaoAccount = 'Zentao Account';
$lang->gitlab->bindingStatus = 'Binding Status';
$lang->gitlab->notBind = 'Not bind';
$lang->gitlab->binded = 'Binded';
$lang->gitlab->bindedError = 'The bound user has been deleted or modified. Please bind again.';
$lang->gitlab->bindDynamic = '%s and Zentao user %s';
$lang->gitlab->serverFail = 'Connect to GitLab server failed, please check the GitLab server.';
$lang->gitlab->lastUpdate = 'Last Update';
$lang->gitlab->confirmAddWebhook = 'Are you sure about creating Webhook?';
$lang->gitlab->addWebhookSuccess = 'Webhook created successfully';
$lang->gitlab->failCreateWebhook = 'Failed to create Webhook, please view the log';
$lang->gitlab->placeholderSearch = 'Enter name';
$lang->gitlab->browseAction = 'GitLab List';
$lang->gitlab->deleteAction = 'Delete GitLab';
$lang->gitlab->gitlabProject = "GitLab Project";
$lang->gitlab->browseProject = "Project";
$lang->gitlab->browseUser = "User";
$lang->gitlab->browseGroup = "Group";
$lang->gitlab->browseBranch = "GitLab Branch List";
$lang->gitlab->browseTag = "GitLab Tag List";
$lang->gitlab->browseTagPriv = "GitLab Tag protected List";
$lang->gitlab->gitlabIssue = "GitLab Issue";
$lang->gitlab->zentaoProduct = 'Zentao Product';
$lang->gitlab->objectType = 'Type'; // task, bug, story
$lang->gitlab->manageProjectMembers = 'Manage project member';
$lang->gitlab->createProject = 'Create GitLab project';
$lang->gitlab->editProject = 'Eidt GitLab project';
$lang->gitlab->deleteProject = 'Delete GitLab project';
$lang->gitlab->createGroup = 'Create group';
$lang->gitlab->editGroup = 'Edit group';
$lang->gitlab->deleteGroup = 'Delete group';
$lang->gitlab->createUser = 'Create user';
$lang->gitlab->editUser = 'Edit user';
$lang->gitlab->deleteUser = 'Delete user';
$lang->gitlab->createBranch = 'Add branch';
$lang->gitlab->manageGroupMembers = 'Manage group member';
$lang->gitlab->createWebhook = 'Create Webhook';
$lang->gitlab->browseBranchPriv = 'Protect branch';
$lang->gitlab->createBranchPriv = 'Cerate branch protected';
$lang->gitlab->editBranchPriv = 'Edit branch protected';
$lang->gitlab->deleteBranchPriv = 'Delete branch protected';
$lang->gitlab->createTag = 'Create Tag';
$lang->gitlab->deleteTag = 'Delete tag';
$lang->gitlab->createTagPriv = 'Create tag protected';
$lang->gitlab->editTagPriv = 'Edit tag protected';
$lang->gitlab->deleteTagPriv = 'Delete tag protected';
$lang->gitlab->id = 'ID';
$lang->gitlab->name = "Server Name";
$lang->gitlab->url = 'Server URL';
$lang->gitlab->token = 'Token';
$lang->gitlab->defaultProject = 'Default Project';
$lang->gitlab->private = 'MD5 Verify';
$lang->gitlab->server = "Server List";
$lang->gitlab->lblCreate = 'Create GitLab Server';
$lang->gitlab->desc = 'Description';
$lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be used first';
$lang->gitlab->tips = 'When using a password, please disable the "Prevent cross-site request forgery" option in the GitLab global security settings.';
$lang->gitlab->emptyError = " cannot be empty";
$lang->gitlab->createSuccess = "Create success";
$lang->gitlab->mustBindUser = 'You have not registered the GitLab account, please contact the administrator to register.';
$lang->gitlab->noAccess = 'Permission denied';
$lang->gitlab->notCompatible = 'The current GitLab version is not compatible with ZenTao, please upgrade the GitLab version and try again';
$lang->gitlab->deleted = 'Deleted';
$lang->gitlab->placeholder = new stdclass;
$lang->gitlab->placeholder->name = '';
$lang->gitlab->placeholder->url = "Please fill in the access address of the GitLab Server homepage, as: https://gitlab.zentao.net.";
$lang->gitlab->placeholder->token = "Please fill in the access token of an account with root privileges.";
$lang->gitlab->placeholder->projectPath = "It should contain only letters, digits, underscore, hyphen and period. It should not start with hypen, or end with .git or .atom.";
$lang->gitlab->noImportableIssues = "There are currently no issues available for import.";
$lang->gitlab->tokenError = "The current token is not root rights.";
$lang->gitlab->tokenLimit = "The current token has no admin privilege. Please regenerate one with root user in GitLab.";
$lang->gitlab->hostError = "So the current GitLab server address is invalid or the current GitLab version is not compatible with ZenTao, please confirm that the current server can be accessed or contact the administrator to upgrade the GitLab version to %s or above and try again.";
$lang->gitlab->bindUserError = "Can not bind users repeatedly %s";
$lang->gitlab->importIssueError = "The execution to which this issue belongs is not selected.";
$lang->gitlab->importIssueWarn = "There is a problem of import failure, you can try to import again.";
$lang->gitlab->accessLevels[10] = 'Guest';
$lang->gitlab->accessLevels[20] = 'Reporter';
$lang->gitlab->accessLevels[30] = 'Developer';
$lang->gitlab->accessLevels[40] = 'Maintainer';
$lang->gitlab->accessLevels[50] = 'Owner';
$lang->gitlab->apiError[0] = 'internal is not allowed in a private group.';
$lang->gitlab->apiError[1] = 'public is not allowed in a private group.';
$lang->gitlab->apiError[2] = 'is too short (minimum is 8 characters)';
$lang->gitlab->apiError[3] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'";
$lang->gitlab->apiError[4] = 'Branch already exists';
$lang->gitlab->apiError[5] = 'Failed to save group {:path=>["has already been taken"]}';
$lang->gitlab->apiError[6] = '403 Forbidden';
$lang->gitlab->errorLang[0] = 'You cannot set Internal as its Visibility Level, if it is private in GitLab.';
$lang->gitlab->errorLang[1] = 'You cannot set Public as its Visibility Level, if it is private in GitLab.';
$lang->gitlab->errorLang[2] = 'Password is too short (minimum is 8 characters)';
$lang->gitlab->errorLang[3] = 'It should contain only letters, digits, underscore, hyphen and period. It should not start with hypen, or end with .git or .atom.';
$lang->gitlab->errorLang[4] = 'Branch already exists.';
$lang->gitlab->errorLang[5] = 'Failed to save group, path has already been taken.';
$lang->gitlab->errorLang[6] = $lang->gitlab->noAccess;
$lang->gitlab->project = new stdclass;
$lang->gitlab->project->id = "Project ID";
$lang->gitlab->project->name = "Project name";
$lang->gitlab->project->create = "Create GitLab project";
$lang->gitlab->project->edit = "Edit GitLab project";
$lang->gitlab->project->url = "Project URL";
$lang->gitlab->project->path = "Project slug";
$lang->gitlab->project->description = "Project description";
$lang->gitlab->project->visibility = "Visibility Level";
$lang->gitlab->project->visibilityList['private'] = "Private(Project access must be granted explicitly to each user. If this project is part of a group, access will be granted to members of the group)";
$lang->gitlab->project->visibilityList['internal'] = "Internal(The project can be accessed by any logged in user except external users)";
$lang->gitlab->project->visibilityList['public'] = "Public(The project can be accessed without any authentication)";
$lang->gitlab->project->star = "Stars";
$lang->gitlab->project->fork = "Forks";
$lang->gitlab->project->mergeRequests = "Merge Requests";
$lang->gitlab->project->issues = "Issues";
$lang->gitlab->project->tagList = "Topics";
$lang->gitlab->project->tagListTips = "Separate topics with commas.";
$lang->gitlab->project->emptyNameError = "Project name cannot be empty.";
$lang->gitlab->project->emptyPathError = "Project slug cannot be empty.";
$lang->gitlab->project->confirmDelete = 'Do you want to delete this GitLab project?';
$lang->gitlab->project->notbindedError = 'GitLab user has not been bound, unable to modify permissions!';
$lang->gitlab->project->publicTip = 'The visible status of the current project will be modified to public, and the project can be accessed without any authentication in GitLab. ';
$lang->gitlab->user = new stdclass;
$lang->gitlab->user->id = "User ID";
$lang->gitlab->user->name = "Name";
$lang->gitlab->user->username = "Username";
$lang->gitlab->user->email = "Email";
$lang->gitlab->user->password = "Password";
$lang->gitlab->user->passwordRepeat = "Repeat Password";
$lang->gitlab->user->projectsLimit = "Projects limit";
$lang->gitlab->user->canCreateGroup = "Can create group";
$lang->gitlab->user->external = "External";
$lang->gitlab->user->externalTip = "External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.";
$lang->gitlab->user->bind = "Zentao user";
$lang->gitlab->user->avatar = "Avatar";
$lang->gitlab->user->skype = "Skype";
$lang->gitlab->user->linkedin = "Linkedin";
$lang->gitlab->user->twitter = "Twitter";
$lang->gitlab->user->websiteUrl = "Website url";
$lang->gitlab->user->note = "Note";
$lang->gitlab->user->createOn = "Created on";
$lang->gitlab->user->lastActivity = "Last activity";
$lang->gitlab->user->create = "Create GitLab user";
$lang->gitlab->user->edit = "Edit GitLab user";
$lang->gitlab->user->emptyError = "cannot be empty";
$lang->gitlab->user->passwordError = "The second password is inconsistent!";
$lang->gitlab->user->bindError = "The user has been bound!";
$lang->gitlab->user->confirmDelete = 'Do you want to delete this GitLab user?';
$lang->gitlab->group = new stdclass;
$lang->gitlab->group->id = "Group ID";
$lang->gitlab->group->name = "Group name";
$lang->gitlab->group->path = "Group URL";
$lang->gitlab->group->pathTip = "Changing group URL can have unintended side effects.";
$lang->gitlab->group->description = "Group description";
$lang->gitlab->group->avatar = "Group avatar";
$lang->gitlab->group->avatarTip = 'Max file size is 200 KB.';
$lang->gitlab->group->visibility = "Visibility level";
$lang->gitlab->group->visibilityList['private'] = "Private(The group and its projects can only be viewed by members)";
$lang->gitlab->group->visibilityList['internal'] = "Internal(The group and any internal projects can be viewed by any logged in user except external users)";
$lang->gitlab->group->visibilityList['public'] = "Public(The group and any public projects can be viewed without any authentication.)";
$lang->gitlab->group->permission = 'Permission';
$lang->gitlab->group->requestAccessEnabledTip = "Allow users to request access (if visibility is public or internal)";
$lang->gitlab->group->lfsEnabled = 'Large File Storage';
$lang->gitlab->group->lfsEnabledTip = "Allow projects within this group to use Git LFS(This setting can be overridden in each project)";
$lang->gitlab->group->projectCreationLevel = "Allowed to create projects";
$lang->gitlab->group->projectCreationLevelList['noone'] = "No one";
$lang->gitlab->group->projectCreationLevelList['maintainer'] = "Maintainers";
$lang->gitlab->group->projectCreationLevelList['developer'] = "Developers + Maintainers";
$lang->gitlab->group->subgroupCreationLevel = "Allowed to create projects";
$lang->gitlab->group->subgroupCreationLevelList['owner'] = "Owners";
$lang->gitlab->group->subgroupCreationLevelList['maintainer'] = "Maintainers";
$lang->gitlab->group->create = "Create Group";
$lang->gitlab->group->edit = "Edit Group";
$lang->gitlab->group->createOn = "Created on";
$lang->gitlab->group->members = "Group Members";
$lang->gitlab->group->confirmDelete = 'Do you want to delete this GitLab group?';
$lang->gitlab->group->emptyError = "cannot be empty";
$lang->gitlab->group->manageMembers = 'Manage Group Members';
$lang->gitlab->group->memberName = 'Account';
$lang->gitlab->group->memberAccessLevel = 'Access Level';
$lang->gitlab->group->memberExpiresAt = 'Expiration time';
$lang->gitlab->group->repeatError = "Group members cannot be added repeatedly";
$lang->gitlab->group->publicTip = 'The visible status of the current group will be modified to public, and the group can be accessed without any authentication in GitLab. ';
$lang->gitlab->branch = new stdclass();
$lang->gitlab->branch->name = 'Branch name';
$lang->gitlab->branch->from = 'Create from';
$lang->gitlab->branch->create = 'Create';
$lang->gitlab->branch->lastCommitter = 'Last Committer';
$lang->gitlab->branch->lastCommittedDate = 'Last Committed Date';
$lang->gitlab->branch->accessLevel = "Branch protection list";
$lang->gitlab->branch->mergeAllowed = "Merge Allowed";
$lang->gitlab->branch->pushAllowed = "Push Allowed";
$lang->gitlab->branch->placeholderSearch = "Branch name";
$lang->gitlab->branch->placeholderSelect = "Branch name";
$lang->gitlab->branch->confirmDelete = 'Branch will be writable for developers. Are you sure?';
$lang->gitlab->branch->branchCreationLevelList[40] = "Maintainers";
$lang->gitlab->branch->branchCreationLevelList[30] = "Developers + Maintainers";
$lang->gitlab->branch->branchCreationLevelList[0] = "No one";
$lang->gitlab->branch->emptyPrivNameError = "Branch cannot be empty.";
$lang->gitlab->branch->issetPrivNameError = "The protection branch already exists";
$lang->gitlab->tag = new stdclass();
$lang->gitlab->tag->name = 'Tag name';
$lang->gitlab->tag->ref = 'Create from';
$lang->gitlab->tag->lastCommitter = 'Last Committer';
$lang->gitlab->tag->lastCommittedDate = 'Last Committed Date';
$lang->gitlab->tag->placeholderSearch = "Enter branch tag";
$lang->gitlab->tag->message = 'Message';
$lang->gitlab->tag->emptyNameError = "Name cannot be empty.";
$lang->gitlab->tag->emptyRefError = "Create from cannot be empty.";
$lang->gitlab->tag->issetNameError = "The tag already exists";
$lang->gitlab->tag->confirmDelete = 'Do you want to delete this GitLab tag?';
$lang->gitlab->tag->protected = 'Protected';
$lang->gitlab->tag->accessLevel = 'Allow creation';
$lang->gitlab->tag->protectConfirmDel = 'Do you want to delete this GitLab tag protected?';
$lang->gitlab->tag->emptyPrivNameError = 'Tag cannot be empty.';
$lang->gitlab->tag->issetPrivNameError = 'The protection tag already exists.';
+6 -5
View File
@@ -24,14 +24,14 @@ $lang->gitlab->lastUpdate = '最后更新';
$lang->gitlab->confirmAddWebhook = '您确定创建Webhook吗?';
$lang->gitlab->addWebhookSuccess = 'Webhook创建成功';
$lang->gitlab->failCreateWebhook = 'Webhook创建失败,请查看日志';
$lang->gitlab->placeholderSearch = '请输入项目名称';
$lang->gitlab->placeholderSearch = '请输入名称';
$lang->gitlab->browseAction = 'GitLab列表';
$lang->gitlab->deleteAction = '删除GitLab';
$lang->gitlab->gitlabProject = "{$lang->gitlab->common}项目";
$lang->gitlab->browseProject = "{$lang->gitlab->common}项目列表";
$lang->gitlab->browseUser = "用户列表";
$lang->gitlab->browseGroup = "群组列表";
$lang->gitlab->browseProject = "项目";
$lang->gitlab->browseUser = "用户";
$lang->gitlab->browseGroup = "群组";
$lang->gitlab->browseBranch = "GitLab分支列表";
$lang->gitlab->browseTag = "GitLab标签列表";
$lang->gitlab->browseTagPriv = "GitLab标签保护列表";
@@ -62,12 +62,13 @@ $lang->gitlab->editTagPriv = '编辑标签保护';
$lang->gitlab->deleteTagPriv = '删除标签保护';
$lang->gitlab->id = 'ID';
$lang->gitlab->name = "{$lang->gitlab->common}服务器";
$lang->gitlab->name = "服务器名称";
$lang->gitlab->url = '服务器地址';
$lang->gitlab->token = 'Token';
$lang->gitlab->defaultProject = '默认项目';
$lang->gitlab->private = 'MD5验证';
$lang->gitlab->server = "服务器列表";
$lang->gitlab->lblCreate = '添加GitLab服务器';
$lang->gitlab->desc = '描述';
$lang->gitlab->tokenFirst = 'Token不为空时,优先使用Token。';
+43 -1
View File
@@ -601,10 +601,11 @@ class gitlabModel extends model
* @param int $gitlabID
* @param string $orderBy
* @param string $minRole
* @param string $keyword
* @access public
* @return object
*/
public function apiGetGroups($gitlabID, $orderBy = 'id_desc', $minRole = '')
public function apiGetGroups($gitlabID, $orderBy = 'id_desc', $minRole = '', $keyword = '')
{
$apiRoot = $this->getApiRoot($gitlabID);
$url = sprintf($apiRoot, "/groups");
@@ -617,6 +618,8 @@ class gitlabModel extends model
$url .= '&min_access_level=' . $this->config->gitlab->accessLevel[$minRole];
}
if($keyword) $url .= '&search=' . urlencode($keyword);
$order = 'id';
$sort = 'desc';
if(strpos($orderBy, '_') !== false) list($order, $sort) = explode('_', $orderBy);
@@ -2854,4 +2857,43 @@ class gitlabModel extends model
$apiRoot .= '&sudo=' . $users[0]->id;
return $this->apiGet($apiRoot, '/user');
}
/**
* Get gitlab menu.
*
* @param int $gitlabID
* @param string $type
* @access public
* @return void
*/
public function getGitlabMenu($gitlabID = 0, $type = 'project')
{
$html = '<div class="btn-toolbar pull-left">';
/* Gitlab server list. */
$gitlabs = $this->getPairs();
$html .= "<div class='btn-group'>";
$tips = $gitlabID >0 ? zget($gitlabs, $gitlabID, $this->lang->gitlab->server) : $this->lang->gitlab->server;
$html .= html::a('javascript:;', $tips . " <span class='caret'></span>", '', "data-toggle='dropdown' class='btn btn-link'");
$html .= "<ul class='dropdown-menu'>";
foreach($gitlabs as $id => $gitlab)
{
$html .= '<li' . ($gitlabID == $id ? " class='active'" : '') . '>';
$html .= html::a(helper::createLink('gitlab', zget($this->config->gitlab->menus, $type, 'project'), "gitlabID=$id"), $gitlab);
}
$html .= '</ul></div>';
/* Other route. */
foreach($this->config->gitlab->menus as $key => $method)
{
$lang = 'browse' . ucwords($key);
$title = $this->lang->gitlab->$lang;
$label = "<span class='text'>$title</span>";
$active = $key == $type ? 'btn-active-text' : '';
$html .= html::a(inlink($method, "gitlabID=$gitlabID"), $label, '', "id='{$key}' class='btn btn-link $active' title='$title'");
}
$html .= '</div>';
return $html;
}
}
+6 -6
View File
@@ -12,6 +12,9 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('gitlab', 'browse'), "<span class='text'>{$lang->gitlab->server}</span>", '', "class='btn btn-link btn-active-text'");?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('gitlab', 'create')) common::printLink('gitlab', 'create', "", "<i class='icon icon-plus'></i> " . $lang->gitlab->create, '', "class='btn btn-primary'");?>
</div>
@@ -35,7 +38,7 @@
<th class='c-id text-center'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->id);?></th>
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->name);?></th>
<th class='text-left'><?php common::printOrderLink('url', $orderBy, $vars, $lang->gitlab->url);?></th>
<th class='c-actions-6'><?php echo $lang->actions;?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -43,8 +46,8 @@
<tr class='text' title='<?php if(!$gitlab->isAdminToken) echo $lang->gitlab->tokenLimit;?>'>
<td class='text-center'><?php echo $id;?></td>
<td class='text-c-name' title='<?php echo $gitlab->name;?>'>
<?php if(common::hasPriv('gitlab', 'view')):?>
<a class="iframe" href="<?php echo $this->createLink('gitlab', 'view', "id=$id", '', true); ?>"><?php echo $gitlab->name;?></a>
<?php if(common::hasPriv('gitlab', 'browseProject')):?>
<a href="<?php echo $this->createLink('gitlab', 'browseProject', "gitlabID=$id"); ?>"><?php echo $gitlab->name;?></a>
<?php else:?>
<?php echo $gitlab->name;?>
<?php endif;?>
@@ -54,10 +57,7 @@
<?php
$disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled';
$notBind = $gitlab->isBindUser ? '' : 'disabled';
common::printLink('gitlab', 'browseProject', "gitlabID=$id", "<i class='icon icon-list-box'></i> ", '',"title='{$lang->gitlab->browseProject}' class='btn {$notBind}'");
common::printLink('gitlab', 'browseGroup', "gitlabID=$id", "<i class='icon icon-groups'></i> ", '', "title='{$lang->gitlab->browseGroup}' class='btn {$notBind}'");
common::printLink('gitlab', 'edit', "gitlabID=$id", "<i class='icon icon-edit'></i> ", '',"title='{$lang->gitlab->edit}' class='btn btn-primary'");
common::printLink('gitlab', 'browseUser', "gitlabID=$id", "<i class='icon icon-person'></i> ", '', "title='{$lang->gitlab->browseUser}' class='btn {$disabled} {$notBind}' ,'disabled'");
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-link'></i> ", '', "title='{$lang->gitlab->bindUser}' class='btn {$disabled} {$notBind}' ,'disabled'");
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'delete', "gitlabID=$id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->delete}' class='btn'");
?>
+6 -2
View File
@@ -12,8 +12,12 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class='pull-left'>
<?php echo html::linkButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, $this->createLink('gitlab', 'browse'), 'self', '','btn btn-secondary');?>
<?php echo $this->gitlab->getGitlabMenu($gitlabID, 'group');?>
<div class="btn-toolbar pull-left">
<form id='gitlabForm' method='post'>
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="gitlabSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('gitlab', 'create')) common::printLink('gitlab', 'createGroup', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->group->create, '', "class='btn btn-primary'");?>
+5 -14
View File
@@ -14,19 +14,12 @@
<?php js::set('vars', "keyword=%s&orderBy=id_desc&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID=1")?>
<?php js::set('gitlabID', $gitlabID)?>
<div id="mainMenu" class="clearfix">
<div class='pull-left'>
<?php echo html::a($this->createLink('gitlab', 'browse'), "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-secondary'");?>
</div>
<div id="sidebarHeader">
<div class="title"><?php echo $this->lang->gitlab->common . ':' . $gitlab->name; ?></div>
</div>
<?php echo $this->gitlab->getGitlabMenu($gitlabID, 'project');?>
<div class="btn-toolbar pull-left">
<div>
<form id='gitlabprojectForm' method='post'>
<form id='gitlabForm' method='post'>
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="projectSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
</div>
<a id="gitlabSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('gitlab', 'createProject')) common::printLink('gitlab', 'createProject', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->project->create, '', "class='btn btn-primary'");?>
@@ -52,7 +45,7 @@
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->project->name);?></th>
<th class='text-left'></th>
<th class='text-left'><?php echo $lang->gitlab->lastUpdate;?></th>
<th class='c-actions-6'><?php echo $lang->actions;?></th>
<th class='c-actions-4'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -70,9 +63,7 @@
$maintainerClass = $gitlabProject->isMaintainer ? '' : 'disabled';
$ownerClass = $gitlabProject->adminer ? '' : 'disabled';
$emptyBranchClass = $gitlabProject->default_branch ? '' : 'disabled';
common::printLink('gitlab', 'browseBranch', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-treemap'></i> ", '', "title='{$lang->gitlab->browseBranch}' class='btn {$emptyBranchClass}'");
common::printLink('gitlab', 'browseBranchPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-branch-lock'></i> ", '', "title='{$lang->gitlab->branch->accessLevel}' class='btn {$maintainerClass} {$emptyBranchClass}'");
common::printLink('gitlab', 'browseTag', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-tag'></i> ", '', "title='{$lang->gitlab->browseTag}' class='btn {$emptyBranchClass}'");
common::printLink('gitlab', 'browseTagPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-tag-lock'></i> ", '', "title='{$lang->gitlab->browseTagPriv}' class='btn {$maintainerClass} {$emptyBranchClass}'");
common::printLink('gitlab', 'editProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-edit'></i> ", '', "title='{$lang->gitlab->project->edit}' class='btn {$ownerClass}'");
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'deleteProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteProject}' class='btn {$ownerClass}'");
+6 -2
View File
@@ -12,8 +12,12 @@
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class='pull-left'>
<?php echo html::linkButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, $this->createLink('gitlab', 'browse'), 'self', '','btn btn-secondary');?>
<?php echo $this->gitlab->getGitlabMenu($gitlabID, 'user');?>
<div class="btn-toolbar pull-left">
<form id='gitlabForm' method='post'>
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="gitlabSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('gitlab', 'createUser', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->user->create, '', "class='btn btn-primary'");?>
-2
View File
@@ -35,8 +35,6 @@ class jenkins extends control
*/
public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if(common::hasPriv('jenkins', 'create')) $this->lang->TRActions = html::a(helper::createLink('jenkins', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->jenkins->create, '', "class='btn btn-primary'");
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
+3 -4
View File
@@ -1762,7 +1762,6 @@ class kanbanModel extends model
->where('deleted')->eq(0)
->andWhere('id')->in($spaceIdList)
->beginIF(in_array($browseType, array('private', 'cooperation', 'public')))->andWhere('type')->eq($browseType)->fi()
->beginIF($browseType == 'involved')->andWhere('owner')->ne($account)->fi()
->beginIF($this->cookie->showClosed == 0 and $browseType != 'showClosed')->andWhere('status')->ne('closed')->fi()
->orderBy('id_desc')
->fetchPairs('id');
@@ -1808,10 +1807,11 @@ class kanbanModel extends model
$account = $this->app->user->account;
foreach($objects as $objectID => $object)
{
$remove = true;
if($objectType == 'kanbanspace' and $object->type == 'public' and $param != 'involved') continue;
if($object->owner == $account and $param != 'involved') $remove = false;
$remove = true;
if($object->owner == $account) $remove = false;
if(strpos(",{$object->team},", ",$account,") !== false) $remove = false;
if(strpos(",{$object->whitelist},", ",$account,") !== false) $remove = false;
@@ -1823,7 +1823,6 @@ class kanbanModel extends model
if($spaceType == 'public' and $param != 'involved') $remove = false;
}
if($objectType == 'kanbanspace' and $param == 'involved' and $object->owner == $account) $remove = true;
if($remove) unset($objects[$objectID]);
}
+1 -2
View File
@@ -35,13 +35,12 @@
</div>
<div id="mainContent">
<?php $dataModule = $app->rawMethod == 'work' ? 'workBug' : 'contributeBug';?>
<?php if(empty($bugs)):?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<?php if(empty($bugs)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span></p>
</div>
<?php else:?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $dataModule;?>></div>
<form id='myBugForm' class="main-table table-bug" data-ride="table" method="post" action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
<?php
$canBatchEdit = (common::hasPriv('bug', 'batchEdit') and $type == 'assignedTo');
+2 -1
View File
@@ -17,6 +17,7 @@ body {margin-bottom: 25px;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;}
.body-modal #mainMenu>.btn-toolbar {width: auto;}
.assignedTo{border-radius: 4px !important;}
</style>
<?php js::set('browseType', $browseType);?>
<?php js::set('productID', $productID);?>
@@ -550,7 +551,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<button data-toggle="dropdown" type="button" class="btn assignedTo"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<?php
$withSearch = count($users) > 10;
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
-1
View File
@@ -79,7 +79,6 @@ class repo extends control
public function maintain($objectID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->lang->switcherMenu = '';
if(common::hasPriv('repo', 'create')) $this->lang->TRActions = html::a(helper::createLink('repo', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->repo->create, '', "class='btn btn-primary'");
$repoID = $this->repo->saveState(0, $objectID);
if($this->viewType !== 'json') $this->commonAction($repoID, $objectID);
+9 -9
View File
@@ -3849,12 +3849,11 @@ class storyModel extends model
if(common::canBeChanged('story', $story))
{
$storyReviewer = isset($story->reviewer) ? $story->reviewer : array();
if($story->URChanged) return $this->buildMenu('story', 'processStoryChange', $params, $story, $type, 'search', '', 'iframe', true, '', $this->lang->confirm);
$isClick = $this->isClickable($story, 'change');
$title = (!$isClick and $story->status != 'closed') ? $this->lang->story->changeTip : '';
$menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from", $story, $type, 'alter', '', '', false, '', $title);
$menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from", $story, $type, 'alter', '', 'showinonlybody', false, '', $title);
$isClick = $this->isClickable($story, 'review');
$title = $this->lang->story->review;
@@ -3877,8 +3876,7 @@ class storyModel extends model
$title = $this->lang->story->reviewTip['recalled'];
}
}
$menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from", $story, $type, 'search', '', '', false, '', $title);
$menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from", $story, $type, 'search', '', 'showinonlybody', false, '', $title);
$title = $this->lang->story->recall;
$isClick = $this->isClickable($story, 'recall');
if(!$isClick and $story->status != 'closed')
@@ -3888,12 +3886,12 @@ class storyModel extends model
if(empty($story->reviewedBy) and strpos('draft,changed', $story->status) !== false and !empty($story->reviewer) and $this->app->user->account != $story->openedBy) $title = $this->lang->story->recallTip['notOpenedBy'];
if($story->status == 'active' and empty($story->reviewer)) $title = $this->lang->story->recallTip['actived'];
}
$menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', 'hiddenwin', '', '', '', $title);
$menu .= $this->buildMenu('story', 'recall', $params, $story, $type, 'undo', 'hiddenwin', 'showinonlybody', '', '', $title);
$menu .= $this->buildMenu('story', 'close', $params, $story, $type, '', '', 'iframe', true);
$menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type);
$menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type, '', '', 'showinonlybody');
$tab = $this->app->tab == 'project' ? 'project' : 'qa';
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$params", $story, $type, 'sitemap', '', '', false, "data-app='$tab'");
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='$tab'");
if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite')
{
@@ -3912,9 +3910,10 @@ class storyModel extends model
if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected'];
}
}
$menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', '', '', '', $title);
$menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', 'showinonlybody', '', '', $title);
}
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin');
if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody');
}
else
{
@@ -4350,6 +4349,7 @@ class storyModel extends model
}
elseif($tab == 'execution')
{
$showBranch = 0;
if($isShowBranch) $showBranch = isset($this->config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1;
}
else
+4 -1
View File
@@ -11,8 +11,11 @@ select[id^="story"] + .picker-single {width: 130px; max-width: 130px;}
.main-header .pull-left {max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
#zeroTaskStory {margin: 0 0 0 20px; height: 32px; padding: 5px 5px 5px 5px; border-radius: 3px; border: 2px solid transparent;}
[lang^='en'] #zeroTaskStory {max-width: 205px !important;}
[lang^='de'] #zeroTaskStory {max-width: 220px !important;}
[lang^='fr'] #zeroTaskStory {max-width: 265px !important;}
#zeroTaskStory > label:before {top: 7px; left: 5px;}
#zeroTaskStory > label:after {top: 5px; left: 5px;}
#zeroTaskStory > label:after {top: 7px; left: 5px;}
#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;}
.chosen-results > li.has-task,
+30 -1
View File
@@ -2,9 +2,38 @@
$(function()
{
removeDitto();
if($('th.c-name').width() < 200) $('th.c-name').width(200);
if($('th.c-name').width() < 165) $('th.c-name').width(165);
if(taskConsumed > 0) bootbox.alert(addChildTask);
$('#customField').on('click', function(){$('#tableBody .chosen-with-drop').removeClass('chosen-with-drop chosen-container-active')});
$('#customField').click(function()
{
hiddenRequireFields();
});
/* Implement a custom form without feeling refresh. */
$('#formSettingForm .btn-primary').click(function()
{
var fields = '';
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
{
fields += ',' + $(this).val();
});
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchCreateFields');
$.post(link, {'fields' : fields}, function()
{
checkedShowFields(fields);
$('#formSetting').parent().removeClass('open');
var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length;
$('.form-actions').attr('colspan', fieldCount);
if($('th.c-name').width() < 165) $('th.c-name').width(165);
});
return false;
});
});
$(document).on('change', "[name^='estStarted'], [name^='deadline']", function()
+61
View File
@@ -20,3 +20,64 @@ function setStoryModule()
}
}
/**
* Checked show fields.
*
* @param string fields
* @access public
* @return void
*/
function checkedShowFields(fields)
{
var fieldList = ',' + fields + ',';
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var $field = config.currentMethod == 'create' ? $('#' + $(this).val()) : $('[name^=' + $(this).val() + ']');
var $fieldBox = $('.' + $(this).val() + 'Box' );
if(fieldList.indexOf(field) >= 0)
{
$fieldBox.removeClass('hidden');
$field.removeAttr('disabled');
}
else if(!$fieldBox.hasClass('hidden'))
{
$fieldBox.addClass('hidden');
$field.attr('disabled', true);
}
});
if(config.currentMethod == 'create');
{
if(fieldList.indexOf(',estStarted,') >= 0 && fieldList.indexOf(',deadline,') >= 0)
{
$('.borderBox').removeClass('hidden');
}
else if(fieldList.indexOf(',estStarted,') >= 0 || fieldList.indexOf(',deadline,') >= 0)
{
$('.datePlanBox').removeClass('hidden');
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
}
else
{
if(!$('.borderBox').hasClass('hidden')) $('.borderBox').addClass('hidden');
if(!$('.datePlanBox').hasClass('hidden')) $('.datePlanBox').addClass('hidden');
}
}
}
/**
* Hidden require field.
*
* @access public
* @return void
*/
function hiddenRequireFields()
{
$('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function()
{
var field = ',' + $(this).val() + ',';
var required = ',' + requiredFields + ',';
if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden');
});
}
+27
View File
@@ -1,3 +1,30 @@
$(function()
{
$('#customField').click(function()
{
hiddenRequireFields();
});
/* Implement a custom form without feeling refresh. */
$('#formSettingForm .btn-primary').click(function()
{
var fields = '';
$('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function()
{
fields += ',' + $(this).val();
});
var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=createFields');
$.post(link, {'fields' : fields}, function()
{
checkedShowFields(fields);
$('#formSetting').parent().removeClass('open');
});
return false;
});
})
/**
* Load module, stories and members.
*
+9 -1
View File
@@ -8,5 +8,13 @@ $(function()
totalConsumed = Math.round(totalConsumed * 1000) / 1000;
$('#totalConsumed').html(totalConsumed);
$('#consumed').val(totalConsumed);
})
})
$('#submit').click(function()
{
if(task.consumed != 0 && $('#currentConsumed').val() == 0)
{
return confirm(consumedEmpty);
}
})
})
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Aufgabe: %s ist nicht “Erledigt” od
$lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.';
$lang->task->error->consumed = 'Aufgabe: %s Hour must be more than 0. Ignore changes to this Task.';
$lang->task->error->assignedTo = 'Mehere Tasks können nicht zugewisen werden, da die Benutzer nicht teil des Teams sind.';
$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.';
$lang->task->error->consumedEmpty = 'Cannot finish the task with 0 "Total Cost", please enter "Current Cost".';
$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.';
$lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".';
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
$lang->task->error->realStartedEmpty = '"Real Started" should not be empty.';
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Task: %s is not “Finished” or “Ca
$lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.';
$lang->task->error->consumed = 'Task: %s hour must be < 0. Ignore changes to this task.';
$lang->task->error->assignedTo = 'Multi-user task in the current status cannot be assigned to a member who is not in the task team.';
$lang->task->error->consumedEmpty = '"Current Cost" should not be 0.';
$lang->task->error->consumedEmpty = 'Cannot finish the task with 0 "Total Cost", please enter "Current Cost".';
$lang->task->error->consumedEmptyAB = '"Current Cost" is 0, please confirm whether you submit.';
$lang->task->error->deadlineSmall = '"Deadline" must be greater than "StartDate".';
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
$lang->task->error->realStartedEmpty = '"Real Started" should not be empty.';
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = 'Tâche: %s non “Finie” ou “Annul
$lang->task->error->closeParent = 'Task: %s is the Parent Task, which is automatically closed after all subtasks under the Parent Task are closed and cannot be closed manually.';
$lang->task->error->consumed = 'Tâche: %s heures doivent être < 0. Ignorer changements de cette tâche.';
$lang->task->error->assignedTo = "Tâche Multi-user dans le statut courant ne peut pas être assignée à un membre qui ne fait pas partie de l'équipe.";
$lang->task->error->consumedEmpty = '"Coût Actuel" ne devrait pas être 0.';
$lang->task->error->consumedEmpty = 'Lorsque la "Coût Total" est de 0, la tâche ne peut pas être terminée. Veuillez d\'abord remplir "Coût Actuel".';
$lang->task->error->consumedEmptyAB = '"Coût Actuel" est de 0, veuillez confirmer si vous souhaitez continuer à soumettre.';
$lang->task->error->deadlineSmall = '"Date Limite" doit être supérieur à la "Date de Départ".';
$lang->task->error->alreadyStarted = 'You cannot start this task, because it is started.';
$lang->task->error->realStartedEmpty = '"Real Started" should not be empty.';
+2 -1
View File
@@ -252,7 +252,8 @@ $lang->task->error->skipClose = '任务:%s 不是“已完成”或“
$lang->task->error->closeParent = '任务:%s 是父任务,父任务在所有子任务关闭后会自动关闭,无法手动关闭。';
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
$lang->task->error->consumedEmpty = '"本次消耗"不能为0';
$lang->task->error->consumedEmpty = '总计消耗为0时不能完成任务,请填写本次消耗工时';
$lang->task->error->consumedEmptyAB = '"本次消耗"为0,请确认是否提交。';
$lang->task->error->deadlineSmall = '"截止日期"必须大于"预计开始"';
$lang->task->error->alreadyStarted = '此任务已被启动,不能重复启动!';
$lang->task->error->realStartedEmpty = '实际开始不能为空';
+5 -2
View File
@@ -1879,7 +1879,7 @@ class taskModel extends model
return false;
}
if(empty($currentConsumed))
if(empty($currentConsumed) and $oldTask->consumed == '0')
{
dao::$errors[] = $this->lang->task->error->consumedEmpty;
return false;
@@ -3408,7 +3408,7 @@ class taskModel extends model
if($id == 'status') $class .= ' task-' . $task->status;
if($id == 'id') $class .= ' cell-id';
if($id == 'name') $class .= ' text-left';
if($id == 'deadline') $class .= ' text-center';
if($id == 'deadline') $class .= ' text-left';
if($id == 'deadline' and isset($task->delay)) $class .= ' delayed';
if($id == 'assignedTo') $class .= ' has-btn text-left';
if($id == 'lane') $class .= ' text-left';
@@ -3427,6 +3427,9 @@ class taskModel extends model
$title = " title='{$value} {$this->lang->execution->workHour}'";
}
if($id == 'lane') $title = " title='{$task->lane}'";
if($id == 'finishedBy') $title = " title='" . zget($users, $task->finishedBy) . "'";
if($id == 'openedBy') $title = " title='" . zget($users, $task->openedBy) . "'";
if($id == 'lastEditedBy') $title = " title='" . zget($users, $task->lastEditedBy) . "'";
echo "<td class='" . $class . "'" . $title . ">";
if($this->config->edition != 'open') $this->loadModel('flow')->printFlowCell('task', $task, $id);
+45 -42
View File
@@ -15,6 +15,26 @@
<?php js::set('taskConsumed', $taskConsumed);?>
<?php js::set('addChildTask', $lang->task->addChildTask);?>
<?php js::set('isonlybody', isonlybody())?>
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
$colspan = count($visibleFields) + 3;
?>
<?php js::set('showFields', $showFields);?>
<div id="mainContent" class="main-content fade">
<div class="main-header clearfix">
<h2 class="pull-left">
@@ -40,32 +60,15 @@
<?php endif;?>
</div>
</div>
<?php
$visibleFields = array();
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field)
{
$requiredFields[$field] = '';
if(strpos(",{$config->task->customBatchCreateFields},", ",{$field},") !== false) $visibleFields[$field] = '';
}
}
$colspan = count($visibleFields) + 3;
?>
<form method='post' class='batch-actions-form' target='hiddenwin' enctype='multipart/form-data' id="batchCreateForm">
<div class="table-responsive">
<table class="table table-form" id="tableBody">
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?>'><?php echo $lang->task->module?></th>
<th class='c-module<?php echo zget($visibleFields, 'module', ' hidden') . zget($requiredFields, 'module', '', ' required');?> moduleBox'><?php echo $lang->task->module?></th>
<?php if($execution->type != 'ops'):?>
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?>'><?php echo $lang->task->story;?></th>
<th class='c-story<?php echo zget($visibleFields, 'story', ' hidden') . zget($requiredFields, 'story', '', ' required');?> storyBox'><?php echo $lang->task->story;?></th>
<?php endif;?>
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
<?php if($execution->type == 'kanban'):?>
@@ -73,12 +76,12 @@
<th class='c-module'><?php echo $lang->kanbancard->lane;?></th>
<?php endif;?>
<th class='c-type required'><?php echo $lang->typeAB;?></span></th>
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
<th class='c-assigned<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?> assignedToBox'><?php echo $lang->task->assignedTo;?></th>
<th class='c-estimate<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?> estimateBox'><?php echo $lang->task->estimateAB;?></th>
<th class='c-date<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?> estStartedBox'><?php echo $lang->task->estStarted;?></th>
<th class='c-date<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?> deadlineBox'><?php echo $lang->task->deadline;?></th>
<th class='c-desc<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?> descBox'><?php echo $lang->task->desc;?></th>
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?> priBox'><?php echo $lang->task->pri;?></th>
<?php
$extendFields = $this->task->getFlowExtendFields();
foreach($extendFields as $extendField)
@@ -112,13 +115,13 @@
?>
<?php $pri = 3;?>
<tr>
<td class='text-center'><?php echo $i;?></td>
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
<td class='text-left'><?php echo $i;?></td>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[$i]", $modules, $moduleID, "class='form-control chosen'")?>
<?php echo html::hidden("parent[$i]", $parent);?>
</td>
<?php if($execution->type != 'ops'):?>
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
<span class='input-group-btn'>
@@ -146,9 +149,9 @@
<td><?php echo html::select("lanes[$i]", $lanePairs, $laneID, "class='form-control chosen'");?></td>
<?php endif;?>
<td><?php echo html::select("type[$i]", $lang->task->typeList, $type, 'class=form-control');?></td>
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[$i]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
@@ -156,7 +159,7 @@
?>
</div>
</td>
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[$i]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
@@ -164,8 +167,8 @@
?>
</div>
</td>
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
@@ -189,11 +192,11 @@
<tbody>
<tr>
<td class='text-center'>%s</td>
<td <?php echo zget($visibleFields, 'module', "class='hidden'")?> style='overflow:visible'>
<td class="<?php echo zget($visibleFields, 'module', 'hidden')?> moduleBox" style='overflow:visible'>
<?php echo html::select("module[%s]", $modules, $moduleID, "class='form-control chosen' onchange='setStories(this.value, $execution->id, \"%s\")'")?>
<?php echo html::hidden("parent[%s]", $parent);?>
</td>
<td <?php echo zget($visibleFields, 'story', "class='hidden'");?> style='overflow: visible'>
<td class="<?php echo zget($visibleFields, 'story', 'hidden');?> storyBox" style='overflow: visible'>
<div class='input-group'>
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated(\"%s\")'");?>
<span class='input-group-btn'>
@@ -216,9 +219,9 @@
</div>
</td>
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class="form-control"');?></td>
<td <?php echo zget($visibleFields, 'assignedTo', "class='hidden'")?> style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'estimate', "class='hidden'")?>><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
<td <?php echo zget($visibleFields, 'estStarted', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'assignedTo', 'hidden')?> assignedToBox" style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control chosen'");?></td>
<td class="<?php echo zget($visibleFields, 'estimate', 'hidden')?> estimateBox"><?php echo html::input("estimate[%s]", '', "class='form-control text-center'");?></td>
<td class="<?php echo zget($visibleFields, 'estStarted', 'hidden')?> estStartedBox">
<div class='input-group'>
<?php
echo html::input("estStarted[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
@@ -226,15 +229,15 @@
?>
</div>
</td>
<td <?php echo zget($visibleFields, 'deadline', "class='hidden'")?>>
<td class="<?php echo zget($visibleFields, 'deadline', 'hidden')?> deadlineBox">
<div class='input-group'>
<?php
echo html::input("deadline[%s]", '', "class='form-control text-center form-date' onkeyup='toggleCheck(this)'");
echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[%s]' id='deadlineDitto%s' checked/>{$lang->task->ditto}</span>";
?>
</div>
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<td class="<?php echo zget($visibleFields, 'desc', 'hidden')?> descBox"><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
<td class="<?php echo zget($visibleFields, 'pri', 'hidden')?> priBox"><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
+26 -34
View File
@@ -17,9 +17,17 @@
<?php js::set('blockID', $blockID);?>
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
<?php js::set('vision', $config->vision);?>
<?php js::set('requiredFields', $config->task->create->requiredFields);?>
<?php if(!empty($storyID)):?>
<style> .title-group.required > .required:after {right: 110px;}</style>
<?php endif;?>
<?php
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
}
?>
<?php js::set('showFields', $showFields);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -29,12 +37,6 @@
<?php include '../../common/view/customfield.html.php';?>
</div>
</div>
<?php
foreach(explode(',', $config->task->create->requiredFields) as $field)
{
if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field;
}
?>
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<?php if($execution->type != 'kanban' or $this->config->vision == 'lite'):?>
@@ -97,8 +99,8 @@
<td><?php echo html::hidden('status', 'wait');?></td>
</tr>
<?php $this->printExtendFields('', 'table', 'columns=3');?>
<?php if(strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops'):?>
<tr>
<?php $hiddenStory = (strpos(",$showFields,", ',story,') !== false and $execution->lifetime != 'ops') ? '' : 'hidden'?>
<tr class="<?php echo $hiddenStory?> storyBox">
<th><?php echo $lang->task->story;?></th>
<td colspan='3'>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
@@ -110,7 +112,6 @@
</div>
</td>
</tr>
<?php endif;?>
<?php if($execution->type != 'ops'):?>
<tr id='testStoryBox' class='hidden'>
<th><?php echo $lang->task->selectTestStory;?></th>
@@ -174,8 +175,8 @@
<a href='javascript:copyStoryTitle();' id='copyButton' class='input-control-icon-right'><?php echo $lang->task->copyStoryTitle;?></a>
<?php echo html::hidden("storyEstimate") . html::hidden("storyDesc") . html::hidden("storyPri");?>
</div>
<?php if(strpos(",$showFields,", ',pri,') !== false): // begin print pri selector?>
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->pri;?></span>
<?php $hiddenPri = strpos(",$showFields,", ',pri,') !== false ? '' : 'hidden'; // begin print pri selector?>
<span class="input-group-addon fix-border br-0 <?php echo $hiddenPri;?> priBox"><?php echo $lang->task->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->task->priList as $priKey => $priValue)
@@ -195,9 +196,9 @@
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control'");?>
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control $hiddenPri'");?>
<?php else: ?>
<div class="input-group-btn pri-selector" data-type="pri">
<div class="input-group-btn pri-selector <?php echo $hiddenPri;?> priBox" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($task->pri) ? '0' : $task->pri?>" title="<?php echo $task->pri?>"><?php echo $task->pri?></span></span> &nbsp;<span class="caret"></span>
</button>
@@ -206,15 +207,13 @@
</div>
</div>
<?php endif; ?>
<?php endif; // end print pri selector ?>
<?php if(strpos(",$showFields,", ',estimate,') !== false):?>
<div class='table-col w-120px'>
<?php $hiddenEstimate = strpos(",$showFields,", ',estimate,') !== false ? '' : 'hidden';?>
<div class="table-col w-120px <?php echo $hiddenEstimate;?> estimateBox">
<div class="input-group">
<span class="input-group-addon fix-border br-0"><?php echo $lang->task->estimateAB;?></span>
<input type="text" name="estimate" id="estimate" value="<?php echo $task->estimate;?>" class="form-control" autocomplete="off">
</div>
</div>
<?php endif;?>
</div>
</div>
</td>
@@ -231,29 +230,23 @@
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<?php
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false;
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false;
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false ? 'hidden' : '';
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false ? 'hidden' : '';
$hiddenDatePlan = (!$hiddenEstStarted or !$hiddenDeadline) ? '' : 'hidden';
?>
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
<tr>
<tr class="<?php echo $hiddenDatePlan?> datePlanBox">
<th><?php echo $lang->task->datePlan;?></th>
<td colspan='2'>
<div class='input-group'>
<?php if(!$hiddenEstStarted):?>
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
<?php endif;?>
<?php if(!$hiddenEstStarted and !$hiddenDeadline):?>
<span class='input-group-addon fix-border'>~</span>
<?php endif;?>
<?php if(!$hiddenDeadline):?>
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");?>
<?php endif;?>
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date $hiddenEstStarted estStartedBox' placeholder='{$lang->task->estStarted}'");?>
<?php $hiddenborder = (!$hiddenEstStarted and !$hiddenDeadline) ? '' : 'hidden';?>
<span class="input-group-addon fix-border <?php echo $hiddenborder?> borderBox">~</span>
<?php echo html::input('deadline', $task->deadline, "class='form-control form-date $hiddenDeadline deadlineBox' placeholder='{$lang->task->deadline}'");?>
</div>
</td>
</tr>
<?php endif;?>
<?php if(strpos(",$showFields,", ',mailto,') !== false):?>
<tr>
<?php $hiddenMailto = strpos(",$showFields,", ',mailto,') !== false ? '' : 'hidden';?>
<tr class="<?php echo $hiddenMailto?> mailtoBox">
<th><?php echo $lang->story->mailto;?></th>
<td colspan='3'>
<div class="input-group">
@@ -262,7 +255,6 @@
</div>
</td>
</tr>
<?php endif;?>
<?php if(!isonlybody()):?>
<tr id='after-tr'>
<th><?php echo $lang->task->afterSubmit;?></th>
+3 -1
View File
@@ -13,6 +13,8 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('task', $task);?>
<?php js::set('consumedEmpty', $lang->task->error->consumedEmptyAB);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<?php if(!empty($task->team) and (!isset($task->team[$app->user->account]) or ($task->assignedTo != $app->user->account and $task->mode == 'linear'))):?>
@@ -59,7 +61,7 @@
<th><?php echo empty($task->team) ? $lang->task->consumed : $lang->task->myConsumed;?></th>
<td>
<?php $consumed = empty($task->team) ? $task->consumed : (float)$task->myConsumed;?>
<?php
<?php
echo "<span id='totalConsumed'>" . (float)$consumed . "</span> " . $lang->workingHour . html::hidden('consumed', $consumed);
js::set('consumed', $consumed);
?>
+8
View File
@@ -0,0 +1,8 @@
$(function()
{
$('#submit').click(function()
{
$(this).addClass('disabled');
$('#upgradingTips').removeClass('hidden');
});
});
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = 'Von Version';
$lang->upgrade->toVersion = 'Upgrade nach Version';
$lang->upgrade->confirm = 'SQL Bestätigen';
$lang->upgrade->sureExecute = 'Ausführen';
$lang->upgrade->upgradingTips = 'The upgrade is in progress, please be patient. Do not refresh the page, blackout, or turn off your computer!';
$lang->upgrade->forbiddenExt = 'Die Erweiterung ist nicht kompatibel mit der Upgradeversion. Sie wurde deaktiviert:';
$lang->upgrade->updateFile = 'Updateinformation wurden hinzugefügt.';
$lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = 'From';
$lang->upgrade->toVersion = 'To';
$lang->upgrade->confirm = 'Confirm SQL';
$lang->upgrade->sureExecute = 'Execute';
$lang->upgrade->upgradingTips = 'The upgrade is in progress, please be patient. Do not refresh the page, blackout, or turn off your computer!';
$lang->upgrade->forbiddenExt = 'The extension is incompatible with the version. It has been deactivated:';
$lang->upgrade->updateFile = 'File information has to be updated.';
$lang->upgrade->noticeSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = 'De';
$lang->upgrade->toVersion = 'à';
$lang->upgrade->confirm = 'Confirmez SQL';
$lang->upgrade->sureExecute = 'Executez';
$lang->upgrade->upgradingTips = 'La mise à jour est en cours, veuillez être patient. Ne pas actualiser la page ou éteindre votre ordinateur!';
$lang->upgrade->forbiddenExt = 'Cette extension est incompatible avec la version. Elle a été désactivée :';
$lang->upgrade->updateFile = "Le fichier information a besoin d'une mise à jour.";
$lang->upgrade->noticeSQL = 'Votre base de donnée est inconsistente avec le standard et il y a eu un échec pour la corriger. Exécutez la commande SQL suivante et rafraichissez.';
+1
View File
@@ -48,6 +48,7 @@ $lang->upgrade->fromVersion = '原来的版本';
$lang->upgrade->toVersion = '升级到';
$lang->upgrade->confirm = '确认要执行的SQL语句';
$lang->upgrade->sureExecute = '确认执行';
$lang->upgrade->upgradingTips = '正在升级中,请耐心等待,切勿刷新页面、断电、关机!';
$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:';
$lang->upgrade->updateFile = '需要更新附件信息。';
$lang->upgrade->noticeSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请执行以下SQL语句,再刷新页面检查。';
+4 -1
View File
@@ -19,7 +19,10 @@
<div class='modal-body'>
<textarea rows='20' class='form-control' readonly='readonly'><?php echo $confirm;?></textarea>
</div>
<div class='modal-footer'><?php echo html::submitButton($lang->upgrade->sureExecute) . html::hidden('fromVersion', $fromVersion);?></div>
<div class='modal-footer'>
<?php echo html::submitButton($lang->upgrade->sureExecute) . html::hidden('fromVersion', $fromVersion);?>
<p style='margin-top:10px;' class='text-danger hidden' id='upgradingTips'><?php echo $lang->upgrade->upgradingTips;?></p>
</div>
</div>
</form>
</div>
+1 -1
View File
@@ -969,7 +969,7 @@ class user extends control
}
else
{
$loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == '/' or $this->referer == '/zentao/' or empty($this->referer));
$loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == $this->config->webRoot or empty($this->referer));
$this->loadModel('misc');
$this->loadModel('extension');