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>2016-10-12 14:50:47 +0300
committerPhil Hughes <me@iamphill.com>2016-10-12 14:50:47 +0300
commitf76f569bb87803b14c763427fc2875cca7dda892 (patch)
tree36323b0f248a57bae612ec1c5a5487ed98d120a5 /app/helpers
parent53b3c62e0f889d077ee5b19703c3e04384c85c03 (diff)
Moved data attribute values into helper method
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/boards_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb
new file mode 100644
index 00000000000..b7247ffa8b2
--- /dev/null
+++ b/app/helpers/boards_helper.rb
@@ -0,0 +1,12 @@
+module BoardsHelper
+ def board_data
+ board = @board || @boards.first
+
+ {
+ endpoint: namespace_project_boards_path(@project.namespace, @project),
+ board_id: board.id,
+ disabled: !can?(current_user, :admin_list, @project),
+ issue_link_base: namespace_project_issues_path(@project.namespace, @project)
+ }
+ end
+end