/
board.component.html
189 lines (176 loc) · 8.45 KB
/
board.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<dsp-progress-indicator *ngIf="loading && !project"></dsp-progress-indicator>
<div *ngIf="!loading && project">
<div class="content large middle">
<!-- mobile version: status and edit icon displayed before the title -->
<div class="app-toolbar-mobile">
<span class="app-toolbar-action-status">
<span class="badge status" [class.active]="project.status">
<span *ngIf="project.status">Active</span>
<span *ngIf="!project.status">Deactivated</span>
</span>
</span>
<span class="fill-remaining-space-action"></span>
<span class="app-toolbar-action-edit">
<button mat-icon-button class="right"
(click)="openDialog('editProject', project.shortname, project.shortcode)"
*ngIf="projectAdmin && project.status">
<mat-icon>edit</mat-icon>
</button>
</span>
</div>
<!-- desktop and tablet version -->
<div class="app-toolbar transparent more-space-bottom">
<div class="app-toolbar-row">
<h3 class="mat-body subtitle">
Project {{ project.shortcode }} | {{ project.shortname | uppercase }}
</h3>
<span class="fill-remaining-space"></span>
<span class="app-toolbar-action">
<span class="badge status" [class.active]="project.status">
<span *ngIf="project.status">Active</span>
<span *ngIf="!project.status">Deactivated</span>
</span>
</span>
</div>
<div class="app-toolbar-row">
<h2 class="mat-title">
{{ project.longname }}
</h2>
<span class="fill-remaining-space"></span>
<span class="app-toolbar-action">
<button mat-icon-button
*ngIf="projectAdmin && project.status"
(click)="openDialog('editProject', project.shortname, project.shortcode)"
class="right">
<mat-icon>edit</mat-icon>
</button>
</span>
</div>
</div>
</div>
<div class="project-info-container flex-panel" *ngIf="datasets">
<div class="left-info column">
<!-- description -->
<section class="project description">
<h3>Description</h3>
<div [innerHtml]="selectedDataset.project.description"></div>
</section>
<section>
<mat-tab-group animationDuration="0ms" [color]="color" class="tab-bar margin-from-top">
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="tab-icon">perm_data_setting</mat-icon>
Project
</ng-template>
<app-project-tab-view [metadata]="selectedDataset.project"></app-project-tab-view>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="tab-icon">collections</mat-icon>
Dataset
</ng-template>
<app-dataset-tab-view [metadata]="selectedDataset" [noOfDatasets]="datasetOptions.length"></app-dataset-tab-view>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="tab-icon">assignment</mat-icon>
Attribution
</ng-template>
<app-attribution-tab-view [attributions]="selectedDataset.qualifiedAttribution"></app-attribution-tab-view>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="tab-icon">receipt</mat-icon>
Terms & conditions
</ng-template>
<app-terms-tab-view [conditions]="selectedDataset.conditionsOfAccess" [license]="selectedDataset.license"></app-terms-tab-view>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon class="tab-icon">portrait</mat-icon>
Contact
</ng-template>
<app-contacts-tab-view [contactDetails]="selectedDataset.project.contactPoint"></app-contacts-tab-view>
</mat-tab>
</mat-tab-group>
</section>
</div>
<div class="right-info column">
<div class="metadata-box">
<h3>Dataset(s)</h3>
<div>
<mat-radio-group
aria-label="Select a dataset"
name="datasetsList"
fxLayout="column"
(change)="updateDataset($event)">
<mat-radio-button
*ngFor="let ds of datasetOptions"
name="datasetsList"
[checked]="ds.checked"
[value]="ds.id">
{{ ds.name }}
</mat-radio-button>
</mat-radio-group>
</div>
</div>
<div class="metadata-box">
<h3 class="display-inline-block">Cite as</h3>
<div class="copy-to-clipboard">
<button title="Copy to clipboard" (click)="copyHowToCiteToClipboard();">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>
</svg>
</button>
</div>
<div class="sidenav-prop-text">
<p [innerHTML]="selectedDataset.howToCite"></p>
</div>
</div>
<div class="metadata-box">
<div class="sidenav-properties-container">
<div class="property">
<div class="property-label">
Persistent identifier
</div>
<div class="sidenav-prop-text property-value">
<a href="{{ selectedDataset.project.id }}" target="_blank"> {{ selectedDataset.project.id }} </a>
</div>
</div>
<div class="property">
<div class="property-label">
License
</div>
<div class="sidenav-prop-text property-value">
<a href="{{ selectedDataset.license.value }}" target="_blank"> {{ selectedDataset.license.value }} </a>
</div>
</div>
<div class="property" *ngIf="selectedDataset.datePublished">
<div class="property-label">
Publication date
</div>
<div class="sidenav-prop-text property-value">
{{ selectedDataset.datePublished | date:'MMMM d, yyyy' }}
</div>
</div>
</div>
</div>
<div class="metadata-box">
<h3>Keyword(s)</h3>
<div class="sidenav-prop-text">
<mat-chip-list>
<mat-chip *ngFor="let kword of selectedDataset.project.keywords"> {{ kword }} </mat-chip>
</mat-chip-list>
</div>
</div>
<div class="metadata-box">
<h3>Download metadata</h3>
<div class="sidenav-prop-text">
<a [routerLink]="" (click)="downloadMetadata()">JSON</a>
<!-- Functionality to be implemented -->
<a href *ngFor="let dformat of metadataDownloadFormats" class="download-metadata"> {{ dformat }} </a>
</div>
</div>
</div>
</div>
</div>