You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
628 B
23 lines
628 B
class DocumentIndexTableComponent < BaseComponent |
|
with_collection_parameter :search_result |
|
attr_reader :search_result, :opts |
|
|
|
def initialize(search_result:, current_user:, opts: {}) |
|
@search_result = search_result |
|
@opts = opts |
|
end |
|
|
|
delegate :reference_number, to: :search_result |
|
delegate :title, to: :search_result |
|
delegate :short_title, to: :search_result |
|
|
|
def date_or_year |
|
return search_result.docdate.strftime("%m/%d/%Y") if search_result.docdate.present? |
|
|
|
search_result.year |
|
end |
|
|
|
def doctrine_annotations_path(doctrine_id) |
|
doctrine_annotations_path(doctrine_id: doctrine_id) |
|
end |
|
end
|
|
|