9 changed files with 62 additions and 77 deletions
@ -1,23 +1,31 @@ |
|||||||
<% if id.present? %> |
<div class="card card-header row-flex m-3 clickable-link" href="<%= opts[:is_disable_clickable_link].present? ? '#' : document_doctrine_path(document_id, id)%>"> |
||||||
<div class="card card-header row-flex m-3 clickable-link" href="<%= document_doctrine_path(document_id, id)%>"> |
<% if opts[:is_subjects_index].blank? %> |
||||||
<h4> <%= subjects.present? ? subjects.map(&:lineage_name).join(" <br> ") : "(No Subjects Provided)" %> </h4> |
<% if opts[:is_doctrines_index].present? && opts[:subject_ids].reject(&:blank?).present? %> |
||||||
|
<h4> <%= subjects.where(id: opts[:subject_ids].map(&:to_i)).map(&:lineage_name).join(" ") %> </h4> |
||||||
<div class="container-sm ms-3"> |
<% elsif subjects.present? %> |
||||||
<p class="mb-0"> <%= raw content.html_safe %> </p> |
<% subjects.each do |subject| %> |
||||||
|
<h4> <%= subject.lineage_name %> </h4> |
||||||
|
<% end %> |
||||||
|
<% else %> |
||||||
|
<h4> (No Subjects Provided) </h4> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<div class="container-sm <%= opts[:is_subjects_index].present? ? 'm-0 ps-0' : 'ms-3' %>"> |
||||||
|
<p class="mb-0"> <%= raw content.html_safe %> </p> |
||||||
|
|
||||||
<% annotations.each do |annotation| %> |
<% annotations.each do |annotation| %> |
||||||
<div class="container-sm ms-5"> |
<div class="container-sm ms-5"> |
||||||
<p class="mb-0"> |
<p class="mb-0"> |
||||||
<strong> |
<strong> |
||||||
<%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")} #{[annotation.document.title, annotation.document.reference_number, annotation.document.docdate.strftime("%B %d, %Y"), annotation.phil_rep].join(', ')}" %> |
<%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")} #{[annotation.document.title, annotation.document.reference_number, annotation.document.docdate.strftime("%B %d, %Y"), annotation.phil_rep].join(', ')}" %> |
||||||
</strong> |
</strong> |
||||||
</p> |
</p> |
||||||
|
|
||||||
<% if annotation.editor_notes.present? %> |
<% if annotation.editor_notes.present? %> |
||||||
<span class="m-5"> Editors Note: <%= annotation.editor_notes %> </span> |
<span class="m-5"> Editors Note: <%= annotation.editor_notes %> </span> |
||||||
<% end %> |
<% end %> |
||||||
</div> |
</div> |
||||||
<% end %> |
<% end %> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
<% end %> |
</div> |
||||||
|
|||||||
@ -1,3 +1,3 @@ |
|||||||
<div class="card container-sm mt-1"> |
<div class="card container-sm mt-1 p-0"> |
||||||
<%= render(DocumentDoctrineIndexComponent.with_collection(@doctrines, current_user: current_user, opts: { is_index: true })) %> |
<%= render(DocumentDoctrineIndexComponent.with_collection(@doctrines, current_user: current_user, opts: { is_disable_clickable_link: true, is_doctrines_index: true, subject_ids: params[:subject_ids] })) %> |
||||||
</div> |
</div> |
||||||
|
|||||||
@ -1,23 +1,6 @@ |
|||||||
<div class="container-fluid mt-2 p-0"> |
<div class="card container-sm mt-1 p-0"> |
||||||
<div class="col-sm-12"> |
<h5 class="card-header"> <%= @subject_index.lineage_name %> </h5> |
||||||
<div class="card"> |
<div class="card-body"> |
||||||
<div class="card-header"> |
<%= render(DocumentDoctrineIndexComponent.with_collection(@doctrines, current_user: current_user, opts: { is_subjects_index: true, is_disable_clickable_link: true })) %> |
||||||
<h2> <%= @subject_index.name %> |
|
||||||
<% if can? :destroy, Cdao::Subject %> |
|
||||||
<a href="<%= subject_index_path(@subject_index) %>" class="btn btn-sm btn-danger right-0" data-confirm="Are you sure you want to delete this subject?" data-method="DELETE" role="button"> |
|
||||||
<i class="fas fa-trash-alt" data-toggle="tooltip" data-placement="bottom" title="Delete"></i> |
|
||||||
</a> |
|
||||||
<% end %> |
|
||||||
<% if can? :update, Cdao::Subject %> |
|
||||||
<a href="<%= edit_subject_index_path(@subject_index) %>" class="btn btn-sm btn-danger right-0" role="button"> |
|
||||||
<i class="fas fa-edit" data-toggle="tooltip" data-placement="bottom" title="Edit"></i> |
|
||||||
</a> |
|
||||||
<% end %> |
|
||||||
</h2> |
|
||||||
</div> |
|
||||||
<div class="card-body"> |
|
||||||
<%= render(SubjectAccordionComponent.new(current_user: current_user, parent: @subject_index)) %> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|||||||
Loading…
Reference in new issue