Files
grecia/app/helpers/documents_helper.rb
2021-07-13 16:58:13 +02:00

11 lines
365 B
Ruby

module DocumentsHelper
def document_item_link(document)
info_text = "#{document.humanized_content_type} | #{number_to_human_size(document.attachment_file_size)}"
link_to safe_join([document.title, tag.small("(#{info_text})")], " "),
document.attachment.url,
target: "_blank",
title: t("shared.target_blank")
end
end