diff --git a/src/app/project/board/address-template/address-template.component.ts b/src/app/project/board/address-template/address-template.component.ts index 5c5d0c76f3..4e7c3aa4aa 100644 --- a/src/app/project/board/address-template/address-template.component.ts +++ b/src/app/project/board/address-template/address-template.component.ts @@ -1,20 +1,19 @@ import { Component, Input } from '@angular/core'; -import { IAddress } from '../dataset-metadata'; +import { Address } from '@dasch-swiss/dsp-js'; @Component({ selector: 'app-address-template', template: ` -
-

Address:

-
-

{{ address.streetAddress }}

- {{ address.postalCode }} - {{ address.addressLocality }} -
+
+
+ Address: +
+
+ {{ address.streetAddress }}, {{ address.postalCode }} {{ address.addressLocality }} +
- `, - styles: ['.postcode { margin-right: 6px; }'] + ` }) export class AddressTemplateComponent { - @Input() address: IAddress; + @Input() address: Address; } diff --git a/src/app/project/board/attribution-tab-view/attribution-tab-view.component.html b/src/app/project/board/attribution-tab-view/attribution-tab-view.component.html index ecec3cb85a..bf3f4c8cdb 100644 --- a/src/app/project/board/attribution-tab-view/attribution-tab-view.component.html +++ b/src/app/project/board/attribution-tab-view/attribution-tab-view.component.html @@ -1,21 +1,28 @@ -

Attribution

- -

The following people are involved in the creation of the dataset:

- - -

{{ attribution.role | titlecase }}

+

The following people are involved in the creation of the dataset:

-
- + + -
- +

Agent(s):

+
+
+
+ +
+
+ +
+
-
diff --git a/src/app/project/board/attribution-tab-view/attribution-tab-view.component.scss b/src/app/project/board/attribution-tab-view/attribution-tab-view.component.scss index ca0ffce2bf..bf913e52fc 100644 --- a/src/app/project/board/attribution-tab-view/attribution-tab-view.component.scss +++ b/src/app/project/board/attribution-tab-view/attribution-tab-view.component.scss @@ -1,5 +1,6 @@ .attribution-entry { - margin-top: 25px; + margin-top: 20px; + background-color: #fffdfd; .color-for-role { color: brown; diff --git a/src/app/project/board/attribution-tab-view/attribution-tab-view.component.ts b/src/app/project/board/attribution-tab-view/attribution-tab-view.component.ts index 88553f5b1a..b229edc450 100644 --- a/src/app/project/board/attribution-tab-view/attribution-tab-view.component.ts +++ b/src/app/project/board/attribution-tab-view/attribution-tab-view.component.ts @@ -1,5 +1,6 @@ import { Component, Input } from '@angular/core'; -import { IAttribution, IOrganisation, IPerson } from '../dataset-metadata'; +import { Attribution, IId, Organization, Person } from '@dasch-swiss/dsp-js'; +import { MetadataService } from '../dataset-metadata.service'; @Component({ selector: 'app-attribution-tab-view', @@ -8,15 +9,24 @@ import { IAttribution, IOrganisation, IPerson } from '../dataset-metadata'; }) export class AttributionTabViewComponent { // attribution input - @Input() attributions: IAttribution[]; + @Input() attributions: Attribution[]; + + @Input() subProperties: Object; + + currentAgent: Person | Organization | IId; + + constructor(private _metadataService: MetadataService) { + } // return the type of agent to use correct template to display it - getAgentType(agent: IPerson | IOrganisation) { - if (agent.hasOwnProperty('familyName')) { - return 'person'; - } - if (agent.hasOwnProperty('url')) { - return 'organisation'; + setAgent (agent: Person | Organization | IId): string { + let atype = this._metadataService.getContactType(agent); + if (atype) { + this.currentAgent = agent; + } else { + this.currentAgent = this.subProperties[agent.id]; + atype = this._metadataService.getContactType(this.currentAgent); } + return atype; } } diff --git a/src/app/project/board/board.component.html b/src/app/project/board/board.component.html index 9b142ad220..b027d085aa 100644 --- a/src/app/project/board/board.component.html +++ b/src/app/project/board/board.component.html @@ -1,23 +1,24 @@ - +
- - - Active - Deactivated + + + Active + Deactivated + + + + + - - - - -
@@ -28,7 +29,7 @@

- + Active Deactivated @@ -51,13 +52,17 @@

-
- +
-
-

Description

-
+
@@ -67,7 +72,7 @@

Description

perm_data_setting Project - + @@ -83,7 +88,7 @@

Description

assignment Attribution - +
@@ -93,106 +98,122 @@

Description

- portrait Contact - +
-
+ +