mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
add themed community list component
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>{{ 'communityList.title' | translate }}</h2>
|
<h2>{{ 'communityList.title' | translate }}</h2>
|
||||||
<ds-community-list></ds-community-list>
|
<ds-themed-community-list></ds-themed-community-list>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -5,12 +5,14 @@ import { CommunityListPageComponent } from './community-list-page.component';
|
|||||||
import { CommunityListPageRoutingModule } from './community-list-page.routing.module';
|
import { CommunityListPageRoutingModule } from './community-list-page.routing.module';
|
||||||
import { CommunityListComponent } from './community-list/community-list.component';
|
import { CommunityListComponent } from './community-list/community-list.component';
|
||||||
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
|
import { ThemedCommunityListPageComponent } from './themed-community-list-page.component';
|
||||||
|
import { ThemedCommunityListComponent } from './community-list/themed-community-list.component';
|
||||||
|
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
CommunityListPageComponent,
|
CommunityListPageComponent,
|
||||||
CommunityListComponent,
|
CommunityListComponent,
|
||||||
ThemedCommunityListPageComponent
|
ThemedCommunityListPageComponent,
|
||||||
|
ThemedCommunityListComponent
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
* The page which houses a title and the community list, as described in community-list.component
|
* The page which houses a title and the community list, as described in community-list.component
|
||||||
|
@@ -0,0 +1,23 @@
|
|||||||
|
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||||
|
import { CommunityListComponent } from './community-list.component';
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-themed-community-list',
|
||||||
|
styleUrls: [],
|
||||||
|
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||||
|
})export class ThemedCommunityListComponent extends ThemedComponent<CommunityListComponent> {
|
||||||
|
protected getComponentName(): string {
|
||||||
|
return 'CommunityListComponent';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importThemedComponent(themeName: string): Promise<any> {
|
||||||
|
return import(`../../../themes/${themeName}/app/community-list-page/community-list/community-list.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import(`./community-list.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1 @@
|
|||||||
|
BINGO
|
@@ -0,0 +1,18 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { CommunityListComponent as BaseComponent } from '../../../../../app/community-list-page/community-list/community-list.component';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A tree-structured list of nodes representing the communities, their subCommunities and collections.
|
||||||
|
* Initially only the page-restricted top communities are shown.
|
||||||
|
* Each node can be expanded to show its children and all children are also page-limited.
|
||||||
|
* More pages of a page-limited result can be shown by pressing a show more node/link.
|
||||||
|
* Which nodes were expanded is kept in the store, so this persists across pages.
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-community-list',
|
||||||
|
// styleUrls: ['./community-list.component.scss'],
|
||||||
|
// templateUrl: './community-list.component.html'
|
||||||
|
templateUrl: '../../../../../app/community-list-page/community-list/community-list.component.html'
|
||||||
|
})
|
||||||
|
export class CommunityListComponent extends BaseComponent {}
|
||||||
|
|
@@ -79,6 +79,7 @@ import { HeaderComponent } from './app/header/header.component';
|
|||||||
import { FooterComponent } from './app/footer/footer.component';
|
import { FooterComponent } from './app/footer/footer.component';
|
||||||
import { BreadcrumbsComponent } from './app/breadcrumbs/breadcrumbs.component';
|
import { BreadcrumbsComponent } from './app/breadcrumbs/breadcrumbs.component';
|
||||||
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
|
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
|
||||||
|
import { CommunityListComponent } from './app/community-list-page/community-list/community-list.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
HomePageComponent,
|
HomePageComponent,
|
||||||
@@ -119,7 +120,8 @@ const DECLARATIONS = [
|
|||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
NavbarComponent,
|
NavbarComponent,
|
||||||
HeaderNavbarWrapperComponent,
|
HeaderNavbarWrapperComponent,
|
||||||
BreadcrumbsComponent
|
BreadcrumbsComponent,
|
||||||
|
CommunityListComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Reference in New Issue
Block a user