Skip to content

Commit

Permalink
Add related video link to relations
Browse files Browse the repository at this point in the history
Add related video link to relations on simple item page page.
  • Loading branch information
alanorth committed May 19, 2024
1 parent 2737bef commit a76ed91
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="item-page-field" *ngIf="item.hasMetadata(['dcterms.relation', 'cg.link.citation', 'cg.identifier.dataurl'])">
<div class="item-page-field" *ngIf="item.hasMetadata(['dcterms.relation', 'cg.link.citation', 'cg.link.video', 'cg.identifier.dataurl'])">
<div class="simple-view-element">
<h5>Related Material</h5>
<div class="simple-view-element-body">
Expand All @@ -25,6 +25,17 @@ <h5>Related Material</h5>
</div>
</ng-container>

<ng-container *ngIf="item.hasMetadata('cg.link.video')">
<div class="mb-2">Related video:
<ng-container *ngFor="let mdValue of item?.allMetadata('cg.link.video'); let last=last;">
<ng-container [ngTemplateOutlet]="relatedLink"
[ngTemplateOutletContext]="{value: mdValue.value}">
</ng-container>
<span *ngIf="!last">; </span>
</ng-container>
</div>
</ng-container>

<ng-container *ngIf="item.hasMetadata('cg.link.citation')">
<ng-container *ngFor="let mdValue of item?.allMetadata('cg.link.citation')"
[ngTemplateOutlet]="relatedCitation"
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5574,4 +5574,6 @@
"curation-task.task.countrycodetagger.force.label": "Country code tagger (force)",

"curation-task.task.normalizedois.label": "Normalize DOIs",

"search.filters.applied.f.othersubjects": "Subjects",
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h5 class="simple-view-element-header">Metadata</h5>
[label]="'item.page.subject'"
[index]="'subject'">
</ds-item-page-metadata-search-link>
<ds-generic-item-page-field [item]="object"
<ds-item-page-metadata-search-link [item]="object"
[fields]="['cg.subject.alliancebiovciat',
'cg.subject.bioversity',
'cg.subject.ccafs',
Expand All @@ -141,8 +141,9 @@ <h5 class="simple-view-element-header">Metadata</h5>
'cg.subject.system',
'cg.subject.wle']"
[separator]="'; '"
[label]="'item.page.subjects'">
</ds-generic-item-page-field>
[label]="'item.page.subjects'"
[index]="'othersubjects'">
</ds-item-page-metadata-search-link>
<ds-item-page-metadata-search-link [item]="object"
[fields]="['cg.coverage.country']"
[separator]="'; '"
Expand Down
2 changes: 2 additions & 0 deletions src/themes/cgspace/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
"search.filters.filter.subject.placeholder": "AGROVOC keyword",
"search.filters.filter.subject.label": "Search AGROVOC keyword",
"search.filters.applied.f.subject": "AGROVOC keyword",
// Other subjects is not used as a facet so we only need this one
"search.filters.applied.f.othersubjects": "Subjects",
"search.filters.filter.publisher.head": "Publisher",
"search.filters.filter.publisher.placeholder": "Publisher",
"search.filters.filter.publisher.label": "Search publisher",
Expand Down

0 comments on commit a76ed91

Please sign in to comment.