Skip to content

Commit c3d71cb

Browse files
98422: Themed ItemStatusComponent and EditBitstreamPageComponent
1 parent e4f483c commit c3d71cb

12 files changed

Lines changed: 88 additions & 6 deletions

File tree

src/app/bitstream-page/bitstream-page-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule } from '@angular/router';
3-
import { EditBitstreamPageComponent } from './edit-bitstream-page/edit-bitstream-page.component';
43
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
54
import { BitstreamPageResolver } from './bitstream-page.resolver';
65
import { BitstreamDownloadPageComponent } from '../shared/bitstream-download-page/bitstream-download-page.component';
@@ -10,6 +9,7 @@ import { ResourcePolicyResolver } from '../shared/resource-policies/resolvers/re
109
import { ResourcePolicyEditComponent } from '../shared/resource-policies/edit/resource-policy-edit.component';
1110
import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bitstream-authorizations.component';
1211
import { LegacyBitstreamUrlResolver } from './legacy-bitstream-url.resolver';
12+
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
1313

1414
const EDIT_BITSTREAM_PATH = ':id/edit';
1515
const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
@@ -46,7 +46,7 @@ const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
4646
},
4747
{
4848
path: EDIT_BITSTREAM_PATH,
49-
component: EditBitstreamPageComponent,
49+
component: ThemedEditBitstreamPageComponent,
5050
resolve: {
5151
bitstream: BitstreamPageResolver
5252
},

src/app/bitstream-page/bitstream-page.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BitstreamPageRoutingModule } from './bitstream-page-routing.module';
66
import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bitstream-authorizations.component';
77
import { FormModule } from '../shared/form/form.module';
88
import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module';
9+
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
910

1011
/**
1112
* This module handles all components that are necessary for Bitstream related pages
@@ -20,7 +21,8 @@ import { ResourcePoliciesModule } from '../shared/resource-policies/resource-pol
2021
],
2122
declarations: [
2223
BitstreamAuthorizationsComponent,
23-
EditBitstreamPageComponent
24+
EditBitstreamPageComponent,
25+
ThemedEditBitstreamPageComponent,
2426
]
2527
})
2628
export class BitstreamPageModule {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Component } from '@angular/core';
2+
import { EditBitstreamPageComponent } from './edit-bitstream-page.component';
3+
import { ThemedComponent } from '../../shared/theme-support/themed.component';
4+
5+
@Component({
6+
selector: 'ds-themed-edit-bitstream-page',
7+
styleUrls: [],
8+
templateUrl: '../../shared/theme-support/themed.component.html',
9+
})
10+
export class ThemedEditBitstreamPageComponent extends ThemedComponent<EditBitstreamPageComponent> {
11+
protected getComponentName(): string {
12+
return 'EditBitstreamPageComponent';
13+
}
14+
15+
protected importThemedComponent(themeName: string): Promise<any> {
16+
return import(`../../../themes/${themeName}/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component`);
17+
}
18+
19+
protected importUnthemedComponent(): Promise<any> {
20+
return import('./edit-bitstream-page.component');
21+
}
22+
}

src/app/item-page/edit-item-page/edit-item-page.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { ItemVersionHistoryComponent } from './item-version-history/item-version
3535
import { ItemAuthorizationsComponent } from './item-authorizations/item-authorizations.component';
3636
import { ObjectValuesPipe } from '../../shared/utils/object-values-pipe';
3737
import { ResourcePoliciesModule } from '../../shared/resource-policies/resource-policies.module';
38+
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
3839

3940

4041
/**
@@ -61,6 +62,7 @@ import { ResourcePoliciesModule } from '../../shared/resource-policies/resource-
6162
ItemPublicComponent,
6263
ItemDeleteComponent,
6364
ItemStatusComponent,
65+
ThemedItemStatusComponent,
6466
ItemMetadataComponent,
6567
ItemRelationshipsComponent,
6668
ItemBitstreamsComponent,

src/app/item-page/edit-item-page/edit-item-page.routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { ItemReinstateComponent } from './item-reinstate/item-reinstate.componen
66
import { ItemPrivateComponent } from './item-private/item-private.component';
77
import { ItemPublicComponent } from './item-public/item-public.component';
88
import { ItemDeleteComponent } from './item-delete/item-delete.component';
9-
import { ItemStatusComponent } from './item-status/item-status.component';
109
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
1110
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
1211
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
@@ -38,6 +37,7 @@ import { ItemPageBitstreamsGuard } from './item-page-bitstreams.guard';
3837
import { ItemPageRelationshipsGuard } from './item-page-relationships.guard';
3938
import { ItemPageVersionHistoryGuard } from './item-page-version-history.guard';
4039
import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.guard';
40+
import { ThemedItemPageComponent } from '../simple/themed-item-page.component';
4141

4242
/**
4343
* 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
6363
},
6464
{
6565
path: 'status',
66-
component: ItemStatusComponent,
66+
component: ThemedItemPageComponent,
6767
data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true },
6868
canActivate: [ItemPageStatusGuard]
6969
},
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Component } from '@angular/core';
2+
import { ThemedComponent } from '../../../shared/theme-support/themed.component';
3+
import { ItemStatusComponent } from './item-status.component';
4+
5+
@Component({
6+
selector: 'ds-themed-item-status',
7+
styleUrls: [],
8+
templateUrl: '../../../shared/theme-support/themed.component.html',
9+
})
10+
export class ThemedItemStatusComponent extends ThemedComponent<ItemStatusComponent> {
11+
protected getComponentName(): string {
12+
return 'ItemStatusComponent';
13+
}
14+
15+
protected importThemedComponent(themeName: string): Promise<any> {
16+
return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-status/item-status.component`);
17+
}
18+
19+
protected importUnthemedComponent(): Promise<any> {
20+
return import('./item-status.component');
21+
}
22+
23+
}

src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html

Whitespace-only changes.

src/themes/custom/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.scss

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { EditBitstreamPageComponent as BaseComponent } from '../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
2+
import { ChangeDetectionStrategy, Component } from '@angular/core';
3+
4+
@Component({
5+
selector: 'ds-edit-bitstream-page',
6+
// styleUrls: ['./edit-bitstream-page.component.scss'],
7+
styleUrls: ['../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.scss'],
8+
// templateUrl: './edit-bitstream-page.component.html',
9+
templateUrl: '../../../../../app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.html',
10+
changeDetection: ChangeDetectionStrategy.OnPush
11+
})
12+
export class EditBitstreamPageComponent extends BaseComponent {
13+
}

src/themes/custom/app/item-page/edit-item-page/item-status/item-status.component.html

Whitespace-only changes.

0 commit comments

Comments
 (0)