Sha256: 22b81d53a4682e9e5b072096246a4ea1b1f97b0d2058cf910e500e170b8bef30

Contents?: true

Size: 878 Bytes

Versions: 1

Compression:

Stored size: 878 Bytes

Contents

<% other_visibility_reason = other_visibility_reason.nil? ? false : other_visibility_reason %>
<% if cluster_organization.is_in_cluster_mode? || other_visibility_reason %>
  <% 
    cluster_collection = cluster_clusters
    label = t('klastera.cluster.id')
  %>
  <% if f.is_a?(SimpleForm::FormBuilder) %>
    <% if cluster_collection.size == 1 %>
      <%= f.input :lonely_cluster, as: :hidden, html_input: { value: true } %>
    <% else %>
      <%= f.input :cluster_id, collection: cluster_collection, label: label %>
    <% end %>
  <% else %>
    <% if cluster_collection.size == 1 %>
      <%= f.hidden_field :lonely_cluster, value: true %>
    <% else %>
      <div class="form-group">
        <%= f.label label %>
        <%= f.select :cluster_id, cluster_collection, { include_blank: true }, { class: 'form-control' } %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
klastera-1.1.0 app/views/layouts/klastera/_cluster_selector.html.erb