Merge pull request #2036 from atmire/w2p-98422_Thumbnail-uploader_contribute-7.2

Adding themed components for EditBitstreamPageComponent and ItemStatusComponent
This commit is contained in:
Tim Donohue
2023-06-01 11:53:46 -05:00
committed by GitHub
12 changed files with 92 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { EditBitstreamPageComponent } from './edit-bitstream-page/edit-bitstream-page.component';
import { AuthenticatedGuard } from '../core/auth/authenticated.guard'; import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
import { BitstreamPageResolver } from './bitstream-page.resolver'; import { BitstreamPageResolver } from './bitstream-page.resolver';
import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component'; import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component';
@@ -13,6 +12,7 @@ import { LegacyBitstreamUrlResolver } from './legacy-bitstream-url.resolver';
import { BitstreamBreadcrumbResolver } from '../core/breadcrumbs/bitstream-breadcrumb.resolver'; import { BitstreamBreadcrumbResolver } from '../core/breadcrumbs/bitstream-breadcrumb.resolver';
import { BitstreamBreadcrumbsService } from '../core/breadcrumbs/bitstream-breadcrumbs.service'; import { BitstreamBreadcrumbsService } from '../core/breadcrumbs/bitstream-breadcrumbs.service';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver'; import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
const EDIT_BITSTREAM_PATH = ':id/edit'; const EDIT_BITSTREAM_PATH = ':id/edit';
const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations'; const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
@@ -49,7 +49,7 @@ const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
}, },
{ {
path: EDIT_BITSTREAM_PATH, path: EDIT_BITSTREAM_PATH,
component: EditBitstreamPageComponent, component: ThemedEditBitstreamPageComponent,
resolve: { resolve: {
bitstream: BitstreamPageResolver, bitstream: BitstreamPageResolver,
breadcrumb: BitstreamBreadcrumbResolver, breadcrumb: BitstreamBreadcrumbResolver,

View File

@@ -7,6 +7,7 @@ import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bit
import { FormModule } from '../shared/form/form.module'; import { FormModule } from '../shared/form/form.module';
import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module'; import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module';
import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component'; import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component';
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
/** /**
* This module handles all components that are necessary for Bitstream related pages * This module handles all components that are necessary for Bitstream related pages
@@ -22,6 +23,7 @@ import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstr
declarations: [ declarations: [
BitstreamAuthorizationsComponent, BitstreamAuthorizationsComponent,
EditBitstreamPageComponent, EditBitstreamPageComponent,
ThemedEditBitstreamPageComponent,
BitstreamDownloadPageComponent, BitstreamDownloadPageComponent,
] ]
}) })

View File

@@ -0,0 +1,22 @@
import { Component } from '@angular/core';
import { EditBitstreamPageComponent } from './edit-bitstream-page.component';
import { ThemedComponent } from '../../shared/theme-support/themed.component';
@Component({
selector: 'ds-themed-edit-bitstream-page',
styleUrls: [],
templateUrl: '../../shared/theme-support/themed.component.html',
})
export class ThemedEditBitstreamPageComponent extends ThemedComponent<EditBitstreamPageComponent> {
protected getComponentName(): string {
return 'EditBitstreamPageComponent';
}
protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component`);
}
protected importUnthemedComponent(): Promise<any> {
return import('./edit-bitstream-page.component');
}
}

View File

@@ -39,6 +39,8 @@ import { IdentifierDataComponent } from '../../shared/object-list/identifier-dat
import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component'; import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component';
import { DsoSharedModule } from '../../dso-shared/dso-shared.module'; import { DsoSharedModule } from '../../dso-shared/dso-shared.module';
import { ItemCurateComponent } from './item-curate/item-curate.component'; import { ItemCurateComponent } from './item-curate/item-curate.component';
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
/** /**
* Module that contains all components related to the Edit Item page administrator functionality * Module that contains all components related to the Edit Item page administrator functionality
@@ -67,6 +69,7 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
ItemPublicComponent, ItemPublicComponent,
ItemDeleteComponent, ItemDeleteComponent,
ItemStatusComponent, ItemStatusComponent,
ThemedItemStatusComponent,
ItemRelationshipsComponent, ItemRelationshipsComponent,
ItemBitstreamsComponent, ItemBitstreamsComponent,
ItemVersionHistoryComponent, ItemVersionHistoryComponent,
@@ -89,6 +92,9 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
IdentifierDataService, IdentifierDataService,
ObjectValuesPipe ObjectValuesPipe
], ],
exports: [
ItemOperationComponent,
]
}) })
export class EditItemPageModule { export class EditItemPageModule {

View File

@@ -6,7 +6,6 @@ import { ItemReinstateComponent } from './item-reinstate/item-reinstate.componen
import { ItemPrivateComponent } from './item-private/item-private.component'; import { ItemPrivateComponent } from './item-private/item-private.component';
import { ItemPublicComponent } from './item-public/item-public.component'; import { ItemPublicComponent } from './item-public/item-public.component';
import { ItemDeleteComponent } from './item-delete/item-delete.component'; import { ItemDeleteComponent } from './item-delete/item-delete.component';
import { ItemStatusComponent } from './item-status/item-status.component';
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component'; import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component'; import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
import { ItemMoveComponent } from './item-move/item-move.component'; import { ItemMoveComponent } from './item-move/item-move.component';
@@ -42,6 +41,7 @@ import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.gua
import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component'; import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component';
import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard'; import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard';
import { ItemCurateComponent } from './item-curate/item-curate.component'; import { ItemCurateComponent } from './item-curate/item-curate.component';
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
/** /**
* Routing module that handles the routing for the Edit Item page administrator functionality * Routing module that handles the routing for the Edit Item page administrator functionality
@@ -67,7 +67,7 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
}, },
{ {
path: 'status', path: 'status',
component: ItemStatusComponent, component: ThemedItemStatusComponent,
data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true }, data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true },
canActivate: [ItemPageStatusGuard] canActivate: [ItemPageStatusGuard]
}, },

View File

@@ -0,0 +1,23 @@
import { Component } from '@angular/core';
import { ThemedComponent } from '../../../shared/theme-support/themed.component';
import { ItemStatusComponent } from './item-status.component';
@Component({
selector: 'ds-themed-item-status',
styleUrls: [],
templateUrl: '../../../shared/theme-support/themed.component.html',
})
export class ThemedItemStatusComponent extends ThemedComponent<ItemStatusComponent> {
protected getComponentName(): string {
return 'ItemStatusComponent';
}
protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-status/item-status.component`);
}
protected importUnthemedComponent(): Promise<any> {
return import('./item-status.component');
}
}

View File

@@ -0,0 +1,13 @@
import { EditBitstreamPageComponent as BaseComponent } from '../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'ds-edit-bitstream-page',
// styleUrls: ['./edit-bitstream-page.component.scss'],
styleUrls: ['../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.scss'],
// templateUrl: './edit-bitstream-page.component.html',
templateUrl: '../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class EditBitstreamPageComponent extends BaseComponent {
}

View File

@@ -0,0 +1,16 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { fadeIn, fadeInOut } from '../../../../../../app/shared/animations/fade';
import { ItemStatusComponent as BaseComponent } from '../../../../../../app/item-page/edit-item-page/item-status/item-status.component';
@Component({
selector: 'ds-item-status',
// templateUrl: './item-status.component.html',
templateUrl: '../../../../../../app/item-page/edit-item-page/item-status/item-status.component.html',
changeDetection: ChangeDetectionStrategy.Default,
animations: [
fadeIn,
fadeInOut
]
})
export class ItemStatusComponent extends BaseComponent {
}

View File

@@ -141,6 +141,9 @@ import {
import { NgxGalleryModule } from '@kolkov/ngx-gallery'; import { NgxGalleryModule } from '@kolkov/ngx-gallery';
import { WorkspaceItemsDeletePageComponent } from './app/workspace-items-delete-page/workspace-items-delete/workspace-items-delete.component'; import { WorkspaceItemsDeletePageComponent } from './app/workspace-items-delete-page/workspace-items-delete/workspace-items-delete.component';
import { ThumbnailComponent } from './app/thumbnail/thumbnail.component'; import { ThumbnailComponent } from './app/thumbnail/thumbnail.component';
import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/item-status.component';
import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
import { FormModule } from '../../app/shared/form/form.module';
const DECLARATIONS = [ const DECLARATIONS = [
FileSectionComponent, FileSectionComponent,
@@ -217,6 +220,8 @@ const DECLARATIONS = [
MediaViewerVideoComponent, MediaViewerVideoComponent,
WorkspaceItemsDeletePageComponent, WorkspaceItemsDeletePageComponent,
ThumbnailComponent, ThumbnailComponent,
ItemStatusComponent,
EditBitstreamPageComponent,
]; ];
@NgModule({ @NgModule({
@@ -275,6 +280,7 @@ const DECLARATIONS = [
DsoSharedModule, DsoSharedModule,
SystemWideAlertModule, SystemWideAlertModule,
NgxGalleryModule, NgxGalleryModule,
FormModule,
], ],
declarations: DECLARATIONS, declarations: DECLARATIONS,
exports: [ exports: [