Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-06 06:09:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-06 06:09:19 +0300
commit74d35955aa0e12ff6ed99b39adb38e0f13fb96aa (patch)
tree3eb7d2dd94cfb1487c0649ef976d375e5e57c7cf /app/helpers/issuables_helper.rb
parentc93374099a04d318af464f5b3a54a8aafdbca81f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 577d8d5cb2a..a0125ff79de 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -492,6 +492,21 @@ module IssuablesHelper
}
end
+ def sidebar_labels_data(issuable_sidebar, project)
+ {
+ allow_label_create: issuable_sidebar.dig(:current_user, :can_admin_label).to_s,
+ allow_scoped_labels: issuable_sidebar[:scoped_labels_available].to_s,
+ can_edit: issuable_sidebar.dig(:current_user, :can_edit).to_s,
+ iid: issuable_sidebar[:iid],
+ issuable_type: issuable_sidebar[:type],
+ labels_fetch_path: issuable_sidebar[:project_labels_path],
+ labels_manage_path: project_labels_path(project),
+ project_issues_path: issuable_sidebar[:project_issuables_path],
+ project_path: project.full_path,
+ selected_labels: issuable_sidebar[:labels].to_json
+ }
+ end
+
def parent
@project || @group
end