gitlab-org--gitlab-foss/app/helpers/boards_helper.rb
Phil Hughes 79d50538c4 Fixed avatar not displaying in issue boards
This happens when Gravatar is disabled in the admin settings, the avatar is returned as null & then frontend didn't do anything about it.

Closes #31428
2017-04-28 11:27:52 +01:00

15 lines
522 B
Ruby

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),
root_path: root_path,
bulk_update_path: bulk_update_namespace_project_issues_path(@project.namespace, @project),
default_avatar: image_path(default_avatar)
}
end
end