Browse Source

Merge pull request #24 from lexintegritastech/improve-main-ui

Minor Updates 02/09/2022
pull/25/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
3e3f907d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb
  2. 14
      app/views/document/doctrines/show.html.erb

4
app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb

@ -148,10 +148,6 @@
<% doctrine.annotations.order(rank: :asc).each do |annotation| %>
<div class="row">
<div class="col-sm-10">
<% document_title = annotation.doctrine.document.short_title || annotation.doctrine.document.title %>
<% date_or_year = annotation.doctrine.document.docdate.present? ? annotation.doctrine.document.docdate.to_date.strftime("%B %d, %Y") : annotation.document.year %>
<span> <%= [document_title, annotation.document.reference_number, date_or_year].join(", ") %> </span>
<p class="pb-0 ms-3">
<strong> <%= "#{annotation.annomarks.map { |annomark| "(#{annomark.code})" }.join(" ")}" %> </strong>
<% document_title = annotation.document.short_title || annotation.document.title %>

14
app/views/document/doctrines/show.html.erb

@ -18,6 +18,18 @@
</div>
<div class="card-body">
<%= render(DocumentDoctrineShowComponent.new(current_user: current_user, doctrine: @doctrine, subjects: @subjects)) %>
<div class="row">
<div class="d-flex justify-content-end p-3">
<a class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Add Doctrine </a>
</div>
<div class="container-sm row-flex col-sm-12 mt-2">
<%= render(DoctrineModalFormComponent.new(current_user: current_user, doctrine: @document.doctrines.new, subjects: @subjects.order(name: :asc), opts: { form_url: jurisprudence_doctrines_path(jurisprudence_id: @document.id), form_method: :post })) %>
</div>
</div>
<div class="row">
<%= render(DocumentDoctrineShowComponent.new(current_user: current_user, doctrine: @doctrine, subjects: @subjects)) %>
</div>
</div>
</div>

Loading…
Cancel
Save