diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-02 18:37:40 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-02 18:37:40 +0300 |
commit | e4c20cd3fe330faa415493ee2fe30dc16fbaca80 (patch) | |
tree | 0be61b6cc59cf35d81b9271c7603e0d8b203a31c /app/helpers/issuables_helper.rb | |
parent | 25d6a6c4b528159c288995de4909e6a8da431d0b (diff) | |
parent | 88958e5a9cd364ae36f3d2837982cedb9239c3bc (diff) |
Merge branch 'master' into sidebar-fly-out-sub-nav
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 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 |