Add rel attribute with nofollow value.
This commit is contained in:
@@ -12,6 +12,12 @@ module DocumentsHelper
|
||||
Hash[Document.sources.map { |k,v| [k, Document.human_attribute_name("document.#{k}")] }]
|
||||
end
|
||||
|
||||
def document_link_url(document)
|
||||
uri = URI.parse(document.link)
|
||||
return document.link if uri.scheme == "http" || uri.scheme == "https"
|
||||
"http://#{document.link}"
|
||||
end
|
||||
|
||||
def bytesToMeg(bytes)
|
||||
bytes / Numeric::MEGABYTE
|
||||
end
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
<%= document.title %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= link_to t('documents.buttons.download_document'), document.attachment.url, target: :blank, class: 'button hollow' %>
|
||||
<%= link_to t('documents.buttons.download_document'),
|
||||
document.attachment.url,
|
||||
target: "_blank",
|
||||
rel: "nofollow",
|
||||
class: 'button hollow' %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<% if can? :destroy, Document %>
|
||||
|
||||
Reference in New Issue
Block a user