diff --git a/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb b/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb index a08efc7..30c83a5 100644 --- a/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb +++ b/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb @@ -30,7 +30,7 @@
- <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "annotations.q" } %> + <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number, Title or Short Title", data: { target: "annotations.q" } %>
diff --git a/app/components/doctrine_index_component.rb b/app/components/doctrine_index_component.rb index 50218c0..b466d8f 100644 --- a/app/components/doctrine_index_component.rb +++ b/app/components/doctrine_index_component.rb @@ -12,6 +12,7 @@ class DoctrineIndexComponent < BaseComponent delegate :content, to: :doctrine delegate :annotations, to: :doctrine delegate :subjects, to: :doctrine + delegate :headnote, to: :doctrine delegate :doctrine_jurisprudences, to: :doctrine def annotation_form_url diff --git a/app/components/doctrine_index_component/doctrine_index_component.html.erb b/app/components/doctrine_index_component/doctrine_index_component.html.erb index 8e84a94..bf9132e 100644 --- a/app/components/doctrine_index_component/doctrine_index_component.html.erb +++ b/app/components/doctrine_index_component/doctrine_index_component.html.erb @@ -5,9 +5,11 @@
<% document_title = jurisprudence.short_title || jurisprudence.title %> <% date_or_year = jurisprudence.docdate.present? ? jurisprudence.docdate.to_date.strftime("%B %d, %Y") : jurisprudence.year %> - - <% annotations.each do |annotation| %> +

<%= headnote %>

+ + + <% annotations.order(created_at: :desc).each do |annotation| %>

<%= raw content.html_safe %>

+ +

<%= headnote %>

+ <% if opts[:is_doctrines_index].present? %> <% 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.reference_number, date_or_year].join(", ") %>
<% end %> - <% annotations.each do |annotation| %> + <% annotations.order(created_at: :desc).each do |annotation| %>

<% annotated_documents_title = [] %> <% annotation.documents.each do |annotated_document| %> diff --git a/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb b/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb index c1bcb73..9ed4042 100644 --- a/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb +++ b/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb @@ -58,7 +58,7 @@

- <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "document.input" } %> + <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number, Title or Short Title", data: { target: "document.input" } %>
<%= button_tag "Search", class: "btn btn-success", data: { action: "click->document#search" } %> @@ -89,7 +89,7 @@
Annotations
<%= render(partial: "/shared/annotations_pagination", locals: { annotations: annotations, opts: { current_page: 1 } }) %> - <% annotations.each do |annotation| %> + <% annotations.order(created_at: :desc).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 = [] %> diff --git a/app/components/sidenav_component/sidenav_component.html.erb b/app/components/sidenav_component/sidenav_component.html.erb index 03d4585..7f51bda 100644 --- a/app/components/sidenav_component/sidenav_component.html.erb +++ b/app/components/sidenav_component/sidenav_component.html.erb @@ -88,13 +88,11 @@ <%= link_to 'Search'.html_safe, documents_path, class: "nav-link" %> -