diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/helpers/boards_helper.rb | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/helpers/boards_helper.rb')
-rw-r--r-- | app/helpers/boards_helper.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb index 6a4a7a8dfb2..c827fb4dd95 100644 --- a/app/helpers/boards_helper.rb +++ b/app/helpers/boards_helper.rb @@ -14,10 +14,14 @@ module BoardsHelper root_path: root_path, full_path: full_path, bulk_update_path: @bulk_issues_path, + can_update: (!!can?(current_user, :admin_issue, board)).to_s, time_tracking_limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s, recent_boards_endpoint: recent_boards_path, parent: current_board_parent.model_name.param_key, - group_id: @group&.id + group_id: @group&.id, + labels_filter_base_path: build_issue_link_base, + labels_fetch_path: labels_fetch_path, + labels_manage_path: labels_manage_path } end @@ -37,6 +41,22 @@ module BoardsHelper end end + def labels_fetch_path + if board.group_board? + group_labels_path(@group, format: :json, only_group_labels: true, include_ancestor_groups: true) + else + project_labels_path(@project, format: :json, include_ancestor_groups: true) + end + end + + def labels_manage_path + if board.group_board? + group_labels_path(@group) + else + project_labels_path(@project) + end + end + def board_base_url if board.group_board? group_boards_url(@group) |