diff --git a/app/components/document_index_table_component.rb b/app/components/document_index_table_component.rb index 9162df3..8138862 100644 --- a/app/components/document_index_table_component.rb +++ b/app/components/document_index_table_component.rb @@ -20,4 +20,9 @@ class DocumentIndexTableComponent < BaseComponent def doctrine_annotations_path(doctrine_id) doctrine_annotations_path(doctrine_id: doctrine_id) end + + def show_url + return document_path(search_result.id, is_citator_tab: true) if opts[:is_citator_tab].present? + document_path(search_result.id, opts[:search_params]) + end end diff --git a/app/components/document_index_table_component/document_index_table_component.html.erb b/app/components/document_index_table_component/document_index_table_component.html.erb index 5a42c81..88bc448 100644 --- a/app/components/document_index_table_component/document_index_table_component.html.erb +++ b/app/components/document_index_table_component/document_index_table_component.html.erb @@ -1,4 +1,4 @@ - + <%= clean_reference_number %> <%= short_title || title %> <%= date_or_year %> diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index ca43965..bb031f2 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -20,7 +20,7 @@ - <%= render(DocumentIndexTableComponent.with_collection(@jurisprudences, current_user: current_user, opts: {})) %> + <%= render(DocumentIndexTableComponent.with_collection(@jurisprudences, current_user: current_user, opts: { search_params: @search_params.to_unsafe_h })) %> diff --git a/app/views/documents/search.html.erb b/app/views/documents/search.html.erb index 81147a0..5a9bba0 100644 --- a/app/views/documents/search.html.erb +++ b/app/views/documents/search.html.erb @@ -14,7 +14,7 @@ Date - <%= render(DocumentIndexTableComponent.with_collection(@jurisprudences, current_user: current_user)) %> + <%= render(DocumentIndexTableComponent.with_collection(@jurisprudences, current_user: current_user, opts: { search_params: @search_params.to_unsafe_h })) %> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index c676889..a6467c5 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -11,6 +11,9 @@
+ <% if params[:is_document_view].blank? && params[:is_citator_tab].blank? %> + Back + <% end %>
Date : @@ -49,7 +52,7 @@