From 763add5169488b8347ed12bbfe7cf798337ad5d0 Mon Sep 17 00:00:00 2001 From: alexdbondoc17 Date: Tue, 22 Feb 2022 03:46:58 +0000 Subject: [PATCH 1/4] Improve UI for `decisions` --- app/views/decisions/index.html.erb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/views/decisions/index.html.erb b/app/views/decisions/index.html.erb index c125eeb..339f1e6 100644 --- a/app/views/decisions/index.html.erb +++ b/app/views/decisions/index.html.erb @@ -1,6 +1,15 @@ -
-

Select Year

-
- <%= render(DocumentsYearsComponent.new(current_user: current_user, years: @years)) %> +
+
+
-
+
+
+

Select Year

+
+ <%= render(DocumentsYearsComponent.new(current_user: current_user, years: @years)) %> +
+
+
+
From 703b20b2811e98348ae277c9e7995cbac43eceb1 Mon Sep 17 00:00:00 2001 From: alexdbondoc17 Date: Tue, 22 Feb 2022 05:06:43 +0000 Subject: [PATCH 2/4] Fix `routing` for `doctrines` --- app/components/subject_accordion_component.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/subject_accordion_component.rb b/app/components/subject_accordion_component.rb index e4bd1cb..45d10ca 100644 --- a/app/components/subject_accordion_component.rb +++ b/app/components/subject_accordion_component.rb @@ -28,8 +28,8 @@ class SubjectAccordionComponent < BaseComponent end def custom_url - return search_doctrines_path(subject_ids: [search_result["id"]], is_index_table: false) if opts[:accordionFor].present? && opts[:accordionFor].to_s.eql?("subjects") - return search_doctrines_path(subject_ids: [search_result["id"]], is_index_table: true) if opts[:accordionFor].present? && opts[:accordionFor].to_s.eql?("doctrines") + return search_doctrines_path(subject_ids: [search_result["id"]], is_index_table: true) if opts[:accordionFor].present? && opts[:accordionFor].to_s.eql?("subjects") + return search_doctrines_path(subject_ids: [search_result["id"]], is_index_table: false) if opts[:accordionFor].present? && opts[:accordionFor].to_s.eql?("doctrines") return subject_index_path(search_result["id"]).blank? end From 359f084f77e6e86bb455dd438e2bd4d75c075214 Mon Sep 17 00:00:00 2001 From: alexdbondoc17 Date: Tue, 22 Feb 2022 08:23:21 +0000 Subject: [PATCH 3/4] Enhance background of buttons --- .../analysis_form_component.html.erb | 4 ++-- .../annotation_marks_modal_form_component.html.erb | 6 +++--- .../doctrine_modal_form_component.html.erb | 4 ++-- .../document_doctrine_show_component.html.erb | 12 ++++++------ .../subject_index_form_component.html.erb | 4 ++-- .../_document_search_results_table.html.erb | 4 ++-- app/views/document/doctrines/show.html.erb | 2 +- app/views/documents/show.html.erb | 2 +- app/views/subject_indexes/index.html.erb | 4 ++-- app/views/subject_indexes/show.html.erb | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/app/components/analysis_form_component/analysis_form_component.html.erb b/app/components/analysis_form_component/analysis_form_component.html.erb index 49b9f74..85f5411 100644 --- a/app/components/analysis_form_component/analysis_form_component.html.erb +++ b/app/components/analysis_form_component/analysis_form_component.html.erb @@ -17,7 +17,7 @@
- +
@@ -28,7 +28,7 @@
- <%= button_tag "search", class: "btn btn-primary" %> + <%= button_tag "search", class: "btn btn-success" %>
diff --git a/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb b/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb index d38c43b..a83afdd 100644 --- a/app/components/annotation_marks_modal_form_component/annotation_marks_modal_form_component.html.erb +++ b/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" } %>
- +
@@ -65,8 +65,8 @@
diff --git a/app/components/doctrine_modal_form_component/doctrine_modal_form_component.html.erb b/app/components/doctrine_modal_form_component/doctrine_modal_form_component.html.erb index de157f1..4ba6b7c 100644 --- a/app/components/doctrine_modal_form_component/doctrine_modal_form_component.html.erb +++ b/app/components/doctrine_modal_form_component/doctrine_modal_form_component.html.erb @@ -30,8 +30,8 @@ diff --git a/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb b/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb index dfc2acf..1ea7ef0 100644 --- a/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb +++ b/app/components/document_doctrine_show_component/document_doctrine_show_component.html.erb @@ -6,8 +6,8 @@
- Edit - Delete + Edit + Delete
@@ -51,7 +51,7 @@
- +
@@ -61,7 +61,7 @@ <%= text_field_tag :q, nil, class: "form-control", placeholder: "Search GR Number", data: { target: "document.input" } %>
- <%= button_tag "Search", class: "btn btn-primary", data: { action: "click->document#search" } %> + <%= button_tag "Search", class: "btn btn-success", data: { action: "click->document#search" } %>
@@ -104,11 +104,11 @@
- Edit - Delete + Delete
diff --git a/app/components/subject_index_form_component/subject_index_form_component.html.erb b/app/components/subject_index_form_component/subject_index_form_component.html.erb index e028680..ceca007 100644 --- a/app/components/subject_index_form_component/subject_index_form_component.html.erb +++ b/app/components/subject_index_form_component/subject_index_form_component.html.erb @@ -18,8 +18,8 @@
- <%= submit_tag "Save", class: "btn btn-primary" %> - + <%= submit_tag "Save", class: "btn btn-success" %> +
<% end %> diff --git a/app/views/document/doctrines/_document_search_results_table.html.erb b/app/views/document/doctrines/_document_search_results_table.html.erb index 07a55c3..d517b28 100644 --- a/app/views/document/doctrines/_document_search_results_table.html.erb +++ b/app/views/document/doctrines/_document_search_results_table.html.erb @@ -8,7 +8,7 @@ <% date_or_year = search_result.doc_date || search_result.year %> <% title = search_result.short_title || search_result.title %> - @@ -19,7 +19,7 @@ <% if opts[:is_citing_document].present? %> -
diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 3679071..feae561 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -60,7 +60,7 @@
<%= render(DoctrineModalFormComponent.new(current_user: current_user)) %> diff --git a/app/views/subject_indexes/index.html.erb b/app/views/subject_indexes/index.html.erb index e937cba..65f9df3 100644 --- a/app/views/subject_indexes/index.html.erb +++ b/app/views/subject_indexes/index.html.erb @@ -11,11 +11,11 @@ <% if root.children.present? %> <% 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 %>
diff --git a/app/views/subject_indexes/show.html.erb b/app/views/subject_indexes/show.html.erb index ceb82a5..d4fb851 100644 --- a/app/views/subject_indexes/show.html.erb +++ b/app/views/subject_indexes/show.html.erb @@ -24,8 +24,8 @@
@@ -34,7 +34,7 @@

Sub Levels

- +
From 5e3664af47207cc73aafb66ff0ce671d46a8b6f6 Mon Sep 17 00:00:00 2001 From: alexdbondoc17 Date: Tue, 22 Feb 2022 11:33:24 +0000 Subject: [PATCH 4/4] Implement `subject_accordion_component` for `subject_indexes#index` --- .../sidenav_component.html.erb | 4 +- app/components/subject_accordion_component.rb | 5 +- .../subject_accordion_component.html.erb | 66 ++++++++++++++----- app/views/layouts/application.html.erb | 4 +- app/views/subject_indexes/index.html.erb | 13 +++- 5 files changed, 65 insertions(+), 27 deletions(-) diff --git a/app/components/sidenav_component/sidenav_component.html.erb b/app/components/sidenav_component/sidenav_component.html.erb index a0c8e1a..fa2fd91 100644 --- a/app/components/sidenav_component/sidenav_component.html.erb +++ b/app/components/sidenav_component/sidenav_component.html.erb @@ -89,14 +89,14 @@