Skip to content

Commit 72c141c

Browse files
frano-mMillenniumFalconMechanic
authored andcommitted
Add a data citation link to the project details page. Resolves #955. (#956)
1 parent b61788a commit 72c141c

File tree

5 files changed

+237
-21
lines changed

5 files changed

+237
-21
lines changed

spa/src/app/files/hca-get-data/copy-to-clipboard/copy-to-clipboard.component.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
}
4242
}
4343

44-
/* Project matrix styles */
44+
/* Project matrix, project overview styles */
4545
/* ProjectPreparedMatrixDownloadsComponent */
46-
:host-context(.project-matrix) {
46+
/* HCAProjectComponent */
47+
:host-context(.project-matrix), :host-context(.project-overview) {
4748

4849
/* Container, clipboard container */
4950
.download-url, .clipboard-copy {
@@ -61,3 +62,11 @@
6162
color: $hca-primary;
6263
}
6364
}
65+
66+
:host-context(.project-overview) {
67+
68+
/* Copy text */
69+
.clipboard-copy span {
70+
padding-left: 0;
71+
}
72+
}

spa/src/app/files/hca-project/hca-project.component.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ <h4 class="fontsize-m semi-bold">Data Curators</h4>
8080
<span *ngSwitchDefault>Unspecified</span>
8181
</ng-container>
8282
</p>
83+
<h4 class="fontsize-m semi-bold">Citation</h4>
84+
<p class="fontsize-xxs citation">
85+
<span>To reference this project, please use the following link:</span>
86+
<a [href]="getCitationLink(state.project.project.entryId)"><span class="url">{{getCitationLink(state.project.project.entryId)}}</span></a>
87+
<copy-to-clipboard [copyToClipboardLink]="getCitationLink(state.project.project.entryId)"></copy-to-clipboard>
88+
</p>
8389
</div>
8490
</div>
8591
</div>
@@ -136,11 +142,13 @@ <h4 class="fontsize-m semi-bold">Analysis Tools</h4>
136142
<ng-container [ngSwitch]="state.integratedWithTertiaryPortals">
137143
<ng-container *ngSwitchCase="true">
138144
<div class="stretch">
139-
<p class="fontsize-xs">This project's data can be viewed live in the following analysis tools:</p>
145+
<p class="fontsize-xs">This project's data can be viewed live in the following
146+
analysis tools:</p>
140147
</div>
141148
<project-integrations [integrations]="state.integrations"></project-integrations>
142149
</ng-container>
143-
<p class="fontsize-xs" *ngSwitchDefault>There are currently no integrations for this project at this time.</p>
150+
<p class="fontsize-xs" *ngSwitchDefault>There are currently no integrations for this project
151+
at this time.</p>
144152
</ng-container>
145153
</div>
146154
<div class="project-details">
@@ -346,7 +354,10 @@ <h4 class="fontsize-m semi-bold">Accessions</h4>
346354
<div class="data-release-policy">
347355
<h4 class="fontsize-m semi-bold">Data Release Policy</h4>
348356
<div class="stretch">
349-
<p class="fontsize-xs">For information regarding data sharing and data use, please see our <a href="https://www.humancellatlas.org/data-release-policy/" target="_blank" rel="noopener noreferrer">Data Release Policy</a></p>
357+
<p class="fontsize-xs">For information regarding data sharing and data use, please see our
358+
<a href="https://www.humancellatlas.org/data-release-policy/"
359+
target="_blank"
360+
rel="noopener noreferrer">Data Release Policy</a></p>
350361
</div>
351362
</div>
352363
</div>

spa/src/app/files/hca-project/hca-project.component.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
}
166166

167167
/* Contributors, curator list */
168-
.contributor-list, .contributor-list > span, .curator-list, .curator-list > span {
168+
.contributor-list, .contributor-list > span, .curator-list, .curator-list > span, .citation, .citation > span {
169169
display: block;
170170
}
171171

@@ -181,6 +181,13 @@
181181
.contributor-list, .curator-list, .organization-list {
182182
white-space: pre-wrap;
183183
}
184+
185+
/* Citation url */
186+
.citation .url {
187+
display: block;
188+
margin: 4px 0;
189+
word-break: break-all;
190+
}
184191
}
185192
}
186193

0 commit comments

Comments
 (0)