Skip to content

Commit

Permalink
Add "Curated by:" to GO-CAM pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kimrutherford committed Jan 22, 2025
1 parent 4a4563f commit 245196f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
24 changes: 20 additions & 4 deletions src/app/go-cam-view-page/go-cam-view-page.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.genes-and-terms {
padding-top: 0.4em;
min-width: 11em;
font-size: 120%;
flex: 0;
}

Expand All @@ -21,13 +20,30 @@
height: 100%;
}

.header-section {
padding: 0.5em 0.5em 1em 0;
}

.return-to-gene-page {
font-size: 120%;
padding: 0.5em;
/* padding: 0.5em 4em 0.5em 0.5em;*/
display: inline-block;
}

.return-to-gene-page, .attribution {
margin: 0.2em 3em 0.3em 0em;
}

.attribution {
padding-top: 0.2em;
font-size: 115%;
display: inline-block;
vertical-align: top;
}

.return-to-gene-page div {
margin: 0.5em 0.1em;
.title {
font-size: 120%;
padding-bottom: 0.2em;
}

.help-link, .amigo-link {
Expand Down
8 changes: 7 additions & 1 deletion src/app/go-cam-view-page/go-cam-view-page.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div *ngIf="getIFrameURL()">
<div class="header-section">
<div class="return-to-gene-page">
<div>GO-CAM pathway model <span class="model-title-or-id">{{getTitleOrId()}}</span>
<div class="title">GO-CAM pathway model <span class="model-title-or-id">{{getTitleOrId()}}</span>
<span *ngIf="sourcePageType != 'docs'" class="go-cam-view">
<span class="help-link"><a routerLink="/documentation/go-cam-pathway-models">All curated pathways</a></span>
</span>
Expand All @@ -17,6 +18,11 @@
</div>
</div>

<div *ngIf="gocamDetails" class="attribution">
Curation by: {{contributors()}}
</div>
</div>

<div class="iframe-container">
<div *ngIf="gocamDetails && modelGenes.length > 0" class="genes-and-terms">
<div>
Expand Down
10 changes: 10 additions & 0 deletions src/app/go-cam-view-page/go-cam-view-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ export class GoCamViewPageComponent implements OnInit {
}
}

contributors(): string {
if (this.gocamDetails) {
return this.gocamDetails.contributors
.map(contributor => contributor.name)
.join(', ');
} else {
return '';
}
}

setPageTitle(): void {
let title;
if (this.gocamId) {
Expand Down
6 changes: 6 additions & 0 deletions src/app/pombase-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,11 +800,17 @@ export interface GoCamIdAndTitle {
title?: string;
}

export interface GoCamContributor {
orcid: string;
name: string;
}

export interface GoCamDetails {
gocam_id: GoCamId;
title?: string;
genes: Array<GeneUniquename>;
terms: Array<TermAndName>;
contributors: Array<GoCamContributor>;
}

export interface APIError {
Expand Down

0 comments on commit 245196f

Please sign in to comment.