6 changed files with 90 additions and 68 deletions
@ -1,20 +1,6 @@ |
|||||||
<div class="container-fluid mt-1 p-0 doctrine-index-body"> |
<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> |
<div class="container-fluid m-2 p-0"> <%= render PaginationComponent.new(data: @search_results, opts: { is_subject_breadcrums: true, subject_ids: params[:subject_ids], is_index_table: params[:is_index_table] }) %> </div> |
||||||
<hr class="mt-0"/> |
<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) %> |
<%= render(DoctrineIndexComponent.new(search_results: @search_results, current_user: current_user, opts: { is_index_table: false, subject_ids: params[:subject_ids].map(&:to_i) })) %> |
||||||
<% 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> |
</div> |
||||||
|
|||||||
Loading…
Reference in new issue