Browse Source

Enhance background of buttons

pull/52/head
alexdbondoc17 4 years ago
parent
commit
359f084f77
  1. 4
      app/components/analysis_form_component/analysis_form_component.html.erb
  2. 6
      app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb
  3. 4
      app/components/doctrine_modal_form_component/doctrine_modal_form_component.html.erb
  4. 12
      app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb
  5. 4
      app/components/subject_index_form_component/subject_index_form_component.html.erb
  6. 4
      app/views/document/doctrines/_document_search_results_table.html.erb
  7. 2
      app/views/document/doctrines/show.html.erb
  8. 2
      app/views/documents/show.html.erb
  9. 4
      app/views/subject_indexes/index.html.erb
  10. 6
      app/views/subject_indexes/show.html.erb

4
app/components/analysis_form_component/analysis_form_component.html.erb

@ -17,7 +17,7 @@
<div class="row">
<div class="col-sm-11 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-success" data-bs-toggle="collapse" data-bs-target="#caseListsCollapse" aria-expanded="false" aria-controls="collapseExample"> Case Lists </button>
</div>
</div>
@ -28,7 +28,7 @@
</div>
<div class="col-sm-1 p-2">
<%= button_tag "search", class: "btn btn-primary" %>
<%= button_tag "search", class: "btn btn-success" %>
</div>
</div>

6
app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb

@ -32,7 +32,7 @@
<%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "annotations.q" } %>
</div>
<div class="col-sm-1 p-2">
<button type="button" class="btn btn-primary" data-action="click->annotations#searchDocument"> Search </button>
<button type="button" class="btn btn-success" data-action="click->annotations#searchDocument"> Search </button>
</div>
</div>
@ -65,8 +65,8 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-action="click->annotations#save"> Save </button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-success" data-action="click->annotations#save"> Save </button>
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>

4
app/components/doctrine_modal_form_component/doctrine_modal_form_component.html.erb

@ -30,8 +30,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-action="click->doctrines#save">Save</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-success" data-action="click->doctrines#save">Save</button>
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>

12
app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb

@ -6,8 +6,8 @@
</div>
<div class="col-sm-2 d-flex justify-content-end pe-0" data-controller="doctrines" data-document-id="<%= document_id %>" data-doctrine-id="<%= id %>" >
<a class="btn btn-sm btn-secondary me-3"data-action="click->doctrines#renderForm" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Edit </a>
<a class="btn btn-sm btn-danger" data-action="click->doctrines#delete" > Delete </a>
<a class="btn btn-success me-3"data-action="click->doctrines#renderForm" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Edit </a>
<a class="btn btn-danger" data-action="click->doctrines#delete" > Delete </a>
</div>
</div>
@ -51,7 +51,7 @@
<div class="row">
<div class="col-sm-10"> </div>
<div class="col-sm-2 p-2">
<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>
<button type="button" class="btn btn-success d-block ms-auto" data-bs-toggle="collapse" data-bs-target="#caseListsCollapse" aria-expanded="false" aria-controls="collapseExample"> Case Lists </button>
</div>
</div>
@ -61,7 +61,7 @@
<%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "document.input" } %>
</div>
<div class="col p-2">
<%= button_tag "Search", class: "btn btn-primary", data: { action: "click->document#search" } %>
<%= button_tag "Search", class: "btn btn-success", data: { action: "click->document#search" } %>
</div>
</div>
@ -104,11 +104,11 @@
</div>
<div class="col-sm-2 d-flex justify-content-end align-items-baseline">
<a class="btn btn-sm btn-secondary me-3" data-bs-toggle="modal" data-bs-target="#annotationModal"
<a class="btn btn-secondary me-3" data-bs-toggle="modal" data-bs-target="#annotationModal"
data-controller="annotations" data-doctrine-id="<%= id %>" data-annotation-id="<%= annotation.id %>"
data-document-title="<%= citing_document_title %>"
data-action="click->annotations#renderForm"> 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-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>

4
app/components/subject_index_form_component/subject_index_form_component.html.erb

@ -18,8 +18,8 @@
<div class="row">
<div class="col-sm-12 d-flex justify-content-end p-2">
<%= submit_tag "Save", class: "btn btn-primary" %>
<button type="button" class="btn btn-secondary" href="<%= subject_indexes_path() %>"> Back </button>
<%= submit_tag "Save", class: "btn btn-success" %>
<button type="button" class="btn btn-danger" href="<%= subject_indexes_path() %>"> Back </button>
</div>
</div>
<% end %>

4
app/views/document/doctrines/_document_search_results_table.html.erb

