diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-25 18:46:15 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-25 18:46:15 +0300 |
commit | 887227e0371858d5d048f61bfe0700e4b7ebab58 (patch) | |
tree | 94619d6b051f013c87b7265274468961b3b00036 /app/helpers | |
parent | fe27de8bf124d65013da1d82618a1ab45584ff68 (diff) |
moved some more inline code
removed some global variable comments
Diffstat (limited to 'app/helpers')
-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 425af547330..f4fad7150e8 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 |