mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 11:33:04 +00:00
101623: Fixes after merge
This commit is contained in:
@@ -3,6 +3,7 @@ import { MetadataValue } from '../../../core/shared/metadata.models';
|
|||||||
import { APP_CONFIG, AppConfig } from '../../../../config/app-config.interface';
|
import { APP_CONFIG, AppConfig } from '../../../../config/app-config.interface';
|
||||||
import { BrowseDefinition } from '../../../core/shared/browse-definition.model';
|
import { BrowseDefinition } from '../../../core/shared/browse-definition.model';
|
||||||
import { hasValue } from '../../../shared/empty.util';
|
import { hasValue } from '../../../shared/empty.util';
|
||||||
|
import { VALUE_LIST_BROWSE_DEFINITION } from '../../../core/shared/value-list-browse-definition.resource-type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders the configured 'values' into the ds-metadata-field-wrapper component.
|
* This component renders the configured 'values' into the ds-metadata-field-wrapper component.
|
||||||
@@ -84,7 +85,7 @@ export class MetadataValuesComponent implements OnChanges {
|
|||||||
*/
|
*/
|
||||||
getQueryParams(value) {
|
getQueryParams(value) {
|
||||||
let queryParams = {startsWith: value};
|
let queryParams = {startsWith: value};
|
||||||
if (this.browseDefinition.metadataBrowse) {
|
if (this.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) {
|
||||||
return {value: value};
|
return {value: value};
|
||||||
}
|
}
|
||||||
return queryParams;
|
return queryParams;
|
||||||
|
@@ -2,6 +2,7 @@ import { MetadataRepresentationType } from '../../../../core/shared/metadata-rep
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component';
|
import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component';
|
||||||
import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator';
|
import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator';
|
||||||
|
import { VALUE_LIST_BROWSE_DEFINITION } from '../../../../core/shared/value-list-browse-definition.resource-type';
|
||||||
//@metadataRepresentationComponent('Publication', MetadataRepresentationType.PlainText)
|
//@metadataRepresentationComponent('Publication', MetadataRepresentationType.PlainText)
|
||||||
// For now, authority controlled fields are rendered the same way as plain text fields
|
// For now, authority controlled fields are rendered the same way as plain text fields
|
||||||
//@metadataRepresentationComponent('Publication', MetadataRepresentationType.AuthorityControlled)
|
//@metadataRepresentationComponent('Publication', MetadataRepresentationType.AuthorityControlled)
|
||||||
@@ -21,7 +22,7 @@ export class BrowseLinkMetadataListElementComponent extends MetadataRepresentati
|
|||||||
*/
|
*/
|
||||||
getQueryParams() {
|
getQueryParams() {
|
||||||
let queryParams = {startsWith: this.metadataRepresentation.getValue()};
|
let queryParams = {startsWith: this.metadataRepresentation.getValue()};
|
||||||
if (this.metadataRepresentation.browseDefinition.metadataBrowse) {
|
if (this.metadataRepresentation.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) {
|
||||||
return {value: this.metadataRepresentation.getValue()};
|
return {value: this.metadataRepresentation.getValue()};
|
||||||
}
|
}
|
||||||
return queryParams;
|
return queryParams;
|
||||||
|
@@ -2,6 +2,7 @@ import { MetadataRepresentationType } from '../../../../core/shared/metadata-rep
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component';
|
import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component';
|
||||||
import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator';
|
import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator';
|
||||||
|
import { VALUE_LIST_BROWSE_DEFINITION } from '../../../../core/shared/value-list-browse-definition.resource-type';
|
||||||
|
|
||||||
@metadataRepresentationComponent('Publication', MetadataRepresentationType.PlainText)
|
@metadataRepresentationComponent('Publication', MetadataRepresentationType.PlainText)
|
||||||
// For now, authority controlled fields are rendered the same way as plain text fields
|
// For now, authority controlled fields are rendered the same way as plain text fields
|
||||||
@@ -21,7 +22,7 @@ export class PlainTextMetadataListElementComponent extends MetadataRepresentatio
|
|||||||
*/
|
*/
|
||||||
getQueryParams() {
|
getQueryParams() {
|
||||||
let queryParams = {startsWith: this.metadataRepresentation.getValue()};
|
let queryParams = {startsWith: this.metadataRepresentation.getValue()};
|
||||||
if (this.metadataRepresentation.browseDefinition.metadataBrowse) {
|
if (this.metadataRepresentation.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) {
|
||||||
return {value: this.metadataRepresentation.getValue()};
|
return {value: this.metadataRepresentation.getValue()};
|
||||||
}
|
}
|
||||||
return queryParams;
|
return queryParams;
|
||||||
|
@@ -5,12 +5,14 @@ import { BrowseDefinition } from '../../core/shared/browse-definition.model';
|
|||||||
import { BrowseService } from '../../core/browse/browse.service';
|
import { BrowseService } from '../../core/browse/browse.service';
|
||||||
import { createSuccessfulRemoteDataObject } from '../remote-data.utils';
|
import { createSuccessfulRemoteDataObject } from '../remote-data.utils';
|
||||||
import { PageInfo } from '../../core/shared/page-info.model';
|
import { PageInfo } from '../../core/shared/page-info.model';
|
||||||
|
import { FlatBrowseDefinition } from '../../core/shared/flat-browse-definition.model';
|
||||||
|
import { ValueListBrowseDefinition } from '../../core/shared/value-list-browse-definition.model';
|
||||||
|
|
||||||
// This data is in post-serialized form (metadata -> metadataKeys)
|
// This data is in post-serialized form (metadata -> metadataKeys)
|
||||||
export const mockData: BrowseDefinition[] = [
|
export const mockData: BrowseDefinition[] = [
|
||||||
Object.assign(new BrowseDefinition, {
|
Object.assign(new FlatBrowseDefinition(), {
|
||||||
'id' : 'dateissued',
|
'id' : 'dateissued',
|
||||||
'metadataBrowse' : false,
|
'browseType': 'flatBrowse',
|
||||||
'dataType' : 'date',
|
'dataType' : 'date',
|
||||||
'sortOptions' : EMPTY,
|
'sortOptions' : EMPTY,
|
||||||
'order' : 'ASC',
|
'order' : 'ASC',
|
||||||
@@ -18,9 +20,9 @@ export const mockData: BrowseDefinition[] = [
|
|||||||
'metadataKeys' : [ 'dc.date.issued' ],
|
'metadataKeys' : [ 'dc.date.issued' ],
|
||||||
'_links' : EMPTY
|
'_links' : EMPTY
|
||||||
}),
|
}),
|
||||||
Object.assign(new BrowseDefinition, {
|
Object.assign(new ValueListBrowseDefinition(), {
|
||||||
'id' : 'author',
|
'id' : 'author',
|
||||||
'metadataBrowse' : true,
|
'browseType' : 'valueList',
|
||||||
'dataType' : 'text',
|
'dataType' : 'text',
|
||||||
'sortOptions' : EMPTY,
|
'sortOptions' : EMPTY,
|
||||||
'order' : 'ASC',
|
'order' : 'ASC',
|
||||||
|
Reference in New Issue
Block a user