mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
New themable components
This commit is contained in:
@@ -25,11 +25,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<section class="comcol-page-browse-section">
|
<section class="comcol-page-browse-section">
|
||||||
|
|
||||||
<!-- Browse-By Links -->
|
<!-- Browse-By Links -->
|
||||||
<ds-themed-comcol-page-browse-by [id]="communityPayload.id" [contentType]="communityPayload.type">
|
<ds-themed-comcol-page-browse-by [id]="communityPayload.id" [contentType]="communityPayload.type">
|
||||||
</ds-themed-comcol-page-browse-by>
|
</ds-themed-comcol-page-browse-by>
|
||||||
|
|
||||||
<ds-community-page-sub-community-list [community]="communityPayload"></ds-community-page-sub-community-list>
|
<ds-themed-community-page-sub-community-list [community]="communityPayload"></ds-themed-community-page-sub-community-list>
|
||||||
<ds-community-page-sub-collection-list [community]="communityPayload"></ds-community-page-sub-collection-list>
|
<ds-community-page-sub-collection-list [community]="communityPayload"></ds-community-page-sub-collection-list>
|
||||||
</section>
|
</section>
|
||||||
<footer *ngIf="communityPayload.copyrightText" class="border-top my-5 pt-4">
|
<footer *ngIf="communityPayload.copyrightText" class="border-top my-5 pt-4">
|
||||||
|
@@ -13,10 +13,18 @@ import { StatisticsModule } from '../statistics/statistics.module';
|
|||||||
import { CommunityFormModule } from './community-form/community-form.module';
|
import { CommunityFormModule } from './community-form/community-form.module';
|
||||||
import { ThemedCommunityPageComponent } from './themed-community-page.component';
|
import { ThemedCommunityPageComponent } from './themed-community-page.component';
|
||||||
import { ComcolModule } from '../shared/comcol/comcol.module';
|
import { ComcolModule } from '../shared/comcol/comcol.module';
|
||||||
|
import {
|
||||||
|
ThemedCommunityPageSubCommunityListComponent
|
||||||
|
} from './sub-community-list/themed-community-page-sub-community-list.component';
|
||||||
|
import {
|
||||||
|
ThemedCollectionPageSubCollectionListComponent
|
||||||
|
} from './sub-collection-list/themed-community-page-sub-collection-list.component';
|
||||||
|
|
||||||
const DECLARATIONS = [CommunityPageComponent,
|
const DECLARATIONS = [CommunityPageComponent,
|
||||||
ThemedCommunityPageComponent,
|
ThemedCommunityPageComponent,
|
||||||
|
ThemedCommunityPageSubCommunityListComponent,
|
||||||
CommunityPageSubCollectionListComponent,
|
CommunityPageSubCollectionListComponent,
|
||||||
|
ThemedCollectionPageSubCollectionListComponent,
|
||||||
CommunityPageSubCommunityListComponent,
|
CommunityPageSubCommunityListComponent,
|
||||||
CreateCommunityPageComponent,
|
CreateCommunityPageComponent,
|
||||||
DeleteCommunityPageComponent];
|
DeleteCommunityPageComponent];
|
||||||
|
@@ -22,6 +22,11 @@ import { switchMap } from 'rxjs/operators';
|
|||||||
export class CommunityPageSubCollectionListComponent implements OnInit {
|
export class CommunityPageSubCollectionListComponent implements OnInit {
|
||||||
@Input() community: Community;
|
@Input() community: Community;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional page size (defaults to 5)
|
||||||
|
*/
|
||||||
|
@Input() pageSize: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The pagination configuration
|
* The pagination configuration
|
||||||
*/
|
*/
|
||||||
@@ -50,7 +55,7 @@ export class CommunityPageSubCollectionListComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.config = new PaginationComponentOptions();
|
this.config = new PaginationComponentOptions();
|
||||||
this.config.id = this.pageId;
|
this.config.id = this.pageId;
|
||||||
this.config.pageSize = 5;
|
this.pageSize ? this.config.pageSize = this.pageSize : this.config.pageSize = 5;
|
||||||
this.config.currentPage = 1;
|
this.config.currentPage = 1;
|
||||||
this.sortConfig = new SortOptions('dc.title', SortDirection.ASC);
|
this.sortConfig = new SortOptions('dc.title', SortDirection.ASC);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
@@ -0,0 +1,28 @@
|
|||||||
|
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||||
|
import { CommunityPageSubCollectionListComponent } from './community-page-sub-collection-list.component';
|
||||||
|
import { Component, Input } from '@angular/core';
|
||||||
|
import { Community } from '../../core/shared/community.model';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-themed-community-page-sub-collection-list',
|
||||||
|
styleUrls: [],
|
||||||
|
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||||
|
})
|
||||||
|
export class ThemedCollectionPageSubCollectionListComponent extends ThemedComponent<CommunityPageSubCollectionListComponent> {
|
||||||
|
protected getComponentName(): string {
|
||||||
|
return 'CommunityPageSubCollectionListComponent';
|
||||||
|
}
|
||||||
|
|
||||||
|
@Input() community: Community;
|
||||||
|
@Input() pageSize: number;
|
||||||
|
protected inAndOutputNames: (keyof CommunityPageSubCollectionListComponent & keyof this)[] = ['community', 'pageSize'];
|
||||||
|
|
||||||
|
protected importThemedComponent(themeName: string): Promise<any> {
|
||||||
|
return import(`../../../themes/${themeName}/app/community-page/sub-community-list/community-page-sub-collection-list.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import(`./community-page-sub-collection-list.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -14,7 +14,7 @@ import { switchMap } from 'rxjs/operators';
|
|||||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-community-page-sub-community-list',
|
selector: ' ',
|
||||||
styleUrls: ['./community-page-sub-community-list.component.scss'],
|
styleUrls: ['./community-page-sub-community-list.component.scss'],
|
||||||
templateUrl: './community-page-sub-community-list.component.html',
|
templateUrl: './community-page-sub-community-list.component.html',
|
||||||
animations: [fadeIn]
|
animations: [fadeIn]
|
||||||
@@ -25,6 +25,11 @@ import { PaginationService } from '../../core/pagination/pagination.service';
|
|||||||
export class CommunityPageSubCommunityListComponent implements OnInit {
|
export class CommunityPageSubCommunityListComponent implements OnInit {
|
||||||
@Input() community: Community;
|
@Input() community: Community;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional page size (defaults to 5)
|
||||||
|
*/
|
||||||
|
@Input() pageSize: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The pagination configuration
|
* The pagination configuration
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +58,7 @@ export class CommunityPageSubCommunityListComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.config = new PaginationComponentOptions();
|
this.config = new PaginationComponentOptions();
|
||||||
this.config.id = this.pageId;
|
this.config.id = this.pageId;
|
||||||
this.config.pageSize = 5;
|
this.pageSize ? this.config.pageSize = this.pageSize : this.config.pageSize = 5;
|
||||||
this.config.currentPage = 1;
|
this.config.currentPage = 1;
|
||||||
this.sortConfig = new SortOptions('dc.title', SortDirection.ASC);
|
this.sortConfig = new SortOptions('dc.title', SortDirection.ASC);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
@@ -0,0 +1,28 @@
|
|||||||
|
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||||
|
import { CommunityPageSubCommunityListComponent } from './community-page-sub-community-list.component';
|
||||||
|
import { Component, Input } from '@angular/core';
|
||||||
|
import { Community } from '../../core/shared/community.model';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-themed-community-page-sub-community-list',
|
||||||
|
styleUrls: [],
|
||||||
|
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||||
|
})
|
||||||
|
export class ThemedCommunityPageSubCommunityListComponent extends ThemedComponent<CommunityPageSubCommunityListComponent> {
|
||||||
|
protected getComponentName(): string {
|
||||||
|
return 'CommunityPageSubCommunityListComponent';
|
||||||
|
}
|
||||||
|
|
||||||
|
@Input() community: Community;
|
||||||
|
@Input() pageSize: number;
|
||||||
|
protected inAndOutputNames: (keyof CommunityPageSubCommunityListComponent & keyof this)[] = ['community', 'pageSize'];
|
||||||
|
|
||||||
|
protected importThemedComponent(themeName: string): Promise<any> {
|
||||||
|
return import(`../../../themes/${themeName}/app/community-page/sub-community-list/community-page-sub-community-list.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import(`./community-page-sub-community-list.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,12 @@
|
|||||||
|
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 {}
|
@@ -0,0 +1,12 @@
|
|||||||
|
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 {}
|
@@ -40,7 +40,7 @@ const DECLARATIONS = [
|
|||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
HeaderNavbarWrapperComponent,
|
HeaderNavbarWrapperComponent,
|
||||||
NavbarComponent,
|
NavbarComponent,
|
||||||
FooterComponent,
|
FooterComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -99,6 +99,12 @@ import {
|
|||||||
import { LoadingComponent } from './app/shared/loading/loading.component';
|
import { LoadingComponent } from './app/shared/loading/loading.component';
|
||||||
import { SearchResultsComponent } from './app/shared/search/search-results/search-results.component';
|
import { SearchResultsComponent } from './app/shared/search/search-results/search-results.component';
|
||||||
import { AdminSidebarComponent } from './app/admin/admin-sidebar/admin-sidebar.component';
|
import { AdminSidebarComponent } from './app/admin/admin-sidebar/admin-sidebar.component';
|
||||||
|
import {
|
||||||
|
CommunityPageSubCommunityListComponent
|
||||||
|
} from './app/community-page/sub-community-list/community-page-sub-community-list.component';
|
||||||
|
import {
|
||||||
|
CommunityPageSubCollectionListComponent
|
||||||
|
} from './app/community-page/sub-collection-list/community-page-sub-collection-list.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
FileSectionComponent,
|
FileSectionComponent,
|
||||||
@@ -118,6 +124,8 @@ const DECLARATIONS = [
|
|||||||
ItemStatisticsPageComponent,
|
ItemStatisticsPageComponent,
|
||||||
SiteStatisticsPageComponent,
|
SiteStatisticsPageComponent,
|
||||||
CommunityPageComponent,
|
CommunityPageComponent,
|
||||||
|
CommunityPageSubCommunityListComponent,
|
||||||
|
CommunityPageSubCollectionListComponent,
|
||||||
CollectionPageComponent,
|
CollectionPageComponent,
|
||||||
ItemPageComponent,
|
ItemPageComponent,
|
||||||
FullItemPageComponent,
|
FullItemPageComponent,
|
||||||
@@ -196,6 +204,9 @@ const DECLARATIONS = [
|
|||||||
ComcolModule,
|
ComcolModule,
|
||||||
],
|
],
|
||||||
declarations: DECLARATIONS,
|
declarations: DECLARATIONS,
|
||||||
|
exports: [
|
||||||
|
CommunityPageSubCollectionListComponent
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user