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.
22 lines
1.0 KiB
22 lines
1.0 KiB
# frozen_string_literal: true |
|
|
|
class DocumentReflex < ApplicationReflex |
|
include DocumentSearch |
|
|
|
def render_case_lists_search_results(search_params, doctrine_id) |
|
search = document_search(search_params.merge(sort_by: %i[reference_number_texts title_texts short_title_texts])) |
|
@documents = search.results |
|
opts = { doctrine_id: doctrine_id, current_page: search_params[:page], q: search_params[:q], citation_finder: search_params[:citation_finder] } |
|
morph "#caseListsCollapse", render(partial: "/shared/case_lists_search_results", locals: { documents: @documents, opts: opts }) |
|
end |
|
|
|
def render_years(results) |
|
morph "tbody#yearsIndex", render(DocumentsYearsComponent.new(current_user: current_user, years: results)) |
|
end |
|
|
|
def render_modal_document_search_table(search_params) |
|
search = document_search(search_params) |
|
@documents = search.results |
|
morph "tbody#modalDocumentSearchTable", render(partial: "document_search_results_table", locals: { search_results: @documents, opts: { is_citing_document: true } }) |
|
end |
|
end
|
|
|