Browse Source

Merge pull request #85 from lexintegritastech/feature-enhance-ui

Add back button in doctrine show
pull/86/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
28a8095e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/components/doctrine_index_component/doctrine_index_component.html.erb
  2. 55
      app/views/document/doctrines/show.html.erb

2
app/components/doctrine_index_component/doctrine_index_component.html.erb

@ -1,4 +1,4 @@
<div class="row-flex m-3 mt-0 doctrine-content-body clickable-link" href="<%= jurisprudence.present? ? document_doctrine_path(jurisprudence.id, id, is_index_table: false, section_ids: opts[:subject_ids].reject(&:blank?)) : doctrine_path(id, is_index_table: false)%>"> <div class="row-flex m-3 mt-0 doctrine-content-body clickable-link" href="<%= jurisprudence.present? ? document_doctrine_path(jurisprudence.id, id, is_index_table: false, subject_ids: opts[:subject_ids].reject(&:blank?)) : doctrine_path(id, is_index_table: false)%>">
<% if opts[:subject_ids].reject(&:blank?).present? %> <% if opts[:subject_ids].reject(&:blank?).present? %>
<h5 style="color: darkred;"> <%= subjects.where(id: opts[:subject_ids].map(&:to_i)).map(&:lineage_name).join("") %> </h5> <h5 style="color: darkred;"> <%= subjects.where(id: opts[:subject_ids].map(&:to_i)).map(&:lineage_name).join("") %> </h5>
<% else %> <% else %>

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

@ -1,20 +1,43 @@
<div class="card mt-1 g-3"> <div class="card mt-1 g-3" style="width: 98%; margin: 0 auto;">
<div class="card-header mb-0 col-sm-12"> <div class="card-header mb-0 p-0">
<table class="table table-borderless mb-0"> <div class="container-fluid p-2 card-header">
<tbody> <div class="row">
<tr> <div class="col-lg-12">
<td class="text-start" style="width: 160px;"> Reference Number: </td> <div class="row">
<td class="text-start"> <strong> <%= @document.reference_number %> </strong> </td> <div class="col-lg-6">
<td class="text-end" style="width: 50px;" > Date: </td> <a href="<%= search_doctrines_path(is_index_table: params[:is_index_table], subject_ids: params[:subject_ids] )%>"> <i class="fas fa-angle-double-left" style="font-size: 20px;color: darkred;" data-bs-toggle="tooltip" data-bs-placement="right" title="Back to index"></i> </a>
<td class="text-end" style="width: 160px;"> <strong> <%= @document.docdate.present? ? @document.docdate.strftime("%m/%d/%Y") : @document.year %> </strong> </td> </div>
</tr> <div class="col-lg-3 text-end">
<b>Date : </b>
</div>
<div class="col-lg-3 text-end">
<b><%= @document.docdate.present? ? @document.docdate.strftime("%m/%d/%Y") : @document.year %> </b>
</div>
</div>
</div>
<tr> <div class="col-lg-12 mt-2 mb-2">
<td style="width: 160px;" class="text-start"> Title: </td> <div class="row">
<td colspan="3" class="text-start"> <strong> <%= @document.title %> </strong> </td> <div class="col-lg-3">
</tr> Reference Number :
</tbody> </div>
</table> <div class="col-lg-9">
<b><%= @document.reference_number %></b>
</div>
</div>
</div>
<div class="col-lg-12 mb-2">
<div class="row">
<div class="col-lg-3">
Title :
</div>
<div class="col-lg-9">
<strong> <%= @document.short_title || @document.title %> </strong>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<div class="card-body pt-0"> <div class="card-body pt-0">

Loading…
Cancel
Save