Files
dspace-angular/src/app/+item-page/field-components/metadata-uri-values/metadata-uri-values.component.ts
2019-02-26 16:06:33 +01:00

28 lines
943 B
TypeScript

import { Component, Input } from '@angular/core';
import { MetadataValuesComponent } from '../metadata-values/metadata-values.component';
import { MetadataValue } from '../../../core/shared/metadata.models';
/**
* This component renders the configured 'values' into the ds-metadata-field-wrapper component as a link.
* It puts the given 'separator' between each two values
* and creates an 'a' tag for each value,
* using the 'linktext' as it's value (if it exists)
* and using the values as the 'href' attribute (and as value of the tag when no 'linktext' is defined)
*/
@Component({
selector: 'ds-metadata-uri-values',
styleUrls: ['./metadata-uri-values.component.scss'],
templateUrl: './metadata-uri-values.component.html'
})
export class MetadataUriValuesComponent extends MetadataValuesComponent {
@Input() linktext: any;
@Input() mdValues: MetadataValue[];
@Input() separator: string;
@Input() label: string;
}