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.
24 lines
1.0 KiB
24 lines
1.0 KiB
# frozen_string_literal: true |
|
|
|
class AnnotationReflex < ApplicationReflex |
|
include DocumentSearch |
|
include AnnotationSearch |
|
|
|
def render_document_search_results(search_params) |
|
search = document_search(search_params) |
|
@documents = search.results |
|
opts = { current_page: search_params[:page], q: search_params[:q] } |
|
morph "#annotatedDocumentsSearchResults", render(partial: "/shared/annotated_documents_search_results", locals: { documents: @documents, opts: opts }) |
|
end |
|
|
|
def render_annotations_views(search_params) |
|
search = annotation_search(search_params) |
|
@annotations = search.results |
|
morph "#annotationsIndexView", render(partial: "/shared/annotations_index_view", locals: { annotations: @annotations, |
|
opts: { doctrine_id: search_params[:doctrine_id], current_page: search_params[:page] } }) |
|
end |
|
|
|
def render_default_case_lists_search(doctrine_id) |
|
morph "#caseListsCollapse", render(partial: "/shared/case_lists_no_results", locals: { doctrine_id: doctrine_id }) |
|
end |
|
end
|
|
|