Sha256: 8f14b696774f672922c423a1e26baaa289be6d9645cfab02c6f218c3554e10ad

Contents?: true

Size: 1.25 KB

Versions: 10

Compression:

Stored size: 1.25 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] %>">
<a href="#" 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 -%>          
        </a>

      <%- 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

10 entries across 10 versions & 1 rubygems

Version Path
blacklight-5.4.0 app/views/catalog/_constraints_element.html.erb
blacklight-5.4.0.rc1 app/views/catalog/_constraints_element.html.erb
blacklight-5.3.0 app/views/catalog/_constraints_element.html.erb
blacklight-5.0.3 app/views/catalog/_constraints_element.html.erb
blacklight-5.1.1 app/views/catalog/_constraints_element.html.erb
blacklight-5.2.0 app/views/catalog/_constraints_element.html.erb
blacklight-5.1.0 app/views/catalog/_constraints_element.html.erb
blacklight-5.0.2 app/views/catalog/_constraints_element.html.erb
blacklight-5.0.1 app/views/catalog/_constraints_element.html.erb
blacklight-5.0.0 app/views/catalog/_constraints_element.html.erb