This commit is contained in:
王怡栋
2021-12-03 09:26:27 +08:00
18 changed files with 44 additions and 35 deletions
+4 -2
View File
@@ -848,7 +848,9 @@ class commonModel extends model
if(!isset($linkPart[2])) continue;
$method = $linkPart[2];
if($currentModule == 'report' and $method == 'annualData') continue; // Skip some pages that do not require permissions.
/* Skip some pages that do not require permissions.*/
if($currentModule == 'report' and $method == 'annualData') continue;
if($currentModule == 'my' and $currentMethod == 'team') continue;
if(common::hasPriv($currentModule, $method))
{
@@ -2161,7 +2163,7 @@ EOD;
$menu = isset($lang->navGroup->$module) ? $lang->navGroup->$module : $module;
$menu = strtolower($menu);
if($menu != 'qa' and !isset($lang->$menu->menu)) return true;
if($menu == 'my' or $menu == 'index' or $module == 'tree') return true;
if(($menu == 'my' && $method != 'team')or $menu == 'index' or $module == 'tree') return true;
if($module == 'company' and $method == 'dynamic') return true;
if($module == 'action' and $method == 'editcomment') return true;
if($module == 'action' and $method == 'comment') return true;
+1 -1
View File
@@ -22,7 +22,7 @@
#kanbanList .kanban-card {display: grid;}
#kanbanList .kanban-card > .title {white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
#kanbanList .kanban-card.has-progress {padding-right: 40px; position: relative;}
#kanbanList .kanban-card.has-progress > .progress-pie {position: absolute; right: 7px; top: 7px}
#kanbanList .kanban-card.has-progress > .progress-pie {position: absolute; right: 7px; top: 7px; width: 24px; height: 24px;}
#kanbanList .kanban-card.has-left-border {border-left: 2px solid #838a9d;}
#kanbanList .kanban-card.has-left-border.border-left-green {border-left-color: #0bd986;}
#kanbanList .kanban-card.has-left-border.border-left-red {border-left-color: #ff5d5d;}
+1
View File
@@ -5,3 +5,4 @@
#kanbanList .kanban-col[data-type="project"] .kanban-lane-items {height: 100%; display: flex; flex-direction: column; justify-content: center;}
#kanbanList .kanban-lane-name > .text {display: none;}
#kanbanList .kanban-item.link-block > a {cursor: move;}
#kanbanList .kanban-lane + .kanban-lane {margin-top: 2px!important;}
+1 -1
View File
@@ -32,7 +32,7 @@
#kanbanContainer {margin: 0;}
#kanbanContainer > .panel-body {overflow: auto;}
#kanbans .kanban {min-height: initial;}
#kanbans .kanban-lane {min-height: 150px;}
#kanbans .kanban-lane {min-height: 150px; margin-top: 2px;}
#kanbans .kanban-affixed > .kanban-header {top: 100px;}
#kanbans .kanban-card[data-scale-size="4"] {padding: 8px;}
#kanbans .kanban-card[data-scale-size="3"] {padding: 3px 4px;}
+2 -2
View File
@@ -159,13 +159,13 @@ $(function()
{
data: processKanbanData(),
laneNameWidth: 5,
virtualize: true,
droppable:
{
selector: '.kanban-item:not(.kanban-item-span)',
target: findDropColumns,
finish: handleFinishDrop,
mouseButton: 'left'
},
virtualize: true
}
});
});
+1 -1
View File
@@ -880,7 +880,7 @@ $(function()
var menuCreator = window.menuCreators[menuType];
if(!menuCreator) return;
var options = $.extend({event, $trigger: $trigger}, $trigger.data());
var options = $.extend({event: event, $trigger: $trigger}, $trigger.data());
var items = menuCreator(options);
if(!items || !items.length) return;
@@ -15,6 +15,8 @@
<th><?php echo $lang->gitlab->group->memberAccessLevel;?></th>
<th class='c-date'><?php echo $lang->gitlab->group->memberExpiresAt;?></th>
<th class="c-actions"><?php echo $lang->actions;?></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
-1
View File
@@ -81,7 +81,6 @@ $lang->mr->sourceBranch = 'Source branch';
$lang->mr->targetProject = 'Target project';
$lang->mr->targetBranch = 'Target branch';
$lang->mr->usersTips = 'Tip: If you cannot choose the assignee, please go to the GitLab page to bind the user first.';
$lang->mr->notFound = "Merge Request does not exist!";
$lang->mr->toCreatedMessage = "The merge request you submitted:<a href='%s'>%s</a>, the build task succeeded.";
$lang->mr->toReviewerMessage = "You have one merge request <a href='%s'>%s</a> waiting.";
+2 -3
View File
@@ -63,8 +63,8 @@ $lang->mr->approvalStatusList['approved'] = '已通过';
$lang->mr->approvalStatusList['rejected'] = '已拒绝';
$lang->mr->notApproved = '审核拒绝的';
$lang->mr->assignedToMe = '指派给我的';
$lang->mr->createdByMe = '我创建的';
$lang->mr->assignedToMe = '指派给我';
$lang->mr->createdByMe = '由我创建';
$lang->mr->statusList = array();
$lang->mr->statusList['all'] = '所有';
@@ -86,7 +86,6 @@ $lang->mr->targetBranch = '目标分支';
$lang->mr->noCompileJob = '没有构建任务';
$lang->mr->compileUnexecuted = '还未执行';
$lang->mr->usersTips = '提示:如果无法选择指派人,请先前往GitLab页面绑定用户。';
$lang->mr->notFound = "此{$lang->mr->common}不存在。";
$lang->mr->toCreatedMessage = "您提交的合并请求:<a href='%s'>%s</a> 构建任务执行通过。";
$lang->mr->toReviewerMessage = "有一个合并请求:<a href='%s'>%s</a> 待审核。";
+1 -2
View File
@@ -68,8 +68,7 @@ $lang->mr->sourceBranch = '源分支';
$lang->mr->targetProject = '目標項目';
$lang->mr->targetBranch = '目標分支';
$lang->mr->usersTips = '提示:如果無法選擇指派人,請先前往GitLab頁面綁定用戶。';
$lang->mr->notFound = "此{$lang->mr->common}不存在。";
$lang->mr->notFound = "此{$lang->mr->common}不存在。";
$lang->mr->apiError = new stdclass;
$lang->mr->apiError->createMR = "通過API創建合併請求失敗,失敗原因:%s";
-4
View File
@@ -72,10 +72,6 @@
<th><?php echo $lang->mr->assignee;?></th>
<td><?php echo html::select('assignee', $users, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th></th>
<td><?php echo $lang->mr->usersTips;?></td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton();?>
-4
View File
@@ -87,10 +87,6 @@
<th><?php echo $lang->mr->assignee;?></th>
<td><?php echo html::select('assignee', $users, $assignee, "class='form-control chosen'");?></td>
</tr>
<tr>
<th></th>
<td><?php echo $lang->mr->usersTips;?></td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton();?>
+1 -1
View File
@@ -1027,7 +1027,7 @@ class productModel extends model
->orWhere('t2.PM')->eq($this->app->user->account)
->markRight(1)
->fi()
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
->beginIF($branch !== '' and $branch !== 'all')->andWhere('t1.branch')->in($branch)->fi()
->andWhere('t2.deleted')->eq('0')
->orderBy($orderBy)
->fetchAll('id');
+13 -1
View File
@@ -115,6 +115,13 @@ function processKanbanData(key, programsData)
return {id: kanbanId, columns: columns, lanes: lanes};
}
/** Calculate column height */
function calcColHeight(col, lane, colCards, colHeight)
{
if (col.type !== 'doingProject') return colHeight;
return colCards.length * 62;
}
$(function()
{
/* Init all kanbans */
@@ -122,6 +129,11 @@ $(function()
{
var $kanban = $('#kanban-' + key);
if(!$kanban.length) return;
$kanban.kanban({data: processKanbanData(key, programsData), virtualize: true});
$kanban.kanban(
{
data: processKanbanData(key, programsData),
virtualize: true,
calcColHeight: calcColHeight
});
});
});
+6 -3
View File
@@ -45,10 +45,13 @@ function loadProduct(productID)
*/
function loadBranch()
{
var branch = $('#branch').val();
var branch = $('#branch').val();
var productID = $('#product').val();
if(typeof(branch) == 'undefined') branch = 0;
loadProductModules($('#product').val(), branch);
loadProductPlans($('#product').val(), branch);
if(typeof(productID) == 'undefined' && config.currentMethod == 'edit') productID = oldProductID;
loadProductModules(productID, branch);
loadProductPlans(productID, branch);
}
/**
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long