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:
authorPhil Hughes <me@iamphill.com>2017-08-02 18:37:40 +0300
committerPhil Hughes <me@iamphill.com>2017-08-02 18:37:40 +0300
commite4c20cd3fe330faa415493ee2fe30dc16fbaca80 (patch)
tree0be61b6cc59cf35d81b9271c7603e0d8b203a31c /app/helpers/issuables_helper.rb
parent25d6a6c4b528159c288995de4909e6a8da431d0b (diff)
parent88958e5a9cd364ae36f3d2837982cedb9239c3bc (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.rb10
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