mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Merge branch 'w2p-88300_issue-1379-7.0' into w2p-88300_issue-1379
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<div>
|
||||
<button id="nav-prev" type="button" class="btn btn-outline-primary float-left" (click)="goPrev()" [disabled]="objects?.payload?.currentPage <= 1"><i class="fas fa-angle-left"></i> {{'browse.previous.button' |translate}}</button>
|
||||
<button id="nav-next" type="button" class="btn btn-outline-primary float-right" (click)="goNext()" [disabled]="objects?.payload?.currentPage >= objects?.payload?.totalPages">
|
||||
<span [ngbTooltip]="objects?.payload?.currentPage >= objects?.payload?.totalPages ? 'browse.next.button.disabled.tooltip': null">
|
||||
<span [ngbTooltip]="objects?.payload?.currentPage >= objects?.payload?.totalPages ? getTranslation('browse.next.button.disabled.tooltip') : null">
|
||||
<i class="fas fa-angle-right"></i> {{'browse.next.button' |translate}}
|
||||
</span>
|
||||
</button>
|
||||
|
@@ -12,6 +12,8 @@ import { ViewMode } from '../../core/shared/view-mode.model';
|
||||
import { RouteService } from '../../core/services/route.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { hasValue } from '../empty.util';
|
||||
import { Location } from '@angular/common';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-browse-by',
|
||||
@@ -114,7 +116,8 @@ export class BrowseByComponent implements OnInit {
|
||||
|
||||
public constructor(private injector: Injector,
|
||||
protected paginationService: PaginationService,
|
||||
private routeService: RouteService
|
||||
private routeService: RouteService,
|
||||
protected translate: TranslateService
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -171,7 +174,10 @@ export class BrowseByComponent implements OnInit {
|
||||
this.shouldDisplayResetButton$ = observableCombineLatest([startsWith$, value$]).pipe(
|
||||
map(([startsWith, value]) => hasValue(startsWith) || hasValue(value))
|
||||
);
|
||||
}
|
||||
|
||||
getTranslation(key: string): Observable<string> {
|
||||
return this.translate.instant(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user