mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
#150 Merge fixes
This commit is contained in:
@@ -12,7 +12,7 @@ import { Item } from '../../core/shared/item.model';
|
||||
import { SearchFilterConfig } from './search-filter-config.model';
|
||||
import { FilterType } from './filter-type.model';
|
||||
import { FacetValue } from './facet-value.model';
|
||||
import { ItemSearchResult } from '../../object-collection/shared/item-search-result.model';
|
||||
import { ItemSearchResult } from '../../shared/object-collection/shared/item-search-result.model';
|
||||
import { ViewMode } from '../../+search-page/search-options.model';
|
||||
import { Router, NavigationExtras, ActivatedRoute } from '@angular/router';
|
||||
import { ItemSearchResult } from '../../shared/object-collection/shared/item-search-result.model';
|
||||
|
@@ -1,12 +1,14 @@
|
||||
<ds-object-list [config]="config"
|
||||
[sortConfig]="sortConfig"
|
||||
[objects]="objects"
|
||||
[hideGear]="hideGear"
|
||||
*ngIf="getViewMode()===viewModeEnum.List">
|
||||
</ds-object-list>
|
||||
|
||||
<ds-object-grid [config]="config"
|
||||
[sortConfig]="sortConfig"
|
||||
[objects]="objects"
|
||||
[hideGear]="true"
|
||||
*ngIf="getViewMode()===viewModeEnum.Grid">
|
||||
</ds-object-grid>
|
||||
|
||||
|
@@ -27,6 +27,7 @@ export class ObjectCollectionComponent implements OnChanges, OnInit {
|
||||
@Input() objects: RemoteData<ListableObject[]>;
|
||||
@Input() config?: PaginationComponentOptions;
|
||||
@Input() sortConfig: SortOptions;
|
||||
@Input() hideGear = false;
|
||||
pageInfo: Observable<PageInfo>;
|
||||
private sub;
|
||||
/**
|
||||
@@ -60,13 +61,13 @@ export class ObjectCollectionComponent implements OnChanges, OnInit {
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (changes.objects && !changes.objects.isFirstChange()) {
|
||||
this.pageInfo = this.objects.pageInfo;
|
||||
// this.pageInfo = this.objects.pageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
this.pageInfo = this.objects.pageInfo;
|
||||
// this.pageInfo = this.objects.pageInfo;
|
||||
|
||||
this.sub = this.route
|
||||
.queryParams
|
||||
|
@@ -10,9 +10,9 @@
|
||||
(sortDirectionChange)="onSortDirectionChange($event)"
|
||||
(sortFieldChange)="onSortDirectionChange($event)"
|
||||
(paginationChange)="onPaginationChange($event)">
|
||||
<div class="row mt-2" *ngIf="objects.hasSucceeded | async" @fadeIn>
|
||||
<div class="row mt-2" *ngIf="objects?.hasSucceeded" @fadeIn>
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 "
|
||||
*ngFor="let object of (objects.payload | async) | paginate: { itemsPerPage: (pageInfo | async)?.elementsPerPage, currentPage: (pageInfo | async)?.currentPage, totalItems: (pageInfo | async)?.totalElements }">
|
||||
*ngFor="let object of objects?.payload">
|
||||
<ds-wrapper-grid-element [object]="object"></ds-wrapper-grid-element>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -17,6 +17,10 @@ ds-wrapper-grid-element ::ng-deep {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.item-authors{
|
||||
line-height: $line-height-base;
|
||||
height: ($line-height-base*1.5)+em;
|
||||
}
|
||||
div.card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
@@ -64,12 +64,12 @@ export class ObjectGridComponent implements OnChanges, OnInit {
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (changes.objects && !changes.objects.isFirstChange()) {
|
||||
this.pageInfo = this.objects.pageInfo;
|
||||
// this.pageInfo = this.objects.pageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.pageInfo = this.objects.pageInfo;
|
||||
// this.pageInfo = this.objects.pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -7,8 +7,6 @@ import {
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
|
||||
import { SortDirection, SortOptions } from '../core/cache/models/sort-options.model';
|
||||
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { PageInfo } from '../../core/shared/page-info.model';
|
||||
|
||||
@@ -18,9 +16,8 @@ import { SortOptions, SortDirection } from '../../core/cache/models/sort-options
|
||||
|
||||
import { fadeIn } from '../animations/fade';
|
||||
import { ListableObject } from '../object-collection/shared/listable-object.model';
|
||||
import { hasValue } from '../shared/empty.util';
|
||||
import { hasValue } from '../empty.util';
|
||||
|
||||
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Default,
|
||||
@@ -86,28 +83,6 @@ export class ObjectListComponent {
|
||||
*/
|
||||
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
|
||||
data: any = {};
|
||||
|
||||
|
||||
onPageChange(event) {
|
||||
this.pageChange.emit(event);
|
||||
}
|
||||
|
||||
onPageSizeChange(event) {
|
||||
this.pageSizeChange.emit(event);
|
||||
}
|
||||
|
||||
onSortDirectionChange(event) {
|
||||
this.sortDirectionChange.emit(event);
|
||||
}
|
||||
|
||||
onSortFieldChange(event) {
|
||||
this.sortFieldChange.emit(event);
|
||||
}
|
||||
|
||||
onPaginationChange(event) {
|
||||
this.paginationChange.emit(event);
|
||||
}
|
||||
|
||||
onPageChange(event) {
|
||||
this.pageChange.emit(event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user