Sha256: f5b57442a793968697e66817d3aac7fda892c096bdfc55b0f10d6a1dabba3221

Contents?: true

Size: 1.11 KB

Versions: 8

Compression:

Stored size: 1.11 KB

Contents

<%  # local params:
    # label
    # value
    # options =>
    #   :remove => url for a remove constraint link
    #   :classes => array of classes to add to container span
    options ||= {}
%>

<span class="btn-group applied-filter constraint <%= options[:classes].join(" ") if options[:classes] %>">
  <span class="constraint-value btn btn-outline-secondary btn-disabled">
    <% unless label.blank? %>
      <span class="filter-name"><%= label %></span>
    <% end %>
    <% unless value.blank? %>
      <%= content_tag :span, value, class: 'filter-value', title: strip_tags(value) %>
    <% end %>
  </span>
  <% unless options[:remove].blank? %>
    <% accessible_remove_label = content_tag :span, class: 'sr-only' do
        if label.blank?
          t('blacklight.search.filters.remove.value', value: value)
        else
          t('blacklight.search.filters.remove.label_value', label: label, value: value)
        end
      end
    %>

    <%= link_to(content_tag(:span, '✖', class: 'remove-icon') + accessible_remove_label,
			options[:remove], class: 'btn btn-outline-secondary remove'
		) %>
  <%- end -%>
</span>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight-7.7.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.6.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.5.1 app/views/catalog/_constraints_element.html.erb
blacklight-7.5.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.4.2 app/views/catalog/_constraints_element.html.erb
blacklight-7.4.1 app/views/catalog/_constraints_element.html.erb
blacklight-7.4.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.3.0 app/views/catalog/_constraints_element.html.erb