From 1948e49392056aefbba4b3322d84d1be9b3f845a Mon Sep 17 00:00:00 2001 From: alexdbondoc17 Date: Wed, 2 Mar 2022 00:27:18 +0000 Subject: [PATCH] Fix component for `doctrines#index` --- app/components/doctrine_index_component.rb | 6 ++++++ .../doctrine_index_component.html.erb | 10 ++-------- .../document_doctrine_index_component.html.erb | 4 ++-- app/views/doctrines/search.html.erb | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/components/doctrine_index_component.rb b/app/components/doctrine_index_component.rb index 60bfc60..50218c0 100644 --- a/app/components/doctrine_index_component.rb +++ b/app/components/doctrine_index_component.rb @@ -40,6 +40,12 @@ class DoctrineIndexComponent < BaseComponent annotation.document.year end + def show_url + return document_doctrine_path(jurisprudence.id, id, is_index_table: false, subject_ids: opts[:subject_ids].reject(&:blank?)) if jurisprudence.present? + + doctrine_path(id, is_index_table: false, subject_ids: opts[:subject_ids].reject(&:blank?)) + end + def render? doctrine.present? && doctrine.persisted? end diff --git a/app/components/doctrine_index_component/doctrine_index_component.html.erb b/app/components/doctrine_index_component/doctrine_index_component.html.erb index a6a7a15..a442775 100644 --- a/app/components/doctrine_index_component/doctrine_index_component.html.erb +++ b/app/components/doctrine_index_component/doctrine_index_component.html.erb @@ -1,10 +1,4 @@ -