mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Made SearchFiltersComponent themeable
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ThemedComponent } from '../../theme-support/themed.component';
|
||||
import { SearchFiltersComponent } from './search-filters.component';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
|
||||
/**
|
||||
* Themed wrapper for SearchFiltersComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-search-filters',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedSearchFiltersComponent extends ThemedComponent<SearchFiltersComponent> {
|
||||
|
||||
@Input() currentConfiguration;
|
||||
@Input() currentScope: string;
|
||||
@Input() inPlaceSearch;
|
||||
@Input() refreshFilters: Observable<any>;
|
||||
|
||||
protected inAndOutputNames: (keyof SearchFiltersComponent & keyof this)[] = [
|
||||
'currentConfiguration', 'currentScope', 'inPlaceSearch', 'refreshFilters'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'SearchFiltersComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../themes/${themeName}/app/shared/search/search-filters/search-filters.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./search-filters.component');
|
||||
}
|
||||
}
|
@@ -17,10 +17,10 @@
|
||||
[defaultConfiguration]="configuration"
|
||||
[inPlaceSearch]="inPlaceSearch"
|
||||
(changeConfiguration)="changeConfiguration.emit($event)"></ds-search-switch-configuration>
|
||||
<ds-search-filters [currentScope]="currentScope"
|
||||
<ds-themed-search-filters [currentScope]="currentScope"
|
||||
[currentConfiguration]="configuration"
|
||||
[refreshFilters]="refreshFilters"
|
||||
[inPlaceSearch]="inPlaceSearch"></ds-search-filters>
|
||||
[inPlaceSearch]="inPlaceSearch"></ds-themed-search-filters>
|
||||
<ds-search-settings [currentSortOption]="currentSortOption" [sortOptionsList]="sortOptionsList"></ds-search-settings>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -29,6 +29,7 @@ import { SharedModule } from '../shared.module';
|
||||
import { SearchResultsComponent } from './search-results/search-results.component';
|
||||
import { SearchComponent } from './search.component';
|
||||
import { ThemedSearchComponent } from './themed-search.component';
|
||||
import { ThemedSearchFiltersComponent } from './search-filters/themed-search-filters.component';
|
||||
|
||||
const COMPONENTS = [
|
||||
SearchComponent,
|
||||
@@ -52,7 +53,8 @@ const COMPONENTS = [
|
||||
SearchAuthorityFilterComponent,
|
||||
SearchSwitchConfigurationComponent,
|
||||
ConfigurationSearchPageComponent,
|
||||
ThemedConfigurationSearchPageComponent
|
||||
ThemedConfigurationSearchPageComponent,
|
||||
ThemedSearchFiltersComponent,
|
||||
];
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
|
@@ -0,0 +1 @@
|
||||
TEST
|
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE_ATMIRE and NOTICE_ATMIRE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* https://www.atmire.com/software-license/
|
||||
*/
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
SearchFiltersComponent as BaseComponent,
|
||||
} from '../../../../../../app/shared/search/search-filters/search-filters.component';
|
||||
import { SEARCH_CONFIG_SERVICE } from '../../../../../../app/my-dspace-page/my-dspace-page.component';
|
||||
import { SearchConfigurationService } from '../../../../../../app/core/shared/search/search-configuration.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'ds-search-filters',
|
||||
// styleUrls: ['./search-filters.component.scss'],
|
||||
styleUrls: ['../../../../../../app/shared/search/search-filters/search-filters.component.scss'],
|
||||
// templateUrl: './search-filters.component.html',
|
||||
templateUrl: '../../../../../../app/shared/search/search-filters/search-filters.component.html',
|
||||
providers: [
|
||||
{
|
||||
provide: SEARCH_CONFIG_SERVICE,
|
||||
useClass: SearchConfigurationService
|
||||
}
|
||||
]
|
||||
|
||||
})
|
||||
|
||||
export class SearchFiltersComponent extends BaseComponent {
|
||||
}
|
@@ -84,6 +84,7 @@ import { SearchModule } from '../../app/shared/search/search.module';
|
||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
||||
import { ComcolModule } from '../../app/shared/comcol/comcol.module';
|
||||
import { FeedbackComponent } from './app/info/feedback/feedback.component';
|
||||
import { SearchFiltersComponent } from './app/shared/search/search-filters/search-filters.component';
|
||||
|
||||
const DECLARATIONS = [
|
||||
FileSectionComponent,
|
||||
@@ -126,7 +127,8 @@ const DECLARATIONS = [
|
||||
NavbarComponent,
|
||||
HeaderNavbarWrapperComponent,
|
||||
BreadcrumbsComponent,
|
||||
FeedbackComponent
|
||||
FeedbackComponent,
|
||||
SearchFiltersComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
Reference in New Issue
Block a user