Commit f76f569b authored by Phil Hughes's avatar Phil Hughes

Moved data attribute values into helper method

parent 53b3c62e
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
......@@ -10,11 +10,7 @@
= render 'shared/issuable/filter', type: :boards
.boards-list#board-app{ "v-cloak" => true,
"data-endpoint" => "#{namespace_project_boards_path(@project.namespace, @project)}",
"data-board-id" => "#{@boards.first.id}",
"data-disabled" => "#{!can?(current_user, :admin_list, @project)}",
"data-issue-link-base" => "#{namespace_project_issues_path(@project.namespace, @project)}" }
.boards-list#board-app{ "v-cloak" => true, data: board_data }
.boards-app-loading.text-center{ "v-if" => "loading" }
= icon("spinner spin")
= render "projects/boards/components/board"
......@@ -10,11 +10,7 @@
= render 'shared/issuable/filter', type: :boards
.boards-list#board-app{ "v-cloak" => true,
"data-endpoint" => "#{namespace_project_boards_path(@project.namespace, @project)}",
"data-board-id" => "#{@board.id}",
"data-disabled" => "#{!can?(current_user, :admin_list, @project)}",
"data-issue-link-base" => "#{namespace_project_issues_path(@project.namespace, @project)}" }
.boards-list#board-app{ "v-cloak" => true, data: board_data }
.boards-app-loading.text-center{ "v-if" => "loading" }
= icon("spinner spin")
= render "projects/boards/components/board"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment