108588: Moved CommunityPageSubCommunityListComponent & CommunityPageSubCollectionListComponent to a custom sections folder

This commit is contained in:
Alexandre Vryghem
2023-11-19 03:22:37 +01:00
parent 2fb393db7f
commit 0483612819
20 changed files with 99 additions and 104 deletions

View File

@@ -4,9 +4,9 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '../shared/shared.module'; import { SharedModule } from '../shared/shared.module';
import { CommunityPageComponent } from './community-page.component'; import { CommunityPageComponent } from './community-page.component';
import { CommunityPageSubCollectionListComponent } from './sub-collection-list/community-page-sub-collection-list.component'; import { CommunityPageSubCollectionListComponent } from './sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component';
import { CommunityPageRoutingModule } from './community-page-routing.module'; import { CommunityPageRoutingModule } from './community-page-routing.module';
import { CommunityPageSubCommunityListComponent } from './sub-community-list/community-page-sub-community-list.component'; import { CommunityPageSubCommunityListComponent } from './sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component';
import { CreateCommunityPageComponent } from './create-community-page/create-community-page.component'; import { CreateCommunityPageComponent } from './create-community-page/create-community-page.component';
import { DeleteCommunityPageComponent } from './delete-community-page/delete-community-page.component'; import { DeleteCommunityPageComponent } from './delete-community-page/delete-community-page.component';
import { StatisticsModule } from '../statistics/statistics.module'; import { StatisticsModule } from '../statistics/statistics.module';
@@ -15,10 +15,10 @@ import { ThemedCommunityPageComponent } from './themed-community-page.component'
import { ComcolModule } from '../shared/comcol/comcol.module'; import { ComcolModule } from '../shared/comcol/comcol.module';
import { import {
ThemedCommunityPageSubCommunityListComponent ThemedCommunityPageSubCommunityListComponent
} from './sub-community-list/themed-community-page-sub-community-list.component'; } from './sections/sub-com-col-section/sub-community-list/themed-community-page-sub-community-list.component';
import { import {
ThemedCollectionPageSubCollectionListComponent ThemedCollectionPageSubCollectionListComponent
} from './sub-collection-list/themed-community-page-sub-collection-list.component'; } from './sections/sub-com-col-section/sub-collection-list/themed-community-page-sub-collection-list.component';
import { DsoPageModule } from '../shared/dso-page/dso-page.module'; import { DsoPageModule } from '../shared/dso-page/dso-page.module';
const DECLARATIONS = [CommunityPageComponent, const DECLARATIONS = [CommunityPageComponent,

View File

@@ -8,27 +8,27 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { CommunityPageSubCollectionListComponent } from './community-page-sub-collection-list.component'; import { CommunityPageSubCollectionListComponent } from './community-page-sub-collection-list.component';
import { Community } from '../../core/shared/community.model'; import { Community } from '../../../../core/shared/community.model';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../../../shared/shared.module';
import { CollectionDataService } from '../../core/data/collection-data.service'; import { CollectionDataService } from '../../../../core/data/collection-data.service';
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils'; import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
import { buildPaginatedList } from '../../core/data/paginated-list.model'; import { buildPaginatedList } from '../../../../core/data/paginated-list.model';
import { PageInfo } from '../../core/shared/page-info.model'; import { PageInfo } from '../../../../core/shared/page-info.model';
import { HostWindowService } from '../../shared/host-window.service'; import { HostWindowService } from '../../../../shared/host-window.service';
import { HostWindowServiceStub } from '../../shared/testing/host-window-service.stub'; import { HostWindowServiceStub } from '../../../../shared/testing/host-window-service.stub';
import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service'; import { SelectableListService } from '../../../../shared/object-list/selectable-list/selectable-list.service';
import { PaginationService } from '../../core/pagination/pagination.service'; import { PaginationService } from '../../../../core/pagination/pagination.service';
import { getMockThemeService } from '../../shared/mocks/theme-service.mock'; import { getMockThemeService } from '../../../../shared/mocks/theme-service.mock';
import { ThemeService } from '../../shared/theme-support/theme.service'; import { ThemeService } from '../../../../shared/theme-support/theme.service';
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub';
import { FindListOptions } from '../../core/data/find-list-options.model'; import { FindListOptions } from '../../../../core/data/find-list-options.model';
import { GroupDataService } from '../../core/eperson/group-data.service'; import { GroupDataService } from '../../../../core/eperson/group-data.service';
import { LinkHeadService } from '../../core/services/link-head.service'; import { LinkHeadService } from '../../../../core/services/link-head.service';
import { ConfigurationDataService } from '../../core/data/configuration-data.service'; import { ConfigurationDataService } from '../../../../core/data/configuration-data.service';
import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service'; import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
import { ConfigurationProperty } from '../../core/shared/configuration-property.model'; import { ConfigurationProperty } from '../../../../core/shared/configuration-property.model';
import { createPaginatedList } from '../../shared/testing/utils.test'; import { createPaginatedList } from '../../../../shared/testing/utils.test';
import { SearchConfigurationServiceStub } from '../../shared/testing/search-configuration-service.stub'; import { SearchConfigurationServiceStub } from '../../../../shared/testing/search-configuration-service.stub';
describe('CommunityPageSubCollectionList Component', () => { describe('CommunityPageSubCollectionList Component', () => {
let comp: CommunityPageSubCollectionListComponent; let comp: CommunityPageSubCollectionListComponent;

View File

@@ -1,19 +1,17 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { BehaviorSubject, combineLatest as observableCombineLatest } from 'rxjs'; import { BehaviorSubject, combineLatest as observableCombineLatest } from 'rxjs';
import { RemoteData } from '../../../../core/data/remote-data';
import { RemoteData } from '../../core/data/remote-data'; import { Collection } from '../../../../core/shared/collection.model';
import { Collection } from '../../core/shared/collection.model'; import { Community } from '../../../../core/shared/community.model';
import { Community } from '../../core/shared/community.model'; import { fadeIn } from '../../../../shared/animations/fade';
import { fadeIn } from '../../shared/animations/fade'; import { PaginatedList } from '../../../../core/data/paginated-list.model';
import { PaginatedList } from '../../core/data/paginated-list.model'; import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model';
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; import { CollectionDataService } from '../../../../core/data/collection-data.service';
import { CollectionDataService } from '../../core/data/collection-data.service'; import { PaginationService } from '../../../../core/pagination/pagination.service';
import { PaginationService } from '../../core/pagination/pagination.service';
import { switchMap } from 'rxjs/operators'; import { switchMap } from 'rxjs/operators';
import { hasValue } from '../../shared/empty.util'; import { hasValue } from '../../../../shared/empty.util';
@Component({ @Component({
selector: 'ds-community-page-sub-collection-list', selector: 'ds-community-page-sub-collection-list',

View File

@@ -1,12 +1,12 @@
import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { ThemedComponent } from '../../../../shared/theme-support/themed.component';
import { CommunityPageSubCollectionListComponent } from './community-page-sub-collection-list.component'; import { CommunityPageSubCollectionListComponent } from './community-page-sub-collection-list.component';
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { Community } from '../../core/shared/community.model'; import { Community } from '../../../../core/shared/community.model';
@Component({ @Component({
selector: 'ds-themed-community-page-sub-collection-list', selector: 'ds-themed-community-page-sub-collection-list',
styleUrls: [], styleUrls: [],
templateUrl: '../../shared/theme-support/themed.component.html', templateUrl: '../../../../shared/theme-support/themed.component.html',
}) })
export class ThemedCollectionPageSubCollectionListComponent extends ThemedComponent<CommunityPageSubCollectionListComponent> { export class ThemedCollectionPageSubCollectionListComponent extends ThemedComponent<CommunityPageSubCollectionListComponent> {
@Input() community: Community; @Input() community: Community;
@@ -18,7 +18,7 @@ export class ThemedCollectionPageSubCollectionListComponent extends ThemedCompon
} }
protected importThemedComponent(themeName: string): Promise<any> { protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/community-page/sub-collection-list/community-page-sub-collection-list.component`); return import(`../../../../../themes/${themeName}/app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component`);
} }
protected importUnthemedComponent(): Promise<any> { protected importUnthemedComponent(): Promise<any> {

View File

@@ -8,27 +8,27 @@ import { By } from '@angular/platform-browser';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { CommunityPageSubCommunityListComponent } from './community-page-sub-community-list.component'; import { CommunityPageSubCommunityListComponent } from './community-page-sub-community-list.component';
import { Community } from '../../core/shared/community.model'; import { Community } from '../../../../core/shared/community.model';
import { buildPaginatedList } from '../../core/data/paginated-list.model'; import { buildPaginatedList } from '../../../../core/data/paginated-list.model';
import { PageInfo } from '../../core/shared/page-info.model'; import { PageInfo } from '../../../../core/shared/page-info.model';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../../../shared/shared.module';
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils'; import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
import { HostWindowService } from '../../shared/host-window.service'; import { HostWindowService } from '../../../../shared/host-window.service';
import { HostWindowServiceStub } from '../../shared/testing/host-window-service.stub'; import { HostWindowServiceStub } from '../../../../shared/testing/host-window-service.stub';
import { CommunityDataService } from '../../core/data/community-data.service'; import { CommunityDataService } from '../../../../core/data/community-data.service';
import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service'; import { SelectableListService } from '../../../../shared/object-list/selectable-list/selectable-list.service';
import { PaginationService } from '../../core/pagination/pagination.service'; import { PaginationService } from '../../../../core/pagination/pagination.service';
import { getMockThemeService } from '../../shared/mocks/theme-service.mock'; import { getMockThemeService } from '../../../../shared/mocks/theme-service.mock';
import { ThemeService } from '../../shared/theme-support/theme.service'; import { ThemeService } from '../../../../shared/theme-support/theme.service';
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub';
import { FindListOptions } from '../../core/data/find-list-options.model'; import { FindListOptions } from '../../../../core/data/find-list-options.model';
import { GroupDataService } from '../../core/eperson/group-data.service'; import { GroupDataService } from '../../../../core/eperson/group-data.service';
import { LinkHeadService } from '../../core/services/link-head.service'; import { LinkHeadService } from '../../../../core/services/link-head.service';
import { ConfigurationDataService } from '../../core/data/configuration-data.service'; import { ConfigurationDataService } from '../../../../core/data/configuration-data.service';
import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service'; import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
import { SearchConfigurationServiceStub } from '../../shared/testing/search-configuration-service.stub'; import { SearchConfigurationServiceStub } from '../../../../shared/testing/search-configuration-service.stub';
import { ConfigurationProperty } from '../../core/shared/configuration-property.model'; import { ConfigurationProperty } from '../../../../core/shared/configuration-property.model';
import { createPaginatedList } from '../../shared/testing/utils.test'; import { createPaginatedList } from '../../../../shared/testing/utils.test';
describe('CommunityPageSubCommunityListComponent Component', () => { describe('CommunityPageSubCommunityListComponent Component', () => {
let comp: CommunityPageSubCommunityListComponent; let comp: CommunityPageSubCommunityListComponent;

View File

@@ -3,16 +3,16 @@ import { ActivatedRoute } from '@angular/router';
import { BehaviorSubject, combineLatest as observableCombineLatest } from 'rxjs'; import { BehaviorSubject, combineLatest as observableCombineLatest } from 'rxjs';
import { RemoteData } from '../../core/data/remote-data'; import { RemoteData } from '../../../../core/data/remote-data';
import { Community } from '../../core/shared/community.model'; import { Community } from '../../../../core/shared/community.model';
import { fadeIn } from '../../shared/animations/fade'; import { fadeIn } from '../../../../shared/animations/fade';
import { PaginatedList } from '../../core/data/paginated-list.model'; import { PaginatedList } from '../../../../core/data/paginated-list.model';
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model';
import { CommunityDataService } from '../../core/data/community-data.service'; import { CommunityDataService } from '../../../../core/data/community-data.service';
import { switchMap } from 'rxjs/operators'; import { switchMap } from 'rxjs/operators';
import { PaginationService } from '../../core/pagination/pagination.service'; import { PaginationService } from '../../../../core/pagination/pagination.service';
import { hasValue } from '../../shared/empty.util'; import { hasValue } from '../../../../shared/empty.util';
@Component({ @Component({
selector: 'ds-community-page-sub-community-list', selector: 'ds-community-page-sub-community-list',

View File

@@ -1,12 +1,12 @@
import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { ThemedComponent } from '../../../../shared/theme-support/themed.component';
import { CommunityPageSubCommunityListComponent } from './community-page-sub-community-list.component'; import { CommunityPageSubCommunityListComponent } from './community-page-sub-community-list.component';
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { Community } from '../../core/shared/community.model'; import { Community } from '../../../../core/shared/community.model';
@Component({ @Component({
selector: 'ds-themed-community-page-sub-community-list', selector: 'ds-themed-community-page-sub-community-list',
styleUrls: [], styleUrls: [],
templateUrl: '../../shared/theme-support/themed.component.html', templateUrl: '../../../../shared/theme-support/themed.component.html',
}) })
export class ThemedCommunityPageSubCommunityListComponent extends ThemedComponent<CommunityPageSubCommunityListComponent> { export class ThemedCommunityPageSubCommunityListComponent extends ThemedComponent<CommunityPageSubCommunityListComponent> {
@@ -19,7 +19,7 @@ export class ThemedCommunityPageSubCommunityListComponent extends ThemedComponen
} }
protected importThemedComponent(themeName: string): Promise<any> { protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/community-page/sub-community-list/community-page-sub-community-list.component`); return import(`../../../../../themes/${themeName}/app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component`);
} }
protected importUnthemedComponent(): Promise<any> { protected importUnthemedComponent(): Promise<any> {

View File

@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
import { CommunityPageSubCollectionListComponent as BaseComponent } from '../../../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component';
@Component({
selector: 'ds-community-page-sub-collection-list',
// styleUrls: ['./community-page-sub-collection-list.component.scss'],
styleUrls: ['../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.scss'],
// templateUrl: './community-page-sub-collection-list.component.html',
templateUrl: '../../../../../app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component.html',
})
export class CommunityPageSubCollectionListComponent extends BaseComponent {
}

View File

@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
import { CommunityPageSubCommunityListComponent as BaseComponent } from '../../../../../../../app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component';
@Component({
selector: 'ds-community-page-sub-community-list',
// styleUrls: ['./community-page-sub-community-list.component.scss'],
styleUrls: ['../../../../../../../app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component.scss'],
// templateUrl: './community-page-sub-community-list.component.html',
templateUrl: '../../../../../../../app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component.html',
})
export class CommunityPageSubCommunityListComponent extends BaseComponent {
}

View File

@@ -1,12 +0,0 @@
import { Component } from '@angular/core';
import { CommunityPageSubCollectionListComponent as BaseComponent }
from '../../../../../app/community-page/sub-collection-list/community-page-sub-collection-list.component';
@Component({
selector: 'ds-community-page-sub-collection-list',
// styleUrls: ['./community-page-sub-collection-list.component.scss'],
styleUrls: ['../../../../../app/community-page/sub-collection-list/community-page-sub-collection-list.component.scss'],
// templateUrl: './community-page-sub-collection-list.component.html',
templateUrl: '../../../../../app/community-page/sub-collection-list/community-page-sub-collection-list.component.html'
})
export class CommunityPageSubCollectionListComponent extends BaseComponent {}

View File

@@ -1,12 +0,0 @@
import { Component } from '@angular/core';
import { CommunityPageSubCommunityListComponent as BaseComponent }
from '../../../../../app/community-page/sub-community-list/community-page-sub-community-list.component';
@Component({
selector: 'ds-community-page-sub-community-list',
// styleUrls: ['./community-page-sub-community-list.component.scss'],
styleUrls: ['../../../../../app/community-page/sub-community-list/community-page-sub-community-list.component.scss'],
// templateUrl: './community-page-sub-community-list.component.html',
templateUrl: '../../../../../app/community-page/sub-community-list/community-page-sub-community-list.component.html'
})
export class CommunityPageSubCommunityListComponent extends BaseComponent {}

View File

@@ -93,8 +93,8 @@ import { SearchResultsComponent } from './app/shared/search/search-results/searc
import { AdminSidebarComponent } from './app/admin/admin-sidebar/admin-sidebar.component'; import { AdminSidebarComponent } from './app/admin/admin-sidebar/admin-sidebar.component';
import { ComcolPageBrowseByComponent } from './app/shared/comcol-page-browse-by/comcol-page-browse-by.component'; import { ComcolPageBrowseByComponent } from './app/shared/comcol-page-browse-by/comcol-page-browse-by.component';
import { SearchSettingsComponent } from './app/shared/search/search-settings/search-settings.component'; import { SearchSettingsComponent } from './app/shared/search/search-settings/search-settings.component';
import { CommunityPageSubCommunityListComponent } from './app/community-page/sub-community-list/community-page-sub-community-list.component'; import { CommunityPageSubCommunityListComponent } from './app/community-page/sections/sub-com-col-section/sub-community-list/community-page-sub-community-list.component';
import { CommunityPageSubCollectionListComponent } from './app/community-page/sub-collection-list/community-page-sub-collection-list.component'; import { CommunityPageSubCollectionListComponent } from './app/community-page/sections/sub-com-col-section/sub-collection-list/community-page-sub-collection-list.component';
import { ObjectListComponent } from './app/shared/object-list/object-list.component'; import { ObjectListComponent } from './app/shared/object-list/object-list.component';
import { BrowseByMetadataPageComponent } from './app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; import { BrowseByMetadataPageComponent } from './app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component';
@@ -299,9 +299,6 @@ const DECLARATIONS = [
RequestCopyModule, RequestCopyModule,
], ],
declarations: DECLARATIONS, declarations: DECLARATIONS,
exports: [
CommunityPageSubCollectionListComponent
]
}) })
/** /**