mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
Make 'FileSectionComponent' themeable
This commit is contained in:
@@ -31,6 +31,7 @@ import { MediaViewerComponent } from './media-viewer/media-viewer.component';
|
|||||||
import { MediaViewerVideoComponent } from './media-viewer/media-viewer-video/media-viewer-video.component';
|
import { MediaViewerVideoComponent } from './media-viewer/media-viewer-video/media-viewer-video.component';
|
||||||
import { MediaViewerImageComponent } from './media-viewer/media-viewer-image/media-viewer-image.component';
|
import { MediaViewerImageComponent } from './media-viewer/media-viewer-image/media-viewer-image.component';
|
||||||
import { NgxGalleryModule } from '@kolkov/ngx-gallery';
|
import { NgxGalleryModule } from '@kolkov/ngx-gallery';
|
||||||
|
import { ThemedFileSectionComponent} from './simple/field-components/file-section/themed-file-section.component';
|
||||||
|
|
||||||
const ENTRY_COMPONENTS = [
|
const ENTRY_COMPONENTS = [
|
||||||
// put only entry components that use custom decorator
|
// put only entry components that use custom decorator
|
||||||
@@ -39,6 +40,7 @@ const ENTRY_COMPONENTS = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
|
ThemedFileSectionComponent,
|
||||||
ItemPageComponent,
|
ItemPageComponent,
|
||||||
ThemedItemPageComponent,
|
ThemedItemPageComponent,
|
||||||
FullItemPageComponent,
|
FullItemPageComponent,
|
||||||
|
@@ -0,0 +1,28 @@
|
|||||||
|
import { ThemedComponent } from '../../../../shared/theme-support/themed.component';
|
||||||
|
import { FileSectionComponent } from './file-section.component';
|
||||||
|
import {Component, Input} from '@angular/core';
|
||||||
|
import {Item} from '../../../../core/shared/item.model';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-themed-item-page-file-section',
|
||||||
|
templateUrl: '../../../../shared/theme-support/themed.component.html',
|
||||||
|
})
|
||||||
|
export class ThemedFileSectionComponent extends ThemedComponent<FileSectionComponent> {
|
||||||
|
|
||||||
|
@Input() item: Item;
|
||||||
|
|
||||||
|
protected inAndOutputNames: (keyof FileSectionComponent & keyof this)[] = ['item'];
|
||||||
|
|
||||||
|
protected getComponentName(): string {
|
||||||
|
return 'FileSectionComponent';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importThemedComponent(themeName: string): Promise<any> {
|
||||||
|
return import(`../../../../../themes/${themeName}/app/item-page/simple/field-components/file-section/file-section.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import(`./file-section.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -16,7 +16,7 @@
|
|||||||
<ng-container *ngIf="mediaViewer.image">
|
<ng-container *ngIf="mediaViewer.image">
|
||||||
<ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
|
<ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ds-item-page-file-section [item]="object"></ds-item-page-file-section>
|
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
|
||||||
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
|
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
|
||||||
<ds-metadata-representation-list class="ds-item-page-mixed-author-field"
|
<ds-metadata-representation-list class="ds-item-page-mixed-author-field"
|
||||||
[parentItem]="object"
|
[parentItem]="object"
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
<ng-container *ngIf="mediaViewer.image">
|
<ng-container *ngIf="mediaViewer.image">
|
||||||
<ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
|
<ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ds-item-page-file-section [item]="object"></ds-item-page-file-section>
|
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
|
||||||
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
|
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
|
||||||
<ds-metadata-representation-list class="ds-item-page-mixed-author-field"
|
<ds-metadata-representation-list class="ds-item-page-mixed-author-field"
|
||||||
[parentItem]="object"
|
[parentItem]="object"
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
|
@@ -0,0 +1,13 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { slideSidebarPadding } from '../../../../../../../app/shared/animations/slide';
|
||||||
|
import { FileSectionComponent as BaseComponent } from '../../../../../../../app/item-page/simple/field-components/file-section/file-section.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-item-page-file-section',
|
||||||
|
// templateUrl: './file-section.component.html',
|
||||||
|
templateUrl: '../../../../../../../app/item-page/simple/field-components/file-section/file-section.component.html',
|
||||||
|
animations: [slideSidebarPadding],
|
||||||
|
})
|
||||||
|
export class FileSectionComponent extends BaseComponent {
|
||||||
|
|
||||||
|
}
|
@@ -79,8 +79,10 @@ 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 { FileSectionComponent} from './app/item-page/simple/field-components/file-section/file-section.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
|
FileSectionComponent,
|
||||||
HomePageComponent,
|
HomePageComponent,
|
||||||
HomeNewsComponent,
|
HomeNewsComponent,
|
||||||
RootComponent,
|
RootComponent,
|
||||||
|
Reference in New Issue
Block a user