Skip to content

Link DOIs to preferred resolver #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/views/publications/_publication_preview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<%= list_item_attribute "PubMed ID", publication.pubmed_id, "http://www.ncbi.nlm.nih.gov/pubmed/#{publication.pubmed_id}", {:popup => true} unless publication.pubmed_id.nil? %>

<%= list_item_attribute "DOI", publication.doi, "http://dx.doi.org/#{publication.doi}", {:popup => true} unless publication.doi.nil? %>
<%= list_item_attribute "DOI", publication.doi, "https://doi.org/#{publication.doi}", {:popup => true} unless publication.doi.nil? %>

<%= list_item_simple_list(authors, "Author") {|a| a.last_name + " " + a.first_name} -%>

Expand All @@ -18,4 +18,4 @@
<%= f.hidden_field :pubmed_id %>
<%= f.hidden_field :doi %>
<%= submit_tag 'Register' %>
<% end %>
<% end %>
4 changes: 2 additions & 2 deletions app/views/publications/_resource_list_item.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<%= list_item_attribute "PubMed ID", item.pubmed_id, "http://www.ncbi.nlm.nih.gov/pubmed/#{item.pubmed_id}", {:popup => true} unless item.pubmed_id.nil? %>

<%= list_item_attribute "DOI", item.doi, "http://dx.doi.org/#{item.doi}", {:popup => true} unless item.doi.nil? %>
<%= list_item_attribute "DOI", item.doi, "https://doi.org/#{item.doi}", {:popup => true} unless item.doi.nil? %>

<p class="list_item_attribute">
<b>Author<%= item.asset.creators.size + item.non_seek_authors.size > 1 ? "s" : "" -%>:</b>
Expand All @@ -19,4 +19,4 @@

<%= list_item_optional_attribute "Journal", h(item.journal) %>

<%= list_item_attribute "Date Published", item.published_date.strftime('%d/%m/%Y') %>
<%= list_item_attribute "Date Published", item.published_date.strftime('%d/%m/%Y') %>
2 changes: 1 addition & 1 deletion app/views/publications/feed.atom.builder
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ atom_feed :language => "en-GB", :root_url => "/publications",
end
unless item.doi.nil?
entry.content "type" => "text/html",
"src" => "http://dx.doi.org/#{item.doi}"
"src" => "https://doi.org/#{item.doi}"
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions app/views/publications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<% if [email protected]_id.nil? %>
<li><%= image_tag_for_key('visit_pubmed', "http://www.ncbi.nlm.nih.gov/pubmed/#{@publication.pubmed_id}", nil, {:popup => true}, 'View Publication On PubMed') -%></li>
<% elsif [email protected]? %>
<li><%= image_tag_for_key('visit_pubmed', "http://dx.doi.org/#{@publication.doi}", nil, {:popup => true}, 'View Publication') -%></li>
<li><%= image_tag_for_key('visit_pubmed', "https://doi.org/#{@publication.doi}", nil, {:popup => true}, 'View Publication') -%></li>
<% end -%>
<% if Authorization.is_authorized?("edit", nil, @publication, current_user) -%>
<li><%= image_tag_for_key('manage', edit_publication_path(@publication), nil, nil, 'Manage Publication') -%></li>
Expand All @@ -25,7 +25,7 @@
<% end %>
<% unless @publication.doi.nil? %>
<label>DOI:</label>
<%= link_to @publication.doi, "http://dx.doi.org/#{@publication.doi}",{:popup => true} %>
<%= link_to @publication.doi, "https://doi.org/#{@publication.doi}",{:popup => true} %>
<% end %>
</p>
<!-- no projects in methodbox -->
Expand Down Expand Up @@ -77,4 +77,4 @@
<!-- <div style="clear:both;padding-top:1em;"> -->
<%#= render :partial=>"layouts/items_related_to",:object => @publication %>
<!-- </div> -->
</div>
</div>
4 changes: 2 additions & 2 deletions vendor/plugins/doi_query_tool/lib/doi_record.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class DoiRecord
attr_accessor :authors, :title, :abstract, :journal, :doi, :xml, :date_published

DOI_BASE_URL = "http://dx.doi.org/"
DOI_BASE_URL = "https://doi.org/"

def initialize(attributes={})
self.title = attributes[:title]
Expand All @@ -16,4 +16,4 @@ def initialize(attributes={})
def lookup_url
return DOI_BASE_URL + self.doi
end
end
end