mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge remote-tracking branch 'origin/main' into more-eslint
This commit is contained in:
@@ -13,6 +13,8 @@ import {
|
||||
import { BrowseDefinition } from '../../../core/shared/browse-definition.model';
|
||||
import { MetadataValue } from '../../../core/shared/metadata.models';
|
||||
import { VALUE_LIST_BROWSE_DEFINITION } from '../../../core/shared/value-list-browse-definition.resource-type';
|
||||
import { ImageField } from '../../simple/field-components/specific-field/item-page-field.component';
|
||||
import { environment } from '../../../../environments/environment';
|
||||
import { hasValue } from '../../../shared/empty.util';
|
||||
|
||||
/**
|
||||
@@ -65,6 +67,11 @@ export class MetadataValuesComponent implements OnChanges {
|
||||
|
||||
@Input() browseDefinition?: BrowseDefinition;
|
||||
|
||||
/**
|
||||
* Optional {@code ImageField} reference that represents an image to be displayed inline.
|
||||
*/
|
||||
@Input() img?: ImageField;
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.renderMarkdown = !!this.appConfig.markdown.enabled && this.enableMarkdown;
|
||||
}
|
||||
@@ -100,4 +107,14 @@ export class MetadataValuesComponent implements OnChanges {
|
||||
}
|
||||
return queryParams;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the given link value is an internal link.
|
||||
* @param linkValue - The link value to check.
|
||||
* @returns True if the link value starts with the base URL defined in the environment configuration, false otherwise.
|
||||
*/
|
||||
hasInternalLink(linkValue: string): boolean {
|
||||
return linkValue.startsWith(environment.ui.baseUrl);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user