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 { SearchFilterConfig } from './search-filter-config.model';
|
||||||
import { FilterType } from './filter-type.model';
|
import { FilterType } from './filter-type.model';
|
||||||
import { FacetValue } from './facet-value.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 { ViewMode } from '../../+search-page/search-options.model';
|
||||||
import { Router, NavigationExtras, ActivatedRoute } from '@angular/router';
|
import { Router, NavigationExtras, ActivatedRoute } from '@angular/router';
|
||||||
import { ItemSearchResult } from '../../shared/object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../shared/object-collection/shared/item-search-result.model';
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
<ds-object-list [config]="config"
|
<ds-object-list [config]="config"
|
||||||
[sortConfig]="sortConfig"
|
[sortConfig]="sortConfig"
|
||||||
[objects]="objects"
|
[objects]="objects"
|
||||||
|
[hideGear]="hideGear"
|
||||||
*ngIf="getViewMode()===viewModeEnum.List">
|
*ngIf="getViewMode()===viewModeEnum.List">
|
||||||
</ds-object-list>
|
</ds-object-list>
|
||||||
|
|
||||||
<ds-object-grid [config]="config"
|
<ds-object-grid [config]="config"
|
||||||
[sortConfig]="sortConfig"
|
[sortConfig]="sortConfig"
|
||||||
[objects]="objects"
|
[objects]="objects"
|
||||||
|
[hideGear]="true"
|
||||||
*ngIf="getViewMode()===viewModeEnum.Grid">
|
*ngIf="getViewMode()===viewModeEnum.Grid">
|
||||||
</ds-object-grid>
|
</ds-object-grid>
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@ export class ObjectCollectionComponent implements OnChanges, OnInit {
|
|||||||
@Input() objects: RemoteData<ListableObject[]>;
|
@Input() objects: RemoteData<ListableObject[]>;
|
||||||
@Input() config?: PaginationComponentOptions;
|
@Input() config?: PaginationComponentOptions;
|
||||||
@Input() sortConfig: SortOptions;
|
@Input() sortConfig: SortOptions;
|
||||||
|
@Input() hideGear = false;
|
||||||
pageInfo: Observable<PageInfo>;
|
pageInfo: Observable<PageInfo>;
|
||||||
private sub;
|
private sub;
|
||||||
/**
|
/**
|
||||||
@@ -60,13 +61,13 @@ export class ObjectCollectionComponent implements OnChanges, OnInit {
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes.objects && !changes.objects.isFirstChange()) {
|
if (changes.objects && !changes.objects.isFirstChange()) {
|
||||||
this.pageInfo = this.objects.pageInfo;
|
// this.pageInfo = this.objects.pageInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.pageInfo = this.objects.pageInfo;
|
// this.pageInfo = this.objects.pageInfo;
|
||||||
|
|
||||||
this.sub = this.route
|
this.sub = this.route
|
||||||
.queryParams
|
.queryParams
|
||||||
|
@@ -10,9 +10,9 @@
|
|||||||
(sortDirectionChange)="onSortDirectionChange($event)"
|
(sortDirectionChange)="onSortDirectionChange($event)"
|
||||||
(sortFieldChange)="onSortDirectionChange($event)"
|
(sortFieldChange)="onSortDirectionChange($event)"
|
||||||
(paginationChange)="onPaginationChange($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 "
|
<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>
|
<ds-wrapper-grid-element [object]="object"></ds-wrapper-grid-element>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -17,6 +17,10 @@ ds-wrapper-grid-element ::ng-deep {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
.item-authors{
|
||||||
|
line-height: $line-height-base;
|
||||||
|
height: ($line-height-base*1.5)+em;
|
||||||
|
}
|
||||||
div.card {
|
div.card {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
@@ -64,12 +64,12 @@ export class ObjectGridComponent implements OnChanges, OnInit {
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes.objects && !changes.objects.isFirstChange()) {
|
if (changes.objects && !changes.objects.isFirstChange()) {
|
||||||
this.pageInfo = this.objects.pageInfo;
|
// this.pageInfo = this.objects.pageInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.pageInfo = this.objects.pageInfo;
|
// this.pageInfo = this.objects.pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -7,8 +7,6 @@ import {
|
|||||||
ViewEncapsulation
|
ViewEncapsulation
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { SortDirection, SortOptions } from '../core/cache/models/sort-options.model';
|
|
||||||
|
|
||||||
import { RemoteData } from '../../core/data/remote-data';
|
import { RemoteData } from '../../core/data/remote-data';
|
||||||
import { PageInfo } from '../../core/shared/page-info.model';
|
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 { fadeIn } from '../animations/fade';
|
||||||
import { ListableObject } from '../object-collection/shared/listable-object.model';
|
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({
|
@Component({
|
||||||
changeDetection: ChangeDetectionStrategy.Default,
|
changeDetection: ChangeDetectionStrategy.Default,
|
||||||
@@ -86,28 +83,6 @@ export class ObjectListComponent {
|
|||||||
*/
|
*/
|
||||||
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
|
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
|
||||||
data: any = {};
|
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) {
|
onPageChange(event) {
|
||||||
this.pageChange.emit(event);
|
this.pageChange.emit(event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user