mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
make search-settings.component themed
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ThemedComponent } from '../../theme-support/themed.component';
|
||||
import { SearchSettingsComponent } from './search-settings.component';
|
||||
import { SortOptions } from '../../../core/cache/models/sort-options.model';
|
||||
|
||||
/**
|
||||
* Themed wrapper for SearchSettingsComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-search-settings',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedSearchSettingsComponent extends ThemedComponent<SearchSettingsComponent> {
|
||||
@Input() currentSortOption: SortOptions;
|
||||
@Input() sortOptionsList: SortOptions[];
|
||||
|
||||
|
||||
protected inAndOutputNames: (keyof SearchSettingsComponent & keyof this)[] = [
|
||||
'currentSortOption', 'sortOptionsList'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'SearchSettingsComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../themes/${themeName}/app/shared/search/search-settings/search-settings.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./search-settings.component');
|
||||
}
|
||||
}
|
@@ -28,12 +28,14 @@ import { MissingTranslationHelper } from '../translate/missing-translation.helpe
|
||||
import { SharedModule } from '../shared.module';
|
||||
import { SearchResultsComponent } from './search-results/search-results.component';
|
||||
import { SearchComponent } from './search.component';
|
||||
import { ThemedSearchSettingsComponent } from './search-settings/themed-search-settings.component';
|
||||
|
||||
const COMPONENTS = [
|
||||
SearchComponent,
|
||||
SearchResultsComponent,
|
||||
SearchSidebarComponent,
|
||||
SearchSettingsComponent,
|
||||
ThemedSearchSettingsComponent,
|
||||
SearchFiltersComponent,
|
||||
SearchFilterComponent,
|
||||
SearchFacetFilterComponent,
|
||||
|
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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 {
|
||||
SearchSettingsComponent as BaseComponent,
|
||||
} from '../../../../../app/shared/search/search-settings/search-settings.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-settings',
|
||||
// styleUrls: ['./search-settings.component.scss'],
|
||||
styleUrls: ['../../../../../app/shared/search/search-settings/search-settings.component.scss'],
|
||||
// templateUrl: './search-settings.component.html',
|
||||
templateUrl: '../../../../../app/shared/search/search-settings/search-settings.component.html',
|
||||
providers: [
|
||||
{
|
||||
provide: SEARCH_CONFIG_SERVICE,
|
||||
useClass: SearchConfigurationService
|
||||
}
|
||||
]
|
||||
|
||||
})
|
||||
|
||||
export class SearchSettingsComponent 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 { SearchSettingsComponent } from './app/shared/search-settings/search-settings.component';
|
||||
|
||||
const DECLARATIONS = [
|
||||
FileSectionComponent,
|
||||
@@ -126,7 +127,8 @@ const DECLARATIONS = [
|
||||
NavbarComponent,
|
||||
HeaderNavbarWrapperComponent,
|
||||
BreadcrumbsComponent,
|
||||
FeedbackComponent
|
||||
FeedbackComponent,
|
||||
SearchSettingsComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
Reference in New Issue
Block a user