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.
24 lines
546 B
24 lines
546 B
class DoctrineIndexTableComponent < BaseComponent |
|
attr_reader :search_results, :opts |
|
|
|
def initialize(current_user:, search_results:, opts: {}) |
|
@search_results = search_results |
|
@opts = opts |
|
end |
|
|
|
def document_reference_number(document) |
|
document.reference_number |
|
end |
|
|
|
def document_title(document) |
|
return document.short_title if document.short_title.present? |
|
|
|
document.title |
|
end |
|
|
|
def date_or_year(document) |
|
return document.docdate.strftime("%m/%d/%Y") if document.docdate.present? |
|
|
|
document.year |
|
end |
|
end
|
|
|