<% document_title = jurisprudence.short_title || jurisprudence.title %>
<% date_or_year = jurisprudence.docdate.present? ? jurisprudence.docdate.to_date.strftime("%B %d, %Y") : jurisprudence.year %>
<%= [document_title, jurisprudence.clean_reference_number, date_or_year].join(", ") %>
<% annotations.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.docdate.present? ? annotated_document.docdate.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 %>
<%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %>
<%= raw annotation.content.present? ? content_diplay_text(annotation) : citing_document_title %>
<% if annotation.editor_notes.present? %>
Editors Note:
<%= raw annotation.editor_notes %>
<% end %>
<% end %>