Skip to content

Commit 2915eee

Browse files
FrancescoMolinaroAndrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2024_02_x/DSC-2831 (pull request DSpace#4400)
[DSC-2831] add default icon for link-authority component - cherry-picked from [CST-25711] Approved-by: Andrea Barbasso
2 parents 1631650 + 3e3fa63 commit 2915eee

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<div [class]="field.styleValue" [attr.lang]="metadataValue.language">
22
<span>
33
<a class="metadata-text" href="{{link.href}}" rel="noopener noreferrer" target="_blank">
4-
@if (iconStyle) {
5-
<i class="mr-2 fa-xl" [ngClass]="iconStyle"></i>
6-
}
7-
{{ link.text }}
4+
<i class="mr-2 fa-xl" [ngClass]="iconStyle || defaultIcon"></i>
5+
{{ link.text }}
86
</a>
97
</span>
108
</div>

src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/link-authority/link-authority.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export class LinkAuthorityComponent extends RenderingTypeValueModelComponent imp
3333
link: MetadataLinkValue;
3434
iconStyle: string;
3535

36+
defaultIcon = 'fa fa-external-link-square';
37+
3638

3739
constructor(
3840
@Inject('fieldProvider') public fieldProvider: LayoutField,

0 commit comments

Comments
 (0)