@ -8,7 +8,7 @@
<td>
<% date_or_year = search_result.doc_date || search_result.year %>
<% title = search_result.short_title || search_result.title %>
<a class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#annotationModal" data-controller="annotations"
<a class="btn btn-success" data-bs-toggle="modal" data-bs-target="#annotationModal" data-controller="annotations"
data-doctrine-id="<%= opts[:doctrine_id] %>" data-document-id="<%= search_result.id %>" data-document-title="<%= title %>"
data-document-reference-number="<%= search_result.clean_reference_number %>" data-document-date-or-year="<%= date_or_year %>"
data-document-phil-rep="<%= search_result.phil_rep %>" data-action="click->annotations#renderForm">
@ -19,7 +19,7 @@
<% if opts[:is_citing_document].present? %>
<td>
<a class="btn btn-sm btn-primary" data-controller="annotations" data-document-id="<%= search_result.id %>"
<a class="btn btn-success" data-controller="annotations" data-document-id="<%= search_result.id %>"
data-document-reference-number="<%= search_result.clean_reference_number %>"
data-document-date="<%= search_result.doc_date || search_result.year %>"
data-document-title="<%= search_result.short_title || search_result.title %>"

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

@ -20,7 +20,7 @@
<div class="card-body pt-0">
<div class="row">
<div class="d-flex justify-content-end p-2">
<a class="btn btn-sm btn-primary" data-controller="doctrines" data-document-id="<%= @document.id %>" data-action="click->doctrines#renderForm" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Add Doctrine </a>
<a class="btn btn-success" data-controller="doctrines" data-document-id="<%= @document.id %>" data-action="click->doctrines#renderForm" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Add Doctrine </a>
</div>
</div>

2
app/views/documents/show.html.erb

@ -60,7 +60,7 @@
<div class="tab-pane fade show active" id="analysisTabContent" role="tabpanel" aria-labelledby="home-tab">
<div class="row">
<div class="d-flex justify-content-end" style="margin: 10px 0 0 -20px;">
<a class="btn btn-sm btn-primary" data-controller="doctrines" data-document-id="<%= @document.id %>" data-action="click->doctrines#renderForm" data-bs-toggle="modal" data-bs-target="#doctrineModal"> Add Doctrine </a>
<a class="btn btn-success" data-controller="doctrines" data-document-id="<%= @document.id %>" data-action="click->doctrines#renderForm" 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)) %>

4
app/views/subject_indexes/index.html.erb

@ -11,11 +11,11 @@
<% if root.children.present? %>
<div class="accordion-button collapsed m-0 p-0" data-bs-toggle="collapse" data-bs-target="#<%= ["rootLevel", root.id].join %>">
<%= link_to root.name, subject_index_path(root.id), class: "accordion-link text-decoration-none text-dark d-block sub1 clickable-link" %>
<%= link_to "Add Sub Level", new_subject_index_path(parent_id: root.id), class: "btn btn-sm btn-primary text-decoration-none d-block sub1 clickable-link position-absolute end-0 me-5" %>
<%= link_to "Add Sub Level", new_subject_index_path(parent_id: root.id), class: "btn btn-success text-decoration-none d-block sub1 clickable-link position-absolute end-0 me-5" %>
</div>
<% else %>
<%= link_to root.name, subject_index_path(root.id), class: "accordion-link text-decoration-none text-dark d-block sub1 clickable-link" %>
<%= link_to "Add Sub Level", new_subject_index_path(parent_id: root.id), class: "btn btn-sm btn-primary text-decoration-none d-block sub1 clickable-link position-absolute end-0 accordion-action-button-margin" %>
<%= link_to "Add Sub Level", new_subject_index_path(parent_id: root.id), class: "btn btn-success text-decoration-none d-block sub1 clickable-link position-absolute end-0 accordion-action-button-margin" %>
<% end %>
</div>

6
app/views/subject_indexes/show.html.erb

@ -24,8 +24,8 @@
</div>
<div class="col-sm-2 position-relative">
<a class="btn btn-sm btn-secondary m-1" href="<%= edit_subject_index_path(@subject_index) %>"> Edit </a>
<a class="btn btn-sm btn-danger m-1" href="<%= subject_index_path(@subject_index) %>" data-confirm="Are you sure to delete this record?" data-method="DELETE"> Delete </a>
<a class="btn btn-secondary m-1" href="<%= edit_subject_index_path(@subject_index) %>"> Edit </a>
<a class="btn btn-danger m-1" href="<%= subject_index_path(@subject_index) %>" data-confirm="Are you sure to delete this record?" data-method="DELETE"> Delete </a>
</div>
</div>
</div>
@ -34,7 +34,7 @@
<div class="card-header">
<div class="row">
<div class="col-sm-11"> <h4> Sub Levels </h4> </div>
<div class="col-sm-1 justify-content-end"> <a class="btn btn-sm btn-primary p-1" href="<%= new_subject_index_path(parent_id: @subject_index) %>"> Add </a> </div>
<div class="col-sm-1 justify-content-end"> <a class="btn btn-success p-1" href="<%= new_subject_index_path(parent_id: @subject_index) %>"> Add </a> </div>
</div>
</div>
<div class="card-body">

Loading…
Cancel
Save