-
Notifications
You must be signed in to change notification settings - Fork 6
/
board.component.html
222 lines (207 loc) · 10.2 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<dsp-progress-indicator *ngIf="metadataLoading && !projectsMetadata"></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.active]="project.status" class="badge 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
*ngIf="projectAdmin && project.status"
(click)="openDialog('editProject', project.shortname, project.shortcode)"
class="right">
<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.active]="project.status" class="badge 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="!metadataLoading && selectedDataset">
<div class="left-info column">
<section class="project description">
<div class="metadata-property">
<div class="property-label">
Description
</div>
<div class="sidenav-prop-text">
<p [innerHtml]="selectedProject.description"></p>
</div>
</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 [selectedProject]="selectedProject" [subProperties]="subProperties"></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" [subProperties]="subProperties"></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]="selectedProject.contactPoint" [subProperties]="subProperties"></app-contacts-tab-view>
</mat-tab>
</mat-tab-group>
</section>
</div>
<div class="right-info column sidenav-properties-container">
<div class="metadata-box">
<div class="metadata-property">
<div class="property-label">
Dataset(s)
</div>
<div class="sidenav-prop-text">
<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>
<div class="metadata-box">
<div class="metadata-property">
<div>
<div class="property-label display-inline-block">Cite as</div>
<button mat-button
matTooltip="Copy citation url"
matTooltipPosition="below"
[cdkCopyToClipboard]="selectedDataset.howToCite"
(click)="copyToClipboard('Citation link')"
class="btn-copy-to-clipboard">
<mat-icon [inline]="true" class="icon-arkurl">content_copy</mat-icon>
</button>
</div>
<div class="sidenav-prop-text">
<p [innerHTML]="selectedDataset.howToCite"></p>
</div>
</div>
</div>
<div class="metadata-box">
<div class="metadata-property">
<div>
<div class="property-label display-inline-block">
Persistent identifier
</div>
<button mat-button
matTooltip="Copy persistent identifier"
matTooltipPosition="below"
[cdkCopyToClipboard]="selectedProject.id"
(click)="copyToClipboard('Persistent identifier')"
class="btn-copy-to-clipboard">
<mat-icon [inline]="true" class="icon-arkurl">content_copy</mat-icon>
</button>
</div>
<div class="sidenav-prop-text property-value">
<a href="{{ selectedProject.id }}" target="_blank"> {{ selectedProject.id }} </a>
</div>
</div>
<div class="metadata-property">
<div class="property-label display-inline-block">
License
</div>
<div class="sidenav-prop-text property-value">
<p class="p-block" *ngFor="let license of selectedDataset.license">
<a *ngIf="license.url" href="{{ license.url }}" target="_blank"> {{ license.url }} </a>
</p>
</div>
</div>
<div class="metadata-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 class="metadata-box">
<div class="metadata-property">
<div class="property-label">
Keyword(s)
</div>
<div class="sidenav-prop-text">
<mat-chip-list>
<mat-chip *ngFor="let kword of selectedProject.keywords"> {{ kword }} </mat-chip>
</mat-chip-list>
</div>
</div>
</div>
<div class="metadata-box">
<div class="metadata-property">
<div class="property-label">
Download metadata
</div>
<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>
</div>