diff --git a/src/app/+collection-page/collection-page.component.ts b/src/app/+collection-page/collection-page.component.ts index c1ef2522d1..5b158f4a3c 100644 --- a/src/app/+collection-page/collection-page.component.ts +++ b/src/app/+collection-page/collection-page.component.ts @@ -51,7 +51,7 @@ export class CollectionPageComponent implements OnInit, OnDestroy { this.paginationConfig.id = 'collection-page-pagination'; this.paginationConfig.pageSize = 5; this.paginationConfig.currentPage = 1; - this.sortConfig = new SortOptions('dc.date.accessioned', SortDirection.DESC); + this.sortConfig = new SortOptions('dc.date.issued', SortDirection.DESC); } ngOnInit(): void { @@ -76,7 +76,7 @@ export class CollectionPageComponent implements OnInit, OnDestroy { ); const sort = Object.assign({}, this.sortConfig, - { direction: sortDirection, field: params.sortField } + { direction: sortDirection, field: this.sortConfig.field } ); this.collectionRD$.subscribe((rd: RemoteData) => { this.collectionId = rd.payload.id; diff --git a/src/app/core/shared/dspace-object.model.ts b/src/app/core/shared/dspace-object.model.ts index 1c83d298e2..085988d745 100644 --- a/src/app/core/shared/dspace-object.model.ts +++ b/src/app/core/shared/dspace-object.model.ts @@ -119,21 +119,21 @@ export class DSpaceObject implements CacheableObject, ListableObject { } /** - * Find metadata on a specific field and order all of them using their "order" property. + * Find metadata on a specific field and order all of them using their "place" property. * @param key */ findMetadataSortedByPlace(key: string): MetadataValue[] { return this.allMetadata([key]).sort((a: MetadataValue, b: MetadataValue) => { - if (hasNoValue(a.order) && hasNoValue(b.order)) { + if (hasNoValue(a.place) && hasNoValue(b.place)) { return 0; } - if (hasNoValue(a.order)) { + if (hasNoValue(a.place)) { return -1; } - if (hasNoValue(b.order)) { + if (hasNoValue(b.place)) { return 1; } - return a.order - b.order; + return a.place - b.place; }); } diff --git a/src/app/core/shared/metadata.models.ts b/src/app/core/shared/metadata.models.ts index 0df139a5cd..c843b0ec74 100644 --- a/src/app/core/shared/metadata.models.ts +++ b/src/app/core/shared/metadata.models.ts @@ -29,7 +29,7 @@ export class MetadataValue { * This is used to render metadata in a specific custom order */ @autoserialize - order: number; + place: number; /** The authority key used for authority-controlled metadata */ @autoserialize @@ -91,7 +91,7 @@ export class MetadatumViewModel { * The place of this MetadataValue within his list of metadata * This is used to render metadata in a specific custom order */ - order: number; + place: number; /** The authority key used for authority-controlled metadata */ authority: string; diff --git a/src/app/shared/object-list/item-list-element/item-types/journal/journal-list-element.component.html b/src/app/shared/object-list/item-list-element/item-types/journal/journal-list-element.component.html index c254d74f57..32c8074503 100644 --- a/src/app/shared/object-list/item-list-element/item-types/journal/journal-list-element.component.html +++ b/src/app/shared/object-list/item-list-element/item-types/journal/journal-list-element.component.html @@ -4,9 +4,9 @@ [innerHTML]="firstMetadataValue('dc.title')"> - - +