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.
 
 
 
 
 

19 lines
795 B

# 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: { current_page: search_params[:page] } })
end
end