Skip to content

Commit

Permalink
Merge pull request #881 from sul-dlss/t880-altmetrics
Browse files Browse the repository at this point in the history
Move altmetrics js.
  • Loading branch information
jcoyne authored Dec 7, 2023
2 parents e31c8cb + 8483fb4 commit 08311e9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions app/views/purl/_metrics.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<a href="https://sdr.library.stanford.edu/sdr-metrics">How are these metrics generated?</a>
</p>
<% if document.doi.present? %>
<script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script>
<p><a href="https://help.altmetric.com/support/solutions/articles/6000232837-what-is-altmetric-and-what-does-it-provide-" target='_blank' rel='noopener'>Altmetric</a> tracks online attention to this work. A badge is shown only when online mentions are found.</p>
<div class='altmetric-embed' data-badge-type='donut' data-doi="<%= document.doi_id %>" data-badge-popover='right' data-hide-no-mentions='true'></div>
<% end %>
Expand Down
1 change: 0 additions & 1 deletion app/views/purl/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<%= tag :meta, name: 'robots', content: 'noindex' unless @purl.rights.world_downloadable? %>

<% if @purl.doi %>
<script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script>
<%= tag :meta, name: 'citation_doi', content: @purl.doi_id %>
<% end %>
<% if @purl.schema_dot_org? %>
Expand Down
1 change: 0 additions & 1 deletion spec/features/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@
expect(page).to have_selector 'meta[name="citation_publication_date"][content="2022"]', visible: :hidden
expect(page).to have_selector 'meta[name="citation_author"][content="Khine, Sandi"]', visible: :hidden
expect(page).to have_selector 'meta[name="citation_author"][content="Navaroli, A. Collier"]', visible: :hidden
expect(page).to have_selector 'script[src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"]', visible: :hidden
end
end

Expand Down

0 comments on commit 08311e9

Please sign in to comment.