Skip to content

Commit a2c9f6b

Browse files
authored
Merge pull request #96 from TAMULib/rdc-sprint4-staging
Rdc sprint4 staging
2 parents fba418f + 13c7745 commit a2c9f6b

5 files changed

Lines changed: 40 additions & 1 deletion

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
<!-- From upstream DSpace 7 https://github.com/DSpace/dspace-angular/pull/2866/files -->
12
<ds-metadata-field-wrapper [label]="label | translate">
2-
<a class="dont-break-out" *ngFor="let mdValue of mdValues; let last=last;" [href]="mdValue.value">
3+
<a class="dont-break-out" *ngFor="let mdValue of mdValues; let last=last;" [href]="mdValue.value" [target]="linkTarget">
34
{{ linktext || mdValue.value }}<span *ngIf="!last" [innerHTML]="separator"></span>
45
</a>
56
</ds-metadata-field-wrapper>

src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ describe('MetadataUriValuesComponent', () => {
7272
const separators = fixture.debugElement.queryAll(By.css('a span'));
7373
expect(separators.length).toBe(mockMetadata.length - 1);
7474
});
75+
// From upstream DSpace 7 https://github.com/DSpace/dspace-angular/pull/2866/files
76+
it('should contain the correct target attribute for metadata links', () => {
77+
const links = fixture.debugElement.queryAll(By.css('a'));
78+
for (const link of links) {
79+
expect(link.nativeElement.getAttribute('target')).toBe('_blank');
80+
}
81+
});
82+
// END of upstream addition
7583

7684
describe('when linktext is defined', () => {
7785

src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,12 @@ export class MetadataUriValuesComponent extends MetadataValuesComponent {
3737
* The label for this iteration of metadata values
3838
*/
3939
@Input() label: string;
40+
41+
// From upstream DSpace 7 https://github.com/DSpace/dspace-angular/pull/2866/files
42+
/**
43+
* The target attribute for the metadata links.
44+
* Defaults to '_blank' to open links in a new window/tab.
45+
*/
46+
@Input() linkTarget = '_blank';
47+
// END of upstream additions
4048
}

src/themes/rdc/app/item-page/simple/item-types/untyped-item/untyped-item.component.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@
3434
[metadataFields]="['dc.contributor.author', 'dc.creator']"
3535
[label]="'relationships.isAuthorOf' | translate">
3636
</ds-themed-metadata-representation-list>
37+
<!-- TAMU Customization - Principal Investigator -->
38+
<ds-themed-metadata-representation-list class="ds-item-page-mixed-author-field"
39+
[parentItem]="object"
40+
[itemType]="'Person'"
41+
[metadataFields]="['dc.creator.pi']"
42+
[label]="'Principal Investigator'">
43+
</ds-themed-metadata-representation-list>
44+
<!-- END TAMU Customization - Principal Investigator -->
45+
<!-- TAMU Customization - Co Principal Investigator -->
46+
<ds-themed-metadata-representation-list class="ds-item-page-mixed-author-field"
47+
[parentItem]="object"
48+
[itemType]="'Person'"
49+
[metadataFields]="['dc.creator.copi']"
50+
[label]="'Co-Principal Investigator(s)'">
51+
</ds-themed-metadata-representation-list>
52+
<!-- END TAMU Customization - Co Principal Investigator -->
3753
<ds-generic-item-page-field [item]="object"
3854
[fields]="['journal.title']"
3955
[label]="'item.page.journal-title'">

src/themes/rdc/assets/i18n/en.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
"dataset-relationships.search.results.head": "Dataset Search Results",
2121

22+
"researchproject.listelement.badge": "Research Project",
23+
24+
"researchproject.page.titleprefix": "Research Project:",
25+
26+
"researchproject.page.edit": "Edit this Research Project",
27+
2228
"submission.sections.describe.relationship-lookup.title.Dataset": "Dataset",
2329

2430
"submission.sections.describe.relationship-lookup.selection-tab.title.Dataset": "Dataset",

0 commit comments

Comments
 (0)