Sha256: ca7ca627421ebe9835ab0c4a4a85a9518bc6b88df55715dcdaa3ad6e39512794

Contents?: true

Size: 1.09 KB

Versions: 9

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 appliedFilter constraint <%= options[:classes].join(" ") if options[:classes] %>">
  <span class="constraint-value btn btn-sm btn-default btn-disabled">
    <% unless label.blank? %>
      <span class="filterName"><%= label %></span>
    <% end %>
    <% unless value.blank? %>
      <span class="filterValue"><%= value %></span>
    <% 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: 'glyphicon glyphicon-remove') + accessible_remove_label,
			options[:remove], class: 'btn btn-default btn-sm remove dropdown-toggle'
		) %>
  <%- end -%>
</span>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-5.7.2 app/views/catalog/_constraints_element.html.erb
blacklight-5.5.4 app/views/catalog/_constraints_element.html.erb
blacklight-5.7.1 app/views/catalog/_constraints_element.html.erb
blacklight-5.7.0 app/views/catalog/_constraints_element.html.erb
blacklight-5.6.0 app/views/catalog/_constraints_element.html.erb
blacklight-5.5.3 app/views/catalog/_constraints_element.html.erb
blacklight-5.5.2 app/views/catalog/_constraints_element.html.erb
blacklight-5.5.1 app/views/catalog/_constraints_element.html.erb
blacklight-5.5.0 app/views/catalog/_constraints_element.html.erb