98661: Created themeable FullFileSectionComponent

This commit is contained in:
Alexandre Vryghem
2023-01-19 13:52:57 +01:00
parent e4f483c308
commit 660a6dbd56
7 changed files with 56 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
import { Component, Input } from '@angular/core';
import { ThemedComponent } from '../../../../shared/theme-support/themed.component';
import { FullFileSectionComponent } from './full-file-section.component';
import { Item } from '../../../../core/shared/item.model';
/**
* Themed wrapper for {@link FullFileSectionComponent}
*/
@Component({
selector: 'ds-themed-item-page-full-file-section',
styleUrls: [],
templateUrl: './../../../../shared/theme-support/themed.component.html',
})
export class ThemedFullFileSectionComponent extends ThemedComponent<FullFileSectionComponent> {
@Input() item: Item;
protected inAndOutputNames: (keyof FullFileSectionComponent & keyof this)[] = ['item'];
protected getComponentName(): string {
return 'FullFileSectionComponent';
}
protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../../../themes/${themeName}/app/item-page/full/field-components/file-section/full-file-section.component`);
}
protected importUnthemedComponent(): Promise<any> {
return import('./full-file-section.component');
}
}

View File

@@ -26,7 +26,7 @@
</ng-container> </ng-container>
</tbody> </tbody>
</table> </table>
<ds-item-page-full-file-section [item]="item"></ds-item-page-full-file-section> <ds-themed-item-page-full-file-section [item]="item"></ds-themed-item-page-full-file-section>
<ds-item-page-collections [item]="item"></ds-item-page-collections> <ds-item-page-collections [item]="item"></ds-item-page-collections>
<ds-item-versions class="mt-2" [item]="item"></ds-item-versions> <ds-item-versions class="mt-2" [item]="item"></ds-item-versions>
<div class="button-row bottom" *ngIf="fromWfi"> <div class="button-row bottom" *ngIf="fromWfi">

View File

@@ -34,6 +34,9 @@ import { MiradorViewerComponent } from './mirador-viewer/mirador-viewer.componen
import { VersionPageComponent } from './version-page/version-page/version-page.component'; import { VersionPageComponent } from './version-page/version-page/version-page.component';
import { VersionedItemComponent } from './simple/item-types/versioned-item/versioned-item.component'; import { VersionedItemComponent } from './simple/item-types/versioned-item/versioned-item.component';
import { ThemedFileSectionComponent } from './simple/field-components/file-section/themed-file-section.component'; import { ThemedFileSectionComponent } from './simple/field-components/file-section/themed-file-section.component';
import {
ThemedFullFileSectionComponent
} from './full/field-components/file-section/themed-full-file-section.component';
const ENTRY_COMPONENTS = [ const ENTRY_COMPONENTS = [
@@ -57,6 +60,7 @@ const DECLARATIONS = [
ItemPageFieldComponent, ItemPageFieldComponent,
CollectionsComponent, CollectionsComponent,
FullFileSectionComponent, FullFileSectionComponent,
ThemedFullFileSectionComponent,
PublicationComponent, PublicationComponent,
UntypedItemComponent, UntypedItemComponent,
ItemComponent, ItemComponent,

View File

@@ -0,0 +1,14 @@
import { Component } from '@angular/core';
import {
FullFileSectionComponent as BaseComponent
} from '../../../../../../../app/item-page/full/field-components/file-section/full-file-section.component';
@Component({
selector: 'ds-item-page-full-file-section',
// styleUrls: ['./full-file-section.component.scss'],
styleUrls: ['../../../../../../../app/item-page/full/field-components/file-section/full-file-section.component.scss'],
// templateUrl: './full-file-section.component.html',
templateUrl: '../../../../../../../app/item-page/full/field-components/file-section/full-file-section.component.html',
})
export class FullFileSectionComponent extends BaseComponent {
}

View File

@@ -84,6 +84,9 @@ import { SearchModule } from '../../app/shared/search/search.module';
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module';
import { FeedbackComponent } from './app/info/feedback/feedback.component'; import { FeedbackComponent } from './app/info/feedback/feedback.component';
import {
FullFileSectionComponent
} from './app/item-page/full/field-components/file-section/full-file-section.component';
const DECLARATIONS = [ const DECLARATIONS = [
FileSectionComponent, FileSectionComponent,
@@ -126,7 +129,8 @@ const DECLARATIONS = [
NavbarComponent, NavbarComponent,
HeaderNavbarWrapperComponent, HeaderNavbarWrapperComponent,
BreadcrumbsComponent, BreadcrumbsComponent,
FeedbackComponent FeedbackComponent,
FullFileSectionComponent,
]; ];
@NgModule({ @NgModule({