Skip to content

Commit

Permalink
add the count slots to the chips in the browse page
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Apr 23, 2023
1 parent c3f8f7f commit 4408de7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/views/ontologies/browse.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,15 @@
.collapse{id: "browse-#{key}-filter", class: "#{values[2].positive? ? 'show': ''}"}
.browse-filter-checks-container
- values.first.each do |object|
%div
= render ChipsComponent.new(name: object["acronym"], value: object["name"] || object["id"], checked: values[1]&.include?(object["id"]))


%div.mr-2
= render ChipsComponent.new(name: object["acronym"], value: (object["acronym"] || object["id"]), checked: values[1]&.include?(object["id"])) do |c|
- c.count do
%div.ml-1
= turbo_frame_tag "count_#{key}_#{object["id"]}" do
%div.p-1.p-2
= render LoaderComponent.new(small:true)

.browse-second-row
= render TurboFrameComponent.new(id:"search-results" , src: "/ontologies_filter?#{request.original_url.split('?').last}",
= render TurboFrameComponent.new(id:"ontologies-browse-results" , src: "/ontologies_filter?#{request.original_url.split('?').last}",
data:{"turbo-frame-target":"frame", "turbo-frame-url-value": "/ontologies_filter"})

0 comments on commit 4408de7

Please sign in to comment.