diff --git a/app/components/document_doctrine_index_component.rb b/app/components/document_doctrine_index_component.rb
index 94bb04a..3a84c62 100644
--- a/app/components/document_doctrine_index_component.rb
+++ b/app/components/document_doctrine_index_component.rb
@@ -21,4 +21,12 @@ class DocumentDoctrineIndexComponent < BaseComponent
def annotation_form_url
doctrine_annotations_path(doctrine_id: id)
end
+
+ def subject_names
+ "(No Subjects Provided)"
+ end
+
+ def render?
+ doctrine.present? && doctrine.persisted?
+ end
end
diff --git a/app/components/document_doctrine_index_component/document_doctrine_index_component.html.erb b/app/components/document_doctrine_index_component/document_doctrine_index_component.html.erb
index 7a7adb4..3496bc1 100644
--- a/app/components/document_doctrine_index_component/document_doctrine_index_component.html.erb
+++ b/app/components/document_doctrine_index_component/document_doctrine_index_component.html.erb
@@ -1,23 +1,31 @@
-<% if id.present? %>
-
-
-
- <% Cdao::Subject.roots.each do |root| %>
-
- <% end %>
-
-
+ <%= render(SubjectsSidenavSubMenuComponent.new(current_user: current_user, opts: { is_subjects_index: true, main_sub_menu: "mainSubjectIndexSubMenu", second_sub_menu: "secondSubjectIndexSubMenu", third_sub_menu: "thirdSubjectIndexSubMenu", fourth_sub_menu: "fourthSubjectIndexSubMenu", fifth_sub_menu: "fifthSubjectIndexSubMenu" })) %>
diff --git a/app/components/subjects_sidenav_sub_menu_component.rb b/app/components/subjects_sidenav_sub_menu_component.rb
index ccde43a..d26651d 100644
--- a/app/components/subjects_sidenav_sub_menu_component.rb
+++ b/app/components/subjects_sidenav_sub_menu_component.rb
@@ -5,7 +5,9 @@ class SubjectsSidenavSubMenuComponent < BaseComponent
@opts = opts
end
- def doctrines_search_url(subject_id)
- doctrines_path(subject_ids: [subject_id])
+ def index_url(subject_id)
+ return doctrines_path(subject_ids: [subject_id]) if opts[:is_doctrines_index].present?
+
+ subject_index_path(subject_id)
end
end
diff --git a/app/components/subjects_sidenav_sub_menu_component/subjects_sidenav_sub_menu_component.html.erb b/app/components/subjects_sidenav_sub_menu_component/subjects_sidenav_sub_menu_component.html.erb
index a5c862d..eb2163d 100644
--- a/app/components/subjects_sidenav_sub_menu_component/subjects_sidenav_sub_menu_component.html.erb
+++ b/app/components/subjects_sidenav_sub_menu_component/subjects_sidenav_sub_menu_component.html.erb
@@ -6,10 +6,10 @@
@@ -22,10 +22,10 @@
@@ -37,10 +37,10 @@
@@ -51,11 +51,11 @@
@@ -64,7 +64,7 @@
<% sub3.children.each do |sub4| %>
<% end if sub3.children.present? %>
diff --git a/app/controllers/subject_indexes_controller.rb b/app/controllers/subject_indexes_controller.rb
index b30581c..5546125 100644
--- a/app/controllers/subject_indexes_controller.rb
+++ b/app/controllers/subject_indexes_controller.rb
@@ -9,7 +9,9 @@ class SubjectIndexesController < ApplicationController
def edit; end
- def show; end
+ def show
+ @doctrines = @subject_index.doctrines
+ end
def search
@search = search_subject(search_params)
diff --git a/app/views/doctrines/index.html.erb b/app/views/doctrines/index.html.erb
index 7cd73ed..af9baea 100644
--- a/app/views/doctrines/index.html.erb
+++ b/app/views/doctrines/index.html.erb
@@ -1,3 +1,3 @@
-
- <%= 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] })) %>
diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb
index 7058286..e0f3e2f 100644
--- a/app/views/documents/show.html.erb
+++ b/app/views/documents/show.html.erb
@@ -17,7 +17,7 @@
-