You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
1.2 KiB

<div class="container-fluid mt-1 p-0 doctrine-index-body">
<div class="container-fluid m-2 p-0"> <%= render PaginationComponent.new(data: @results, opts: { is_subject_breadcrums: true, subject_ids: params[:subject_ids], is_index_table: params[:is_index_table] }) %> </div>
<hr class="mt-0"/>
<% @uniq_by_headnotes.each do |uniq_by_headnote| %>
<div class="row-flex m-3 mt-0 doctrine-content-body">
<div class="container-sm <%= params[:is_subjects_index].present? ? 'm-0 ps-0' : '' %>">
<h5> <%= uniq_by_headnote.headnote %> </h5>
<% uniq_by_contents = @results.map { |doctrine| doctrine if doctrine.headnote.eql?(uniq_by_headnote.headnote) }.uniq(&:content) %>
<% uniq_by_contents.each do |uniq_by_content| %>
<div class="mb-0"> <%= raw uniq_by_content.content.html_safe %> </div>
<% doctrines = @results.map { |doctrine| doctrine if doctrine.headnote.eql?(uniq_by_headnote.headnote) && doctrine.content.eql?(uniq_by_content.content) } %>
<%= render(DoctrineIndexComponent.with_collection(doctrines, current_user: current_user, opts: { is_index_table: false, subject_ids: params[:subject_ids].map(&:to_i) })) %>
<% end %>
</div>
<hr/>
</div>
<% end %>
</div>