summaryrefslogtreecommitdiff
path: root/app/helpers/boards_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/boards_helper.rb')
-rw-r--r--app/helpers/boards_helper.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb
index 28cd61e10d9..f849f36bf84 100644
--- a/app/helpers/boards_helper.rb
+++ b/app/helpers/boards_helper.rb
@@ -16,6 +16,7 @@ module BoardsHelper
bulk_update_path: @bulk_issues_path,
can_update: can_update?.to_s,
can_admin_list: can_admin_list?.to_s,
+ can_admin_board: can_admin_board?.to_s,
time_tracking_limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s,
parent: current_board_parent.model_name.param_key,
group_id: group_id,
@@ -23,7 +24,11 @@ module BoardsHelper
labels_fetch_path: labels_fetch_path,
labels_manage_path: labels_manage_path,
releases_fetch_path: releases_fetch_path,
- board_type: board.to_type
+ board_type: board.to_type,
+ has_scope: board.scoped?.to_s,
+ has_missing_boards: has_missing_boards?.to_s,
+ multiple_boards_available: multiple_boards_available?.to_s,
+ board_base_url: board_base_url
}
end
@@ -85,6 +90,11 @@ module BoardsHelper
current_board_parent.multiple_issue_boards_available?
end
+ # Boards are hidden when extra boards were created but the license does not allow multiple boards
+ def has_missing_boards?
+ !multiple_boards_available? && current_board_parent.boards.size > 1
+ end
+
def current_board_path(board)
@current_board_path ||= if board.group_board?
group_board_path(current_board_parent, board)
@@ -109,22 +119,12 @@ module BoardsHelper
can?(current_user, :admin_issue_board_list, current_board_parent)
end
- def can_admin_issue?
- can?(current_user, :admin_issue, current_board_parent)
+ def can_admin_board?
+ can?(current_user, :admin_issue_board, current_board_parent)
end
- def board_list_data
- include_descendant_groups = @group&.present?
-
- {
- toggle: "dropdown",
- list_labels_path: labels_filter_path_with_defaults(only_group_labels: true, include_ancestor_groups: true),
- labels: labels_filter_path_with_defaults(only_group_labels: true, include_descendant_groups: include_descendant_groups),
- labels_endpoint: @labels_endpoint,
- namespace_path: @namespace_path,
- project_path: @project&.path,
- group_path: @group&.path
- }
+ def can_admin_issue?
+ can?(current_user, :admin_issue, current_board_parent)
end
def serializer