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.2 KiB

# frozen_string_literal: true
class DoctrinesReflex < ApplicationReflex
include DoctrineSearch
def render_document_doctrines_index(search_params)
search = doctrine_search(search_params)
morph "#doctrinesIndexView", render(partial: "/shared/document_doctrines_index", locals: { doctrines: search.results, current_user: current_user, opts: { document_id: search_params[:jurisprudence_id], current_page: search_params[:page] } })
end
def render_annotation_modal_form(document_id, doctrine_id)
jurisprudence = Cdao::Jurisprudence.find(document_id)
document = Cdao::Document.where(reference_number: jurisprudence.reference_number).first
morph "#doctrineModal", render(partial: "/shared/annotation_modal_form", locals: { document: document, doctrine_id: doctrine_id, jurisprudence: jurisprudence })
end
def render_annotation_form(document_id, doctrine_id)
jurisprudence = Cdao::Jurisprudence.find(document_id)
document = Cdao::Document.where(reference_number: jurisprudence.reference_number).first
morph "#doctrineForm", render(partial: "/shared/annotation_form", locals: { annotation: Annotation.new, document: document, doctrine_id: doctrine_id, jurisprudence: jurisprudence })
end
end