Skip to content

Commit

Permalink
entities: add place and temporal display
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr authored and PascalRepond committed Oct 6, 2023
1 parent 652f190 commit 90c0760
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ <h1 class="mb-0">{{ record.metadata | extractSourceField : 'authorized_access_po
<admin-remote-entities-person-detail-view *ngSwitchCase="entityType.PERSON" [record]="record.metadata[source]" [source]="source"></admin-remote-entities-person-detail-view>
<admin-remote-entities-organisation-detail-view *ngSwitchCase="entityType.ORGANISATION" [record]="record.metadata[source]" [source]="source"></admin-remote-entities-organisation-detail-view>
<admin-remote-topic-detail-view *ngSwitchCase="entityType.TOPIC" [record]="record.metadata[source]" [source]="source"></admin-remote-topic-detail-view>
<admin-remote-topic-detail-view *ngSwitchCase="entityType.PLACE" [record]="record.metadata[source]" [source]="source"></admin-remote-topic-detail-view>
<admin-remote-topic-detail-view *ngSwitchCase="entityType.TEMPORAL" [record]="record.metadata[source]" [source]="source"></admin-remote-topic-detail-view>
<span *ngSwitchDefault>{{ 'Missing template for this entity type:' | translate }} {{ record.metadata.type }}</span>
</article>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,35 @@ export class RemoteEntitiesDetailViewComponent implements DetailRecord {
icon(type: string): { class: string, title: string } {
switch (type) {
case EntityType.PERSON:
return { class: EntityTypeIcon.PERSON, title: this._translateService.instant('Person') };
return {
class: EntityTypeIcon.PERSON,
title: this._translateService.instant(EntityType.PERSON)
};
case EntityType.ORGANISATION:
return { class: EntityTypeIcon.ORGANISATION, title: this._translateService.instant('Organisation') };
return {
class: EntityTypeIcon.ORGANISATION,
title: this._translateService.instant(EntityType.ORGANISATION)
};
case EntityType.TOPIC:
return { class: EntityTypeIcon.TOPIC, title: this._translateService.instant('Topic') };
return {
class: EntityTypeIcon.TOPIC,
title: this._translateService.instant(EntityType.TOPIC)
};
case EntityType.PLACE:
return {
class: EntityTypeIcon.PLACE,
title: this._translateService.instant(EntityType.PLACE)
};
case EntityType.TEMPORAL:
return {
class: EntityTypeIcon.TEMPORAL,
title: this._translateService.instant(EntityType.TEMPORAL)
};
default:
return { class: 'fa-question', title: this._translateService.instant('Missing type') };
return {
class: 'fa-question',
title: this._translateService.instant('Missing type')
};
}
}

Expand Down
6 changes: 6 additions & 0 deletions projects/admin/src/manual_translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ _('email_reply_to');

// Entity type
_('bf:ClassificationDdc');
_('bf:Organisation');
_('bf:Person');
_('bf:Place');
_('bf:Temporal');
_('bf:Topic');
_('bf:Work');

// Non-extracted string (TODO :: search why ?)
_('Vol. {{ volume }}')
Expand Down

0 comments on commit 90c0760

Please sign in to comment.