diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-07-31 11:23:50 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-31 11:23:50 +0300 |
commit | 95f9d6d83bcb7a9f45601f828c34301e536fc195 (patch) | |
tree | ed5447c85eb35ac9b7a363dd5a83514578c2fb3e /app/helpers/issuables_helper.rb | |
parent | c92881c394a482bdb6d3f0f0a5f3cc95d5eed1fc (diff) | |
parent | 6fe736f2c927340ed8cf827080db781f7c8adcdf (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.rb | 10 |
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 |