mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Merge pull request #2945 from alexandrevryghem/home-page-facet-fixes
Fixed home page links being unclickable
This commit is contained in:
@@ -1,12 +1,19 @@
|
|||||||
<ds-home-coar></ds-home-coar>
|
<ds-home-coar></ds-home-coar>
|
||||||
<ds-themed-home-news></ds-themed-home-news>
|
<ds-themed-home-news></ds-themed-home-news>
|
||||||
<div [ngClass]="showDiscoverFilters ? 'container-fluid' : 'container'">
|
<ds-themed-configuration-search-page *ngIf="showDiscoverFilters"
|
||||||
<ds-page-with-sidebar [sidebarContent]="sidebar" [sideBarWidth]="showDiscoverFilters ? 3 : 0" [class]="showDiscoverFilters ? 'row mx-3' : ''">
|
[sideBarWidth]="3"
|
||||||
<div [class.col-sm-12]="showDiscoverFilters">
|
[showViewModes]="false"
|
||||||
<button *ngIf="showDiscoverFilters && (isXsOrSm$ | async) && sidebarService.isCollapsed" (click)="sidebarService.expand()"
|
[searchEnabled]="false"
|
||||||
class="btn btn-outline-primary d-block ml-auto mb-3">
|
[inPlaceSearch]="false"
|
||||||
<i class="fas fa-sliders"></i> {{ 'search.sidebar.open' | translate }}
|
[showScopeSelector]="false">
|
||||||
</button>
|
<ng-container searchContentTop *ngTemplateOutlet="homeContent"></ng-container>
|
||||||
|
</ds-themed-configuration-search-page>
|
||||||
|
<div *ngIf="!showDiscoverFilters" class="container">
|
||||||
|
<ng-container *ngTemplateOutlet="homeContent"></ng-container>
|
||||||
|
</div>
|
||||||
|
<ds-suggestions-popup></ds-suggestions-popup>
|
||||||
|
|
||||||
|
<ng-template #homeContent>
|
||||||
<ng-container *ngIf="(site$ | async) as site">
|
<ng-container *ngIf="(site$ | async) as site">
|
||||||
<ds-view-tracker [object]="site"></ds-view-tracker>
|
<ds-view-tracker [object]="site"></ds-view-tracker>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@@ -15,15 +22,4 @@
|
|||||||
</ds-themed-search-form>
|
</ds-themed-search-form>
|
||||||
<ds-themed-top-level-community-list></ds-themed-top-level-community-list>
|
<ds-themed-top-level-community-list></ds-themed-top-level-community-list>
|
||||||
<ds-recent-item-list *ngIf="recentSubmissionspageSize>0"></ds-recent-item-list>
|
<ds-recent-item-list *ngIf="recentSubmissionspageSize>0"></ds-recent-item-list>
|
||||||
</div>
|
|
||||||
</ds-page-with-sidebar>
|
|
||||||
</div>
|
|
||||||
<ds-suggestions-popup></ds-suggestions-popup>
|
|
||||||
|
|
||||||
<ng-template #sidebar>
|
|
||||||
<div *ngIf="showDiscoverFilters">
|
|
||||||
<ds-themed-configuration-search-page [sideBarWidth]="12" [showViewModes]="false" [searchEnabled]="false"
|
|
||||||
[inPlaceSearch]="false" [showScopeSelector]="false">
|
|
||||||
</ds-themed-configuration-search-page>
|
|
||||||
</div>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
:host ::ng-deep {
|
@include media-breakpoint-down(md) {
|
||||||
.container-fluid .container {
|
ds-themed-configuration-search-page + .container {
|
||||||
padding: 0;
|
width: 100%;
|
||||||
|
max-width: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ import {
|
|||||||
AsyncPipe,
|
AsyncPipe,
|
||||||
NgClass,
|
NgClass,
|
||||||
NgIf,
|
NgIf,
|
||||||
|
NgTemplateOutlet,
|
||||||
} from '@angular/common';
|
} from '@angular/common';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
@@ -21,10 +22,8 @@ import { Site } from '../core/shared/site.model';
|
|||||||
import { SuggestionsPopupComponent } from '../notifications/suggestions-popup/suggestions-popup.component';
|
import { SuggestionsPopupComponent } from '../notifications/suggestions-popup/suggestions-popup.component';
|
||||||
import { ConfigurationSearchPageComponent } from '../search-page/configuration-search-page.component';
|
import { ConfigurationSearchPageComponent } from '../search-page/configuration-search-page.component';
|
||||||
import { ThemedConfigurationSearchPageComponent } from '../search-page/themed-configuration-search-page.component';
|
import { ThemedConfigurationSearchPageComponent } from '../search-page/themed-configuration-search-page.component';
|
||||||
import { HostWindowService } from '../shared/host-window.service';
|
|
||||||
import { ThemedSearchFormComponent } from '../shared/search-form/themed-search-form.component';
|
import { ThemedSearchFormComponent } from '../shared/search-form/themed-search-form.component';
|
||||||
import { PageWithSidebarComponent } from '../shared/sidebar/page-with-sidebar.component';
|
import { PageWithSidebarComponent } from '../shared/sidebar/page-with-sidebar.component';
|
||||||
import { SidebarService } from '../shared/sidebar/sidebar.service';
|
|
||||||
import { ViewTrackerComponent } from '../statistics/angulartics/dspace/view-tracker.component';
|
import { ViewTrackerComponent } from '../statistics/angulartics/dspace/view-tracker.component';
|
||||||
import { HomeCoarComponent } from './home-coar/home-coar.component';
|
import { HomeCoarComponent } from './home-coar/home-coar.component';
|
||||||
import { ThemedHomeNewsComponent } from './home-news/themed-home-news.component';
|
import { ThemedHomeNewsComponent } from './home-news/themed-home-news.component';
|
||||||
@@ -36,27 +35,23 @@ import { ThemedTopLevelCommunityListComponent } from './top-level-community-list
|
|||||||
styleUrls: ['./home-page.component.scss'],
|
styleUrls: ['./home-page.component.scss'],
|
||||||
templateUrl: './home-page.component.html',
|
templateUrl: './home-page.component.html',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [ThemedHomeNewsComponent, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent],
|
imports: [ThemedHomeNewsComponent, NgTemplateOutlet, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule, NgClass, ConfigurationSearchPageComponent, SuggestionsPopupComponent, ThemedConfigurationSearchPageComponent, PageWithSidebarComponent, HomeCoarComponent],
|
||||||
})
|
})
|
||||||
export class HomePageComponent implements OnInit {
|
export class HomePageComponent implements OnInit {
|
||||||
|
|
||||||
site$: Observable<Site>;
|
site$: Observable<Site>;
|
||||||
isXsOrSm$: Observable<boolean>;
|
|
||||||
recentSubmissionspageSize: number;
|
recentSubmissionspageSize: number;
|
||||||
showDiscoverFilters: boolean;
|
showDiscoverFilters: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(APP_CONFIG) protected appConfig: AppConfig,
|
@Inject(APP_CONFIG) protected appConfig: AppConfig,
|
||||||
protected route: ActivatedRoute,
|
protected route: ActivatedRoute,
|
||||||
protected sidebarService: SidebarService,
|
|
||||||
protected windowService: HostWindowService,
|
|
||||||
) {
|
) {
|
||||||
this.recentSubmissionspageSize = this.appConfig.homePage.recentSubmissions.pageSize;
|
this.recentSubmissionspageSize = this.appConfig.homePage.recentSubmissions.pageSize;
|
||||||
this.showDiscoverFilters = this.appConfig.homePage.showDiscoverFilters;
|
this.showDiscoverFilters = this.appConfig.homePage.showDiscoverFilters;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.isXsOrSm$ = this.windowService.isXsOrSm();
|
|
||||||
this.site$ = this.route.data.pipe(
|
this.site$ = this.route.data.pipe(
|
||||||
map((data) => data.site as Site),
|
map((data) => data.site as Site),
|
||||||
);
|
);
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
| translate}}
|
| translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<ng-content select="[searchContentTop]"></ng-content>
|
||||||
<ds-themed-search-results *ngIf="inPlaceSearch"
|
<ds-themed-search-results *ngIf="inPlaceSearch"
|
||||||
[searchResults]="resultsRD$ | async"
|
[searchResults]="resultsRD$ | async"
|
||||||
[searchConfig]="searchOptions$ | async"
|
[searchConfig]="searchOptions$ | async"
|
||||||
|
Reference in New Issue
Block a user