Sha256: 711725f93e602ea1c27242dd7a0bf20b1d39de7813300c2f0b336655574dce1d
Contents?: true
Size: 1.33 KB
Versions: 6
Compression:
Stored size: 1.33 KB
Contents
<%= form_with url: '/documents', method: :get, local: true do |form| %> <div class="input-group mb-3" style="width:300px"> <%= form.text_field("daterange", { class: 'form-control', placeholder: 'Date range filter', size: 24, 'aria-label': "Date range filter", value: params['daterange'] }) %> <%= params_as_hidden_fields( params .to_hash .with_indifferent_access .except(:daterange, :controller, :action, :commit) ) %> <div class="input-group-append"> <%= form.submit 'Go', class: 'btn btn-outline-secondary' %> </div> </div> <% end %> <% if @documents.facets.present? %> <% @documents.facets.each do |facet| %> <% if facet['type'] == 'facet' %> <%- next if ['b1g_code_s', 'dct_isPartOf_sm'].include?(facet['id']) %> <h3 class="h5"><%= facet['attributes']['label'] %></h3> <ul class="list-unstyled"> <%- facet['attributes']['items'].each do |item| %> <% agg = link_from_api(item) %> <li> <%= link_to agg[:link] do %> <%= agg[:action] == 'add' ? "+" : "-" %> <%= item['attributes']['label'] %> (<%= item['attributes']['hits'] %>) <%= agg[:action] == 'add' ? "" : "❌".html_safe %> <% end %> </li> <% end %> </ul> <% end %> <% end %> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems