diff --git a/app/components/pagination_component.rb b/app/components/pagination_component.rb index 61d33ee..1fb9ea7 100644 --- a/app/components/pagination_component.rb +++ b/app/components/pagination_component.rb @@ -10,4 +10,12 @@ class PaginationComponent < BaseComponent Cdao::Subject.where(id: opts[:subject_ids].map(&:to_i)) end + + def custom_url(id) + return search_doctrines_path(is_index_table: true, subject_ids: [id]) if opts[:is_index_table].present? && opts[:is_index_table].to_s.eql?("true") + return search_doctrines_path( is_index_table: false, subject_ids: [id]) if opts[:is_index_table].present? && opts[:is_index_table].to_s.eql?("false") + + search_doctrines_path(id) + end + end diff --git a/app/components/pagination_component/pagination_component.html.erb b/app/components/pagination_component/pagination_component.html.erb index a6d80f5..37e8bfa 100644 --- a/app/components/pagination_component/pagination_component.html.erb +++ b/app/components/pagination_component/pagination_component.html.erb @@ -1,33 +1,30 @@ -