-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b10011a
commit f6315ea
Showing
2 changed files
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
<%- # local params: | ||
# label | ||
<% # 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> | ||
<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 | ||
%> | ||
<%- 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 -%> | ||
<%= 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters