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.
56 lines
3.7 KiB
56 lines
3.7 KiB
<div class="row-flex m-3 mt-0 doctrine-content-body"> |
|
<div class="container-sm <%= params[:is_subjects_index].present? ? 'm-0 ps-0' : '' %>"> |
|
<% search_results.uniq(&:headnote).each do |uniq_by_headnote| %> |
|
<h5> <%= uniq_by_headnote.headnote %> </h5> |
|
|
|
<% grouped_by_content_search_params = { subject_ids: opts[:subject_ids], headnote: uniq_by_headnote.headnote, is_grouped_by_content: true } %> |
|
<% search_doctrines(grouped_by_content_search_params).group(:content).groups.each do |group_by_content| %> |
|
<% group_by_content.results.each do |content_result| %> |
|
<div class="mb-0"> <%= raw content_result.content.html_safe %> </div> |
|
|
|
<% grouped_by_juris_search_params = { subject_ids: opts[:subject_ids], content: content_result.content, is_grouped_by_juris_id: true } %> |
|
<% search_doctrines(grouped_by_juris_search_params).group(:jurisprudence_id).groups.each do |grouped_by_juris| %> |
|
<% grouped_by_juris.results.each do |juris_result| %> |
|
<h5 class="clickable-link" style="color: darkred;" href="<%= document_path(juris_result.jurisprudence.document.id, is_index_table: false, subject_ids: params[:subject_ids]) %>"> |
|
<% document_title = juris_result.jurisprudence.short_title || juris_result.jurisprudence.title %> |
|
<% date_or_year = juris_result.jurisprudence.doc_date.present? ? juris_result.jurisprudence.doc_date.strftime("%B, %d, %Y") : doctrine.jurisprudence.year %> |
|
<%= [document_title, juris_result.jurisprudence.clean_reference_number, date_or_year].join(", ") %> |
|
</h5> |
|
|
|
<% search_params = { subject_ids: opts[:subject_ids], headnote: uniq_by_headnote.headnote, content: content_result.content, jurisprudence_id: juris_result.jurisprudence.id } %> |
|
<% search_doctrines(search_params).results.each do |doctrine| %> |
|
<% search_annotations({ doctrine_id: doctrine.id }).each do |annotation| %> |
|
<% annotated_documents_title = [] %> |
|
<% annotation.documents.each do |annotated_document| %> |
|
<% ad_title = annotated_document.short_title || annotated_document.title %> |
|
<% ad_date_or_year = annotated_document.doc_date.present? ? annotated_document.doc_date.strftime("%B %d, %Y") : annotated_document.year %> |
|
<% annotated_documents_title << [" citing #{ad_title}", annotated_document.clean_reference_number, ad_date_or_year].join(", ") %> |
|
<% end %> |
|
<% citing_document_title = [document_title, annotation.document.clean_reference_number, date_or_year, clean_phil_rep(annotation), annotated_documents_title].reject(&:blank?).join(', ').html_safe %> |
|
|
|
<div class="row mb-2 pb-0 ms-3"> |
|
<div class="col-sm-1 p-0 me-1" style="width: auto;"> <strong> <%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %> </strong> </div> |
|
<div class="col-sm-9 p-0 ms-1"> <%= raw annotation.content.present? ? content_diplay_text(annotation) : citing_document_title %> </div> |
|
</div> |
|
|
|
<% if annotation.editor_notes.present? %> |
|
<div class="row ms-5 mb-2"> |
|
<div class="col-sm-2 p-0" style="width: 105px;"> |
|
<span> Editors Note: </span> |
|
</div> |
|
|
|
<div class="col-sm-10 ps-0"> |
|
<%= raw annotation.editor_notes %> |
|
</div> |
|
</div> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
</div> |
|
<hr/> |
|
</div>
|
|
|