Skip to content

Commit 50fae13

Browse files
MillenniumFalconMechanicNoopDog
authored andcommitted
Updated release modal UI.
1 parent 4863f34 commit 50fae13

17 files changed

+153
-257
lines changed

spa/src/app/files/files.module.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ import { ProjectReleaseComponent } from "./project-release/project-release.compo
100100
import { ProjectSummaryStatsComponent } from "./project-summary-stats-component/project-summary-stats.component";
101101
import { ProjectViewFactory } from "./project-view/project-view.factory";
102102
import { ReleaseComponent } from "./releases/release.component";
103-
import { ReleaseFileComponent } from "./releases/release-file/release-file.component";
104-
import { ReleaseFileDownloadComponent } from "./releases/release-file-download/release-file-download.component";
105103
import { ReleaseFilesModalComponent } from "./releases/release-files-modal/release-files-modal.component";
106104
import { ReleaseFilesModalContainerComponent } from "./releases/release-files-modal-container/release-files-modal-container.component";
107105
import { ReleaseTableComponent } from "./releases/release-table/release-table.component";
@@ -216,8 +214,6 @@ import { ReleaseService } from "./shared/release.service";
216214
ProjectSummaryStatsComponent,
217215
ProjectSupplementaryLinksComponent,
218216
ReleaseComponent,
219-
ReleaseFileComponent,
220-
ReleaseFileDownloadComponent,
221217
ReleaseFilesModalComponent,
222218
ReleaseFilesModalContainerComponent,
223219
ReleaseTableComponent,

spa/src/app/files/releases/release-dataset-view.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
import { ReleaseVisualization } from "./release-visualization.model";
1111
import { LibraryConstructionApproach } from "../shared/library-construction-approach.model";
1212
import { DevelopmentalStage } from "./developmental-stage.model";
13-
import { ReleaseFilesView } from "./release-files-view.model";
13+
import { ReleaseFileView } from "./release-file-view.model";
1414

1515
export interface ReleaseDatasetView {
1616
entryId: string; // Project UUID, pulled from ReleaseProject
1717
datasetId: string; // Short name, pulled from ReleaseDataset
1818
developmentalStage: DevelopmentalStage;
19-
files: ReleaseFilesView[];
19+
files: ReleaseFileView[];
2020
libraryConstructionApproach: LibraryConstructionApproach;
2121
projectShortname: string; // Project short name, pulled from ReleaseProject
2222
visualizations: ReleaseVisualization[];

spa/src/app/files/releases/release-file-download/release-file-download.component.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

spa/src/app/files/releases/release-file-download/release-file-download.component.scss

Lines changed: 0 additions & 51 deletions
This file was deleted.

spa/src/app/files/releases/release-file-download/release-file-download.component.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Human Cell Atlas
3+
* https://www.humancellatlas.org/
4+
*
5+
* View model of a file contained in a release.
6+
*/
7+
8+
// App dependencies
9+
import { ReleaseFileType } from "./release-file-type.model";
10+
11+
export interface ReleaseFileView {
12+
13+
description: string;
14+
extension: string;
15+
type: ReleaseFileType;
16+
url: string;
17+
}
18+

spa/src/app/files/releases/release-file/release-file.component.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

spa/src/app/files/releases/release-file/release-file.component.scss

Lines changed: 0 additions & 33 deletions
This file was deleted.

spa/src/app/files/releases/release-file/release-file.component.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
11
<modal-layout *ngIf="state$ | async as state"
22
[loaded]="state.loaded"
33
(closed)="redirectToReleases()">
4-
<release-title-overline overline></release-title-overline>
5-
<ng-container title *ngIf="state.loaded">Release Files</ng-container>
4+
<ng-container title *ngIf="state.loaded">{{state.releaseDataset.datasetId}} Release Files</ng-container>
65
<ng-container subtitle *ngIf="state.loaded">{{state.releaseDataset.projectShortname}}</ng-container>
76
<ng-container content *ngIf="state.loaded">
8-
<h2>
7+
<h4 class="fontsize-l">
98
<span>{{state.releaseDataset.developmentalStage}}, </span>
109
<span>{{state.releaseDataset.organ}}, </span>
1110
<span>{{state.releaseDataset.libraryConstructionApproach}}</span>
12-
</h2>
13-
<warning class="max550">
11+
</h4>
12+
<warning>
1413
<warning-content>
15-
<p class="fontsize-s">This project contains additional organs, developmental stages or technologies. <a
16-
routerLink="/projects/{{state.releaseDataset.entryId}}/releases/2020-mar">View project release page</a>.
14+
<p class="fontsize-xs">This project contains additional organs, developmental stages or technologies. <a
15+
routerLink="/projects/{{state.releaseDataset.entryId}}/releases/2020-mar">View project release
16+
page</a>.
1717
</p>
1818
</warning-content>
1919
</warning>
20-
<release-file class="max550"
21-
*ngFor="let releaseFile of state.releaseDataset.files"
22-
[releaseFiles]="releaseFile.files"
23-
[releaseFileParagraph]="getFileDownloadParagraph(releaseFile)"
24-
[releaseFileTitle]="getReleaseFileTypeDisplay(releaseFile.type)"></release-file>
25-
<data-download-citation class="max550"></data-download-citation>
20+
<mat-table [dataSource]="state.releaseDataset.files">
21+
<ng-container matColumnDef="download">
22+
<mat-cell *matCellDef="let element" class="download fontsize-xxs">
23+
<a [href]="getReleaseFileUrl(element.url)"></a> {{element.extension}}
24+
</mat-cell>
25+
</ng-container>
26+
<ng-container matColumnDef="description">
27+
<mat-cell *matCellDef="let element" class="description fontsize-xxs">
28+
{{element.description}}
29+
</mat-cell>
30+
</ng-container>
31+
<ng-container matColumnDef="copyLink">
32+
<mat-cell *matCellDef="let element" class="copy-to-clipboard fontsize-xxs">
33+
<copy-to-clipboard [copyToClipboardLink]="getReleaseFileUrl(element.url)"></copy-to-clipboard>
34+
</mat-cell>
35+
</ng-container>
36+
<mat-row *matRowDef="let row; columns: columnsToDisplay;"></mat-row>
37+
</mat-table>
38+
<data-download-citation></data-download-citation>
2639
</ng-container>
2740
</modal-layout>

0 commit comments

Comments
 (0)