6 changed files with 169 additions and 155 deletions
@ -1,192 +1,197 @@ |
|||||||
<div class="card"> |
<hr class="mt-0"/> |
||||||
<div class="card-header"> |
<div class="row pe-0"> |
||||||
|
<div class="col-sm-10"> |
||||||
|
<h5> <b>Doctrine Details</b> </h5> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-sm-2 d-flex justify-content-end pe-0"> |
||||||
|
<a class="btn btn-sm btn-secondary me-3" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Edit </a> |
||||||
|
<a class="btn btn-sm btn-danger" href="<%= jurisprudence_doctrine_path(document_id, id) %>" data-confirm="Are you sure to delete this record?" data-method="DELETE"> Delete </a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<hr class="mt-3"/> |
||||||
|
<div class=""> |
||||||
|
|
||||||
|
<div class="container-sm row-flex col-sm-12 mt-2"> |
||||||
|
<%= render(DoctrineModalFormComponent.new(current_user: current_user, doctrine: doctrine, subjects: all_subjects, opts: { form_url: jurisprudence_doctrine_path(jurisprudence_id: document_id, id: doctrine.id), form_method: "PUT" })) %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="card-body pt-0"> |
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-sm-10"> |
<div class="col-sm-2" style="width: 100px;"> |
||||||
<h5> Doctrine Details </h5> |
<strong> Subjects: </strong> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="col-sm-2 justify-content-end"> |
<div class="col-sm-10"> |
||||||
<a class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Edit </a> |
<%= subjects.map(&:lineage_name).join(" & ") %> |
||||||
<a class="btn btn-sm btn-danger" href="<%= jurisprudence_doctrine_path(document_id, id) %>" data-confirm="Are you sure to delete this record?" data-method="DELETE"> Delete </a> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="container-sm row-flex col-sm-12 mt-2"> |
<div class="row"> |
||||||
<%= render(DoctrineModalFormComponent.new(current_user: current_user, doctrine: doctrine, subjects: all_subjects, opts: { form_url: jurisprudence_doctrine_path(jurisprudence_id: document_id, id: doctrine.id), form_method: "PUT" })) %> |
<div class="col-sm-2" style="width: 100px;"> |
||||||
</div> |
<strong> Content: </strong> |
||||||
</div> |
|
||||||
|
|
||||||
<div class="card-body"> |
|
||||||
<div class="row"> |
|
||||||
<div class="col-sm-2" style="width: 100px;"> |
|
||||||
<strong> Subjects: </strong> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div class="col-sm-10"> |
|
||||||
<%= subjects.map(&:lineage_name).join(" & ") %> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="row"> |
<div class="col-sm-10"> |
||||||
<div class="col-sm-2" style="width: 100px;"> |
<%= raw content %> |
||||||
<strong> Content: </strong> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div class="col-sm-10"> |
|
||||||
<%= raw content %> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-sm-10"> </div> |
<div class="col-sm-10"> </div> |
||||||
<div class="col-sm-2 p-2"> |
<div class="col-sm-2 p-2"> |
||||||
<button type="button" class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#caseListsCollapse" aria-expanded="false" aria-controls="collapseExample"> Case Lists </button> |
<button type="button" class="btn btn-primary d-block ms-auto" data-bs-toggle="collapse" data-bs-target="#caseListsCollapse" aria-expanded="false" aria-controls="collapseExample"> Case Lists </button> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="collapse mb-3" id="caseListsCollapse"> |
<div class="collapse mb-3 mt-2" id="caseListsCollapse"> |
||||||
<div class="row" data-controller="document" data-document-id="<%= document_id %>" data-doctrine-id="<%= id %>"> |
<div class="row" data-controller="document" data-document-id="<%= document_id %>" data-doctrine-id="<%= id %>"> |
||||||
<div class="col-sm-10 p-2"> |
<div class="col-sm-11 p-2"> |
||||||
<%= 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", data: { target: "document.input" } %> |
||||||
</div> |
</div> |
||||||
<div class="col-sm-1 p-2"> |
<div class="col p-2"> |
||||||
<%= button_tag "Search", class: "btn btn-primary", data: { action: "click->document#search" } %> |
<%= button_tag "Search", class: "btn btn-primary", data: { action: "click->document#search" } %> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="row tab"> |
<div class="row tab"> |
||||||
<table class="table table-striped table-hover mb-0"> |
<table class="table table-striped table-hover mb-0" style="width: 98%;margin: 0 auto;"> |
||||||
<thead> |
<thead> |
||||||
<th class="bg-light"> Reference No. </th> |
<th class="bg-light"> Reference No. </th> |
||||||
<th class="bg-light"> Title </th> |
<th class="bg-light"> Title </th> |
||||||
<th class="bg-light"> Date </th> |
<th class="bg-light"> Date </th> |
||||||
<th class="bg-light"> </th> |
<th class="bg-light"> </th> |
||||||
</thead> |
</thead> |
||||||
|
|
||||||
<tbody id="documentIndexTable"> </tbody> |
<tbody id="documentIndexTable"> |
||||||
</table> |
|
||||||
|
</tbody> |
||||||
<div class="modal fade new-annotation-modal" id="newAnnotationModal" tabindex="-1" aria-labelledby="annotationModal" aria-hidden="true"> |
</table> |
||||||
<%= form_tag(doctrine_annotations_path(id), method: :post) do%> |
|
||||||
<div class="modal-dialog modal-lg modal-dialog-scrollable"> |
<div class="modal fade new-annotation-modal" id="newAnnotationModal" tabindex="-1" aria-labelledby="annotationModal" aria-hidden="true"> |
||||||
<div class="modal-content"> |
<%= form_tag(doctrine_annotations_path(id), method: :post) do%> |
||||||
<div class="modal-header"> |
<div class="modal-dialog modal-lg modal-dialog-scrollable"> |
||||||
<h5 class="modal-title">New Annotations</h5> |
<div class="modal-content"> |
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
<div class="modal-header"> |
||||||
</div> |
<h5 class="modal-title">New Annotations</h5> |
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="modal-body"> |
<div class="modal-body"> |
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-sm-12 p-2"> |
<div class="col-sm-12 p-2"> |
||||||
<strong> <%= label_tag :annotation_marks %> </strong> |
<strong> <%= label_tag :annotation_marks %> </strong> |
||||||
<%= hidden_field_tag :document_id, nil %> |
<%= hidden_field_tag :document_id, nil %> |
||||||
<%= hidden_field_tag :document_ids, nil %> |
<%= hidden_field_tag :document_ids, nil %> |
||||||
<%= select_tag "annomark_ids[]", options_from_collection_for_select(Annomark.all, :id, :name), class: "form-select default-selectize", multiple: true, prompt: "Please select" %> |
<%= select_tag "annomark_ids[]", options_from_collection_for_select(Annomark.all, :id, :name), class: "form-select default-selectize", multiple: true, prompt: "Please select" %> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-sm-12 p-2"> |
<div class="col-sm-12 p-2"> |
||||||
<strong> <%= label_tag :document_title %> </strong> |
<strong> <%= label_tag :document_title %> </strong> |
||||||
<%= text_area_tag :document_title, nil, class: "form-control" %> |
<%= text_area_tag :document_title, nil, class: "form-control" %> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="row" data-controller="document"> |
<div class="row" data-controller="document"> |
||||||
<div class="col-sm-10 p-2"> |
<div class="col-sm-10 p-2"> |
||||||
<%= 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", data: { target: "document.input" } %> |
||||||
</div> |
|
||||||
<div class="col-sm-1 p-2"> |
|
||||||
<button type="button" class="btn btn-primary" data-action="click->document#modalDocumentSearch"> Search </button> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
<div class="col-sm-1 p-2"> |
||||||
<div class="row tab"> |
<button type="button" class="btn btn-primary" data-action="click->document#modalDocumentSearch"> Search </button> |
||||||
<table class="table table-striped table-hover mb-0"> |
|
||||||
<thead> |
|
||||||
<th class="bg-light"> Reference No. </th> |
|
||||||
<th class="bg-light"> Title </th> |
|
||||||
<th class="bg-light"> Date </th> |
|
||||||
<th class="bg-light"> </th> |
|
||||||
</thead> |
|
||||||
|
|
||||||
<tbody id="modalDocumentSearchTable"> </tbody> |
|
||||||
</table> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="row"> |
<div class="row tab"> |
||||||
<div class="col-sm-12 p-2"> |
<table class="table table-striped table-hover mb-0"> |
||||||
<strong> <%= label_tag :phil_rep %> </strong> |
<thead> |
||||||
<%= text_field_tag :phil_rep, nil, class: "form-control" %> |
<th class="bg-light"> Reference No. </th> |
||||||
</div> |
<th class="bg-light"> Title </th> |
||||||
|
<th class="bg-light"> Date </th> |
||||||
|
<th class="bg-light"> </th> |
||||||
|
</thead> |
||||||
|
|
||||||
|
<tbody id="modalDocumentSearchTable"> </tbody> |
||||||
|
</table> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-sm-12 p-2"> |
<div class="col-sm-12 p-2"> |
||||||
<strong> <%= label_tag :editor_notes %> </strong> |
<strong> <%= label_tag :phil_rep %> </strong> |
||||||
<trix-editor id="editor_notes" placeholder="Editor Notes"> </trix-editor> |
<%= text_field_tag :phil_rep, nil, class: "form-control" %> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="modal-footer"> |
<div class="row"> |
||||||
<%= submit_tag "Save", class: "btn btn-primary" %> |
<div class="col-sm-12 p-2"> |
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> |
<strong> <%= label_tag :editor_notes %> </strong> |
||||||
|
<trix-editor id="editor_notes" placeholder="Editor Notes"> </trix-editor> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<div class="modal-footer"> |
||||||
|
<%= submit_tag "Save", class: "btn btn-primary" %> |
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
<% end %> |
</div> |
||||||
</div> |
<% end %> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="card row-flex"> |
<div class="row-flex"> |
||||||
<h5 class="card-header"> Annotations </h5> |
<div class="annot-header"> |
||||||
<div class="card-body"> |
<h5> Annotations </h5> |
||||||
<% doctrine.annotations.order(rank: :asc).each do |annotation| %> |
</div> |
||||||
<div class="row"> |
<div class=""> |
||||||
<div class="col-sm-10"> |
<% doctrine.annotations.order(rank: :asc).each do |annotation| %> |
||||||
<p class="pb-0 ms-3"> |
<div class="row"> |
||||||
<strong> <%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %> </strong> |
<div class="col-sm-10"> |
||||||
<% document_title = annotation.document.short_title || annotation.document.title %> |
<p class="pb-0 ms-3"> |
||||||
<% date_or_year = annotation.document.docdate.present? ? annotation.document.docdate.strftime("%B %d, %Y") : annotation.document.year %> |
<strong> <%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %> </strong> |
||||||
<% annotated_documents_title = [] %> |
<% document_title = annotation.document.short_title || annotation.document.title %> |
||||||
<% annotation.documents.each do |annotated_document| %> |
<% date_or_year = annotation.document.docdate.present? ? annotation.document.docdate.strftime("%B %d, %Y") : annotation.document.year %> |
||||||
<% ad_title = annotated_document.short_title || annotated_document.title %> |
<% annotated_documents_title = [] %> |
||||||
<% ad_date_or_year = annotated_document.docdate.present? ? annotated_document.docdate.strftime("%B %d, %Y") : annotated_document.year %> |
<% annotation.documents.each do |annotated_document| %> |
||||||
<% annotated_documents_title << [" citing #{ad_title}", annotated_document.reference_number, ad_date_or_year].join(", ") %> |
<% ad_title = annotated_document.short_title || annotated_document.title %> |
||||||
<% end %> |
<% ad_date_or_year = annotated_document.docdate.present? ? annotated_document.docdate.strftime("%B %d, %Y") : annotated_document.year %> |
||||||
<%= raw [document_title, annotation.document.reference_number, date_or_year, annotation.phil_rep, annotated_documents_title].reject(&:blank?).join(', ').html_safe %> |
<% annotated_documents_title << [" citing #{ad_title}", annotated_document.reference_number, ad_date_or_year].join(", ") %> |
||||||
</p> |
<% end %> |
||||||
</div> |
<%= raw [document_title, annotation.document.reference_number, date_or_year, annotation.phil_rep, annotated_documents_title].reject(&:blank?).join(', ').html_safe %> |
||||||
|
</p> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="col-sm-2"> |
<div class="col-sm-2 d-flex justify-content-end align-items-baseline"> |
||||||
<a class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#editAnnotationModal<%= annotation.id %>"> Edit </a> |
<a class="btn btn-sm btn-secondary me-3" data-bs-toggle="modal" data-bs-target="#editAnnotationModal<%= annotation.id %>"> Edit </a> |
||||||
<a class="btn btn-sm btn-danger" href="<%= doctrine_annotation_path(doctrine.id, annotation.id) %>" data-confirm="Are you sure to delete this record?" data-method="DELETE"> Delete </a> |
<a class="btn btn-sm btn-danger" href="<%= doctrine_annotation_path(doctrine.id, annotation.id) %>" data-confirm="Are you sure to delete this record?" data-method="DELETE"> Delete </a> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<% if annotation.editor_notes.present? %> |
<% if annotation.editor_notes.present? %> |
||||||
<div class="row"> |
<div class="row"> |
||||||
<div class="col-sm-1 ms-5 p-0" style="width: 105px;"> |
<div class="col-sm-1 ms-5 p-0" style="width: 105px;"> |
||||||
<span> Editors Note: </span> |
<span> Editors Note: </span> |
||||||
</div> |
|
||||||
|
|
||||||
<div class="col-sm-10 ps-0"> |
|
||||||
<%= raw annotation.editor_notes %> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
<% end %> |
|
||||||
|
<div class="col-sm-10 ps-0"> |
||||||
<div class="row annotation-marks-modal-container"> |
<%= raw annotation.editor_notes %> |
||||||
<div class="modal fade" id="editAnnotationModal<%= annotation.id %>" tabindex="-1" aria-labelledby="annotationModal" aria-hidden="true"> |
|
||||||
<%= render AnnotationMarksModalFormComponent.new(current_user: current_user, document: document, annotation: annotation, opts: { form_url: doctrine_annotation_path(id, annotation.id), form_method: "PUT" }) %> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
<hr/> |
||||||
<% end %> |
<% end %> |
||||||
</div> |
|
||||||
|
<div class="row annotation-marks-modal-container"> |
||||||
|
<div class="modal fade modal-doctrine-body" id="editAnnotationModal<%= annotation.id %>" tabindex="-1" aria-labelledby="annotationModal" aria-hidden="true"> |
||||||
|
<%= render AnnotationMarksModalFormComponent.new(current_user: current_user, document: document, annotation: annotation, opts: { form_url: doctrine_annotation_path(id, annotation.id), form_method: "PUT" }) %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<% end %> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|||||||
Loading…
Reference in new issue