Sha256: dec8e1dce14094c326990d0916505cb8c844173065065afdce374cd1e366dc2f

Contents?: true

Size: 1.7 KB

Versions: 10

Compression:

Stored size: 1.7 KB

Contents

<% filter_name = zuo_parameterize(table_filter["name"]) %>
<% prompt = table_filter.fetch("prompt", "") %>

<div class="table-filter">
  <% if table_filter["type"] == "checkbox" %>
    <div class="dropdown checkbox-filter">
      <div class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        <%= prompt %> <span class="z-icon-desc"></span>
      </div>
      <ul class="dropdown-menu" >
        <% table_filter["values"].each do |type| %>
          <li class="checkbox-row">
            <div class="checkbox">
              <input type="checkbox" name='<%= filter_name %>[]' value="<%= type %>">
              <label for="<%= filter_name %>"><%= type %></label>
            </div>
          </li>
        <% end %>
      </ul>
    </div>
  <% elsif ["select", "group-select"].include?(table_filter["type"]) %>
    <% option_tags = table_filter["type"] == "select" ? options_for_select(table_filter["values"]) : grouped_options_for_select(table_filter["values"]) %>
    <%= select_tag(filter_name, option_tags, options = {:prompt => prompt}) %>
    <% content_for :scripts do %>
      $('#<%= table_name %>_content select[name="<%= filter_name %>"]').select2({
        minimumResultsForSearch: <%= table_filter.key?("searchable") && table_filter["searchable"] ? 0 : -1 %>,
        width: '<%= table_filter.fetch('width', '100%') %>',
        placeholder: '<%= table_filter.fetch('placeholder', '') %>',
        allowClear: <%= table_filter.fetch('allow-clear', true) %>
      });
    <% end %>
  <% elsif table_filter["type"] == "boolean" %>
    <input type="checkbox" value="true" name="<%= filter_name %>">
    <label for="<%= filter_name %>"><%= table_filter["name"] %></label>
  <% end %>
</div>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
zuora_connect_ui-0.9.1 app/views/partials/_filters.html.erb
zuora_connect_ui-0.9.0 app/views/partials/_filters.html.erb
zuora_connect_ui-0.8.3 app/views/partials/_filters.html.erb
zuora_connect_ui-0.8.2 app/views/partials/_filters.html.erb
zuora_connect_ui-0.8.1 app/views/partials/_filters.html.erb
zuora_connect_ui-0.8.0 app/views/partials/_filters.html.erb
zuora_connect_ui-0.7.1 app/views/partials/_filters.html.erb
zuora_connect_ui-0.7.0 app/views/partials/_filters.html.erb
zuora_connect_ui-0.6.2 app/views/partials/_filters.html.erb
zuora_connect_ui-0.6.1 app/views/partials/_filters.html.erb