Skip to content

Commit

Permalink
refactor(metadata): remove "old" implementation of the project metada…
Browse files Browse the repository at this point in the history
…ta (DEV-282) (#615)

* chore(metadata): remove "old" implementation of the project metadata

* test(still-image): adds some tests to ensure the iiif url link is generated correctly
  • Loading branch information
mdelez committed Dec 9, 2021
1 parent 109978f commit 29acf3a
Show file tree
Hide file tree
Showing 33 changed files with 4 additions and 1,392 deletions.
18 changes: 0 additions & 18 deletions src/app/app.module.ts
Expand Up @@ -50,16 +50,7 @@ import { TruncatePipe } from './main/pipes/string-transformation/truncate.pipe';
import { SelectLanguageComponent } from './main/select-language/select-language.component';
import { DatadogRumService } from './main/services/datadog-rum.service';
import { MaterialModule } from './material-module';
import { AddressTemplateComponent } from './project/board/address-template/address-template.component';
import { AttributionTabViewComponent } from './project/board/attribution-tab-view/attribution-tab-view.component';
import { BoardComponent } from './project/board/board.component';
import { ContactsTabViewComponent } from './project/board/contacts-tab-view/contacts-tab-view.component';
import { DatasetTabViewComponent } from './project/board/dataset-tab-view/dataset-tab-view.component';
import { OrganisationTemplateComponent } from './project/board/organisation-template/organisation-template.component';
import { PersonTemplateComponent } from './project/board/person-template/person-template.component';
import { ProjectTabViewComponent } from './project/board/project-tab-view/project-tab-view.component';
import { TermsTabViewComponent } from './project/board/terms-tab-view/terms-tab-view.component';
import { UrlTemplateComponent } from './project/board/url-template/url-template.component';
import { AddUserComponent } from './project/collaboration/add-user/add-user.component';
import { CollaborationComponent } from './project/collaboration/collaboration.component';
import { SelectGroupComponent } from './project/collaboration/select-group/select-group.component';
Expand Down Expand Up @@ -178,13 +169,11 @@ export function httpLoaderFactory(httpClient: HttpClient) {
AccountComponent,
AddGroupComponent,
AddRegionFormComponent,
AddressTemplateComponent,
AddUserComponent,
AddValueComponent,
AdminImageDirective,
AdvancedSearchComponent,
AppComponent,
AttributionTabViewComponent,
AudioComponent,
BoardComponent,
BooleanValueComponent,
Expand All @@ -196,10 +185,8 @@ export function httpLoaderFactory(httpClient: HttpClient) {
ComparisonComponent,
ConfirmationDialogComponent,
ConfirmationMessageComponent,
ContactsTabViewComponent,
CookiePolicyComponent,
DashboardComponent,
DatasetTabViewComponent,
DateEditComponent,
DateInputComponent,
DateInputTextComponent,
Expand Down Expand Up @@ -250,17 +237,14 @@ export function httpLoaderFactory(httpClient: HttpClient) {
OntologyComponent,
OntologyFormComponent,
OntologyVisualizerComponent,
OrganisationTemplateComponent,
PasswordFormComponent,
PermissionComponent,
PersonTemplateComponent,
ProfileComponent,
ProgressIndicatorComponent,
ProjectComponent,
ProjectFormComponent,
ProjectsComponent,
ProjectsListComponent,
ProjectTabViewComponent,
PropertiesComponent,
PropertyFormComponent,
PropertyInfoComponent,
Expand Down Expand Up @@ -303,7 +287,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
SublistValueComponent,
SwitchPropertiesComponent,
SystemComponent,
TermsTabViewComponent,
TextValueAsHtmlComponent,
TextValueAsStringComponent,
TextValueAsXMLComponent,
Expand All @@ -313,7 +296,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
TruncatePipe,
UploadComponent,
UriValueComponent,
UrlTemplateComponent,
UserComponent,
UserFormComponent,
UserMenuComponent,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

174 changes: 1 addition & 173 deletions src/app/project/board/board.component.html
@@ -1,4 +1,4 @@
<app-progress-indicator *ngIf="metadataLoading && !projectsMetadata"></app-progress-indicator>
<app-progress-indicator *ngIf="loading"></app-progress-indicator>

<div *ngIf="!loading && project">
<div class="content large middle">
Expand Down Expand Up @@ -50,178 +50,6 @@ <h2 class="mat-title">
</span>
</div>
</div>

<section class="no-metadata" *ngIf="!metadataLoading && !selectedDataset">
No metadata defined for the selected project.
</section>
</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>

0 comments on commit 29acf3a

Please sign in to comment.