summaryrefslogtreecommitdiff
path: root/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml
blob: c10983a540589f39d6fa2cff6f46f067e7cc4250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
- provider = local_assigns.fetch(:provider)
- is_current_provider = provider == params[:provider]
- logo_path = local_assigns.fetch(:logo_path)
- label = local_assigns.fetch(:label)
- last = local_assigns.fetch(:last, false)
- classes = ["btn btn-light btn-outline flex-fill d-inline-flex flex-column justify-content-center align-items-center w-50 js-create-#{provider}-cluster-button"]
- conditional_classes = [('mr-3' unless last), ('active' if is_current_provider)]

= link_to clusterable.new_path(provider: provider), class: classes + conditional_classes do
  .svg-content.p-2= image_tag logo_path, alt: label, class: 'gl-w-64 gl-h-64'
  %span
    = label