Skip to content
Snippets Groups Projects
Commit d70d3787 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

publications urls

parent 5cdcaf0f
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,10 @@ class Research::Publication < ApplicationRecord
"#{DOI_PREFIX}#{doi}"
end
def best_url
doi_url || url || hal_url
end
def to_s
"#{title}"
end
......
......@@ -82,12 +82,7 @@ publications:
ref: >
<%= prepare_html_for_static publication.ref, @website.university %>
date: "<%= publication.publication_date&.iso8601 %>"
url: >
<%= prepare_text_for_static publication.url %>
hal_url: >
<%= prepare_text_for_static publication.hal_url %>
doi_url: >
<%= prepare_text_for_static publication.doi_url %>
url: "<%= publication.best_url %>"
<% end %>
<% end %>
<%= render 'admin/communication/blocks/static', about: @about %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment