<%= render(partial: "/shared/annotations_pagination", locals: { annotations: annotations, opts: opts }) %> <% annotations.each do |annotation| %> <% document_title = annotation.document.short_title || annotation.document.title %> <% date_or_year = annotation.document.docdate.present? ? annotation.document.docdate.strftime("%B %d, %Y") : annotation.document.year %> <% annotated_documents_title = [] %> <% annotation.documents.each do |annotated_document| %> <% ad_title = annotated_document.short_title || annotated_document.title %> <% ad_date_or_year = annotated_document.docdate.present? ? annotated_document.docdate.strftime("%B %d, %Y") : annotated_document.year %> <% annotated_documents_title << [" citing #{ad_title}", annotated_document.reference_number, ad_date_or_year].join(", ") %> <% end %> <% citing_document_title = [document_title, annotation.document.reference_number, date_or_year, annotation.phil_rep, annotated_documents_title].reject(&:blank?).join(', ').html_safe %>

<%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %> <%= raw citing_document_title %>

Edit Delete
<% if annotation.editor_notes.present? %>
Editor's Note:
<%= raw annotation.editor_notes %>

<% end %> <% end %>