|
1 | 1 | - 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) |
2 | 4 | - type = attributes.fetch("resource-type-id", nil)
|
3 | 5 | - includes = @works.present? ? @works[:included] : @work[:included]
|
4 | 6 | - work_types = includes.select { |item| item["type"] == "work-types" }
|
|
41 | 43 | %a{:href => attributes["license"]}
|
42 | 44 | = license_img(attributes["license"])
|
43 | 45 |
|
| 46 | + -# %data-metrics-badge{doi: attributes["doi"], display:"datacite"} |
44 | 47 | - if ENV['RACK_ENV'] != 'production' || is_admin_or_staff? || is_beta_tester?
|
45 | 48 | .panel-footer
|
46 | 49 | - if (views + downloads + citations).zero?
|
|
101 | 104 | - if @work.present? && (views + downloads + citations).positive?
|
102 | 105 | = haml :'works/visualisation', locals: { attributes: attributes, views: views, downloads: downloads, citations: citations }
|
103 | 106 | - 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} |
105 | 108 | - if @work.present? && (views + downloads).zero?
|
106 | 109 | .panel-body.alert.alert-simple-info
|
107 | 110 | = "This data repository is not currently reporting usage information. For information on how your repository can submit usage information, please see"
|
|
0 commit comments