Sha256: e0e26f68964c30f12bddd3694c6def2a5db393eb09c9618eb01f2b8af2dfb81a

Contents?: true

Size: 1.29 KB

Versions: 6

Compression:

Stored size: 1.29 KB

Contents

<%- # local params:
    # label 
    # value
    # options =>
    #   :remove => url for a remove constraint link
    #   :classes => array of classes to add to container span
    options ||= {}
    options[:escape_label] = true unless options.has_key?(:escape_label)
    options[:escape_value] = true unless options.has_key?(:escape_value)
-%>

<span class="appliedFilter constraint <%= options[:classes].join(" ") if options[:classes] %>">
      <%- unless label.blank? -%>
        <span class="filterName"><%= options[:escape_label] ? h(label) : raw(label) %></span> 
      <%- end -%>
      <%- unless value.blank? -%>
        <span class="filterValue"><%= options[:escape_value] ? h(value) : raw(value) %></span>
      <%- end -%>
      <%- unless options[:remove].blank? -%>
        <% accessible_remove_label =               
                if label.blank?
                  "Remove constraint #{options[:escape_value] ? h(value) : value}"
                else
                  "Remove constraint #{options[:escape_label] ? h(label) : label}: #{options[:escape_value] ? h(value) : value}"
                end              
        %>                
        <%= link_to(accessible_remove_label,
					options[:remove],
					:class=>'btnRemove imgReplace',
          :alt=>'remove'
				) %>
      <%- end -%>
</span>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-3.4.2 app/views/catalog/_constraints_element.html.erb
blacklight-3.4.1 app/views/catalog/_constraints_element.html.erb
blacklight-3.4.0 app/views/catalog/_constraints_element.html.erb
blacklight-3.3.2 app/views/catalog/_constraints_element.html.erb
blacklight-3.3.1 app/views/catalog/_constraints_element.html.erb
blacklight-3.3.0 app/views/catalog/_constraints_element.html.erb