Skip to content

Commit a0bdeb5

Browse files
committed
provider user name
1 parent de12c81 commit a0bdeb5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

views/works/citations.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.nav-tabs-padding
2-
%datacite-components-links-tabs{ doi: attributes["doi"] }
2+
%datacite-components-links-tabs{ doi: attributes["doi"], client:client_name, counts:citations }
33

views/works/item.haml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
- attributes = item.fetch("attributes", {})
2+
- data_center = @work[:included].find { |i| i.fetch("type", nil) == "data-centers" }
3+
- client_name = data_center.fetch("attributes", {}).fetch("title", nil)
24
- type = attributes.fetch("resource-type-id", nil)
35
- includes = @works.present? ? @works[:included] : @work[:included]
46
- work_types = includes.select { |item| item["type"] == "work-types" }
@@ -41,6 +43,7 @@
4143
%a{:href => attributes["license"]}
4244
= license_img(attributes["license"])
4345
46+
-# %data-metrics-badge{doi: attributes["doi"], display:"datacite"}
4447
- if ENV['RACK_ENV'] != 'production' || is_admin_or_staff? || is_beta_tester?
4548
.panel-footer
4649
- if (views + downloads + citations).zero?
@@ -101,7 +104,7 @@
101104
- if @work.present? && (views + downloads + citations).positive?
102105
= haml :'works/visualisation', locals: { attributes: attributes, views: views, downloads: downloads, citations: citations }
103106
- if @work.present?
104-
= haml :'works/citations', locals: { attributes: attributes, citations: citations, duplicated: has_duplicated, summary: metrics}
107+
= haml :'works/citations', locals: { attributes: attributes, client_name: client_name, citations: citations, duplicated: has_duplicated, summary: metrics}
105108
- if @work.present? && (views + downloads).zero?
106109
.panel-body.alert.alert-simple-info
107110
= "This data repository is not currently reporting usage information. For information on how your repository can submit usage information, please see"

0 commit comments

Comments
 (0)