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:
authorDouwe Maan <douwe@selenight.nl>2017-07-31 11:23:50 +0300
committerDouwe Maan <douwe@selenight.nl>2017-07-31 11:23:50 +0300
commit95f9d6d83bcb7a9f45601f828c34301e536fc195 (patch)
treeed5447c85eb35ac9b7a363dd5a83514578c2fb3e /app/helpers/issuables_helper.rb
parentc92881c394a482bdb6d3f0f0a5f3cc95d5eed1fc (diff)
parent6fe736f2c927340ed8cf827080db781f7c8adcdf (diff)
Merge branch 'master' into issue-discussions-refactor
# Conflicts: # app/controllers/concerns/notes_actions.rb # spec/features/task_lists_spec.rb # spec/support/features/issuable_slash_commands_shared_examples.rb
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r--app/helpers/issuables_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 5f1f5918f06..dc6fd31e271 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -354,4 +354,14 @@ module IssuablesHelper
params[:format] = :json if issuable.is_a?(Issue)
end
end
+
+ def issuable_sidebar_options(issuable, can_edit_issuable)
+ {
+ endpoint: "#{issuable_json_path(issuable)}?basic=true",
+ editable: can_edit_issuable,
+ currentUser: current_user.as_json(only: [:username, :id, :name], methods: :avatar_url),
+ rootPath: root_path,
+ fullPath: @project.full_path
+ }
+ end
end