mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
98422: Themed ItemStatusComponent and EditBitstreamPageComponent
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { EditBitstreamPageComponent } from './edit-bitstream-page/edit-bitstream-page.component';
|
||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||
import { BitstreamPageResolver } from './bitstream-page.resolver';
|
||||
import { BitstreamDownloadPageComponent } from '../shared/bitstream-download-page/bitstream-download-page.component';
|
||||
@@ -10,6 +9,7 @@ import { ResourcePolicyResolver } from '../shared/resource-policies/resolvers/re
|
||||
import { ResourcePolicyEditComponent } from '../shared/resource-policies/edit/resource-policy-edit.component';
|
||||
import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bitstream-authorizations.component';
|
||||
import { LegacyBitstreamUrlResolver } from './legacy-bitstream-url.resolver';
|
||||
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
|
||||
|
||||
const EDIT_BITSTREAM_PATH = ':id/edit';
|
||||
const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
|
||||
@@ -46,7 +46,7 @@ const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
|
||||
},
|
||||
{
|
||||
path: EDIT_BITSTREAM_PATH,
|
||||
component: EditBitstreamPageComponent,
|
||||
component: ThemedEditBitstreamPageComponent,
|
||||
resolve: {
|
||||
bitstream: BitstreamPageResolver
|
||||
},
|
||||
|
@@ -6,6 +6,7 @@ import { BitstreamPageRoutingModule } from './bitstream-page-routing.module';
|
||||
import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bitstream-authorizations.component';
|
||||
import { FormModule } from '../shared/form/form.module';
|
||||
import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module';
|
||||
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
|
||||
|
||||
/**
|
||||
* This module handles all components that are necessary for Bitstream related pages
|
||||
@@ -20,7 +21,8 @@ import { ResourcePoliciesModule } from '../shared/resource-policies/resource-pol
|
||||
],
|
||||
declarations: [
|
||||
BitstreamAuthorizationsComponent,
|
||||
EditBitstreamPageComponent
|
||||
EditBitstreamPageComponent,
|
||||
ThemedEditBitstreamPageComponent,
|
||||
]
|
||||
})
|
||||
export class BitstreamPageModule {
|
||||
|
@@ -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');
|
||||
}
|
||||
}
|
@@ -35,6 +35,7 @@ import { ItemVersionHistoryComponent } from './item-version-history/item-version
|
||||
import { ItemAuthorizationsComponent } from './item-authorizations/item-authorizations.component';
|
||||
import { ObjectValuesPipe } from '../../shared/utils/object-values-pipe';
|
||||
import { ResourcePoliciesModule } from '../../shared/resource-policies/resource-policies.module';
|
||||
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,6 +62,7 @@ import { ResourcePoliciesModule } from '../../shared/resource-policies/resource-
|
||||
ItemPublicComponent,
|
||||
ItemDeleteComponent,
|
||||
ItemStatusComponent,
|
||||
ThemedItemStatusComponent,
|
||||
ItemMetadataComponent,
|
||||
ItemRelationshipsComponent,
|
||||
ItemBitstreamsComponent,
|
||||
|
@@ -6,7 +6,6 @@ import { ItemReinstateComponent } from './item-reinstate/item-reinstate.componen
|
||||
import { ItemPrivateComponent } from './item-private/item-private.component';
|
||||
import { ItemPublicComponent } from './item-public/item-public.component';
|
||||
import { ItemDeleteComponent } from './item-delete/item-delete.component';
|
||||
import { ItemStatusComponent } from './item-status/item-status.component';
|
||||
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
|
||||
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
|
||||
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
|
||||
@@ -38,6 +37,7 @@ import { ItemPageBitstreamsGuard } from './item-page-bitstreams.guard';
|
||||
import { ItemPageRelationshipsGuard } from './item-page-relationships.guard';
|
||||
import { ItemPageVersionHistoryGuard } from './item-page-version-history.guard';
|
||||
import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.guard';
|
||||
import { ThemedItemPageComponent } from '../simple/themed-item-page.component';
|
||||
|
||||
/**
|
||||
* Routing module that handles the routing for the Edit Item page administrator functionality
|
||||
@@ -63,7 +63,7 @@ import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.gua
|
||||
},
|
||||
{
|
||||
path: 'status',
|
||||
component: ItemStatusComponent,
|
||||
component: ThemedItemPageComponent,
|
||||
data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true },
|
||||
canActivate: [ItemPageStatusGuard]
|
||||
},
|
||||
|
@@ -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');
|
||||
}
|
||||
|
||||
}
|
@@ -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 {
|
||||
}
|
@@ -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 {
|
||||
}
|
@@ -84,6 +84,8 @@ import { SearchModule } from '../../app/shared/search/search.module';
|
||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
||||
import { ComcolModule } from '../../app/shared/comcol/comcol.module';
|
||||
import { FeedbackComponent } from './app/info/feedback/feedback.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';
|
||||
|
||||
const DECLARATIONS = [
|
||||
FileSectionComponent,
|
||||
@@ -126,7 +128,9 @@ const DECLARATIONS = [
|
||||
NavbarComponent,
|
||||
HeaderNavbarWrapperComponent,
|
||||
BreadcrumbsComponent,
|
||||
FeedbackComponent
|
||||
FeedbackComponent,
|
||||
ItemStatusComponent,
|
||||
EditBitstreamPageComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
Reference in New Issue
Block a user