mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Fixed previous cherry pick
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { IntegrationModel } from './integration.model';
|
import { IntegrationModel } from './integration.model';
|
||||||
import { autoserialize } from 'cerialize';
|
import { autoserialize } from 'cerialize';
|
||||||
import { isNotEmpty } from '../../../shared/empty.util';
|
import { isNotEmpty } from '../../../shared/empty.util';
|
||||||
|
import { PLACEHOLDER_PARENT_METADATA } from '../../../shared/form/builder/ds-dynamic-form-ui/models/dynamic-group/dynamic-group.model';
|
||||||
|
|
||||||
export class AuthorityValue extends IntegrationModel {
|
export class AuthorityValue extends IntegrationModel {
|
||||||
|
|
||||||
@@ -19,12 +20,23 @@ export class AuthorityValue extends IntegrationModel {
|
|||||||
@autoserialize
|
@autoserialize
|
||||||
language: string;
|
language: string;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
hasAuthority(): boolean {
|
||||||
|
return isNotEmpty(this.id);
|
||||||
|
}
|
||||||
|
|
||||||
@autoserialize
|
@autoserialize
|
||||||
hasValue(): boolean {
|
hasValue(): boolean {
|
||||||
return isNotEmpty(this.value);
|
return isNotEmpty(this.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
hasOtherInformation(): boolean {
|
hasOtherInformation(): boolean {
|
||||||
return isNotEmpty(this.otherInformation);
|
return isNotEmpty(this.otherInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
hasPlaceholder() {
|
||||||
|
return this.hasValue() && this.value === PLACEHOLDER_PARENT_METADATA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@ import { hasValue, isNotEmpty } from '../../empty.util';
|
|||||||
import { PLACEHOLDER_PARENT_METADATA } from '../../form/builder/ds-dynamic-form-ui/models/dynamic-group/dynamic-group.model';
|
import { PLACEHOLDER_PARENT_METADATA } from '../../form/builder/ds-dynamic-form-ui/models/dynamic-group/dynamic-group.model';
|
||||||
import { MetadataIconConfig } from '../../../../config/submission-config.interface';
|
import { MetadataIconConfig } from '../../../../config/submission-config.interface';
|
||||||
import { FormFieldMetadataValueObject } from '../../form/builder/models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../../form/builder/models/form-field-metadata-value.model';
|
||||||
import { AuthorityValueModel } from '../../../core/integration/models/authority-value.model';
|
import { AuthorityValue } from '../../../core/integration/models/authority.value';
|
||||||
|
|
||||||
export class Chips {
|
export class Chips {
|
||||||
chipsItems: BehaviorSubject<ChipsItem[]>;
|
chipsItems: BehaviorSubject<ChipsItem[]>;
|
||||||
@@ -102,7 +102,7 @@ export class Chips {
|
|||||||
|
|
||||||
private getChipsIcons(item) {
|
private getChipsIcons(item) {
|
||||||
const icons = [];
|
const icons = [];
|
||||||
if (item instanceof FormFieldMetadataValueObject || item instanceof AuthorityValueModel) {
|
if (typeof item === 'string' || item instanceof FormFieldMetadataValueObject || item instanceof AuthorityValue) {
|
||||||
return icons;
|
return icons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -50,13 +50,22 @@
|
|||||||
<button ngbDropdownAnchor
|
<button ngbDropdownAnchor
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
type="button"
|
type="button"
|
||||||
|
ngbTooltip="{{'form.search-help' | translate}}"
|
||||||
|
placement="top"
|
||||||
[disabled]="model.readOnly || isSearchDisabled()"
|
[disabled]="model.readOnly || isSearchDisabled()"
|
||||||
[hidden]="isInputDisabled()"
|
[hidden]="isInputDisabled()"
|
||||||
(click)="sdRef.open(); search(); $event.stopPropagation();">{{'form.search' | translate}}
|
(click)="sdRef.open(); search(); $event.stopPropagation();">{{'form.search' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
<button *ngIf="isInputDisabled()" class="btn btn-secondary"
|
||||||
|
type="button"
|
||||||
|
ngbTooltip="{{'form.clear-help' | translate}}"
|
||||||
|
placement="top"
|
||||||
|
[disabled]="model.readOnly"
|
||||||
|
(click)="remove($event)">{{'form.clear' | translate}}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isInputDisabled()" class="col-auto text-center">
|
<div class="col-auto text-center">
|
||||||
<button class="btn btn-secondary"
|
<button *ngIf="!editMode" class="btn btn-secondary"
|
||||||
type="button"
|
type="button"
|
||||||
ngbTooltip="{{'form.edit-help' | translate}}"
|
ngbTooltip="{{'form.edit-help' | translate}}"
|
||||||
placement="top"
|
placement="top"
|
||||||
|
Reference in New Issue
Block a user