<%= filter_form_for filter, url_for, data: { filters: "", component: "accordion" } do |form| %> <%= form.collection_radio_buttons( :addition_type, filter_addition_type_values, :first, :last ) do |builder| added_count = search.result.with_order(current_order).size unless builder.value == "all" builder.label(class: "button button__xs button__pill #{filter.addition_type == builder.value ? 'button__pill--active' : ''}") do %> <%= builder.text %> <%= render partial: "projects_count", locals: { count: added_count } %> <%= builder.radio_button(class: "!hidden") %> <% end %> <% end %> <% end %>