Sha256: 25b0a690bb753791102c293d2217e6576a02f445321136f40b12df7176fe4017

Contents?: true

Size: 1.09 KB

Versions: 7

Compression:

Stored size: 1.09 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: 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

7 entries across 7 versions & 1 rubygems

Version Path
blacklight-7.2.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.1.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.1.0.alpha app/views/catalog/_constraints_element.html.erb
blacklight-7.0.1 app/views/catalog/_constraints_element.html.erb
blacklight-7.0.0 app/views/catalog/_constraints_element.html.erb
blacklight-7.0.0.rc2 app/views/catalog/_constraints_element.html.erb
blacklight-7.0.0.rc1 app/views/catalog/_constraints_element.html.erb