Skip to content

Commit be7938a

Browse files
authored
Merge pull request DSpace#2036 from atmire/w2p-98422_Thumbnail-uploader_contribute-7.2
Adding themed components for EditBitstreamPageComponent and ItemStatusComponent
2 parents aa74090 + 48896fd commit be7938a

12 files changed

Lines changed: 92 additions & 4 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 './bitstream-download-page/bitstream-download-page.component';
@@ -13,6 +12,7 @@ import { LegacyBitstreamUrlResolver } from './legacy-bitstream-url.resolver';
1312
import { BitstreamBreadcrumbResolver } from '../core/breadcrumbs/bitstream-breadcrumb.resolver';
1413
import { BitstreamBreadcrumbsService } from '../core/breadcrumbs/bitstream-breadcrumbs.service';
1514
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
15+
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
1616

1717
const EDIT_BITSTREAM_PATH = ':id/edit';
1818
const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
@@ -49,7 +49,7 @@ const EDIT_BITSTREAM_AUTHORIZATIONS_PATH = ':id/authorizations';
4949
},
5050
{
5151
path: EDIT_BITSTREAM_PATH,
52-
component: EditBitstreamPageComponent,
52+
component: ThemedEditBitstreamPageComponent,
5353
resolve: {
5454
bitstream: BitstreamPageResolver,
5555
breadcrumb: BitstreamBreadcrumbResolver,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { BitstreamAuthorizationsComponent } from './bitstream-authorizations/bit
77
import { FormModule } from '../shared/form/form.module';
88
import { ResourcePoliciesModule } from '../shared/resource-policies/resource-policies.module';
99
import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstream-download-page.component';
10+
import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-edit-bitstream-page.component';
1011

1112
/**
1213
* This module handles all components that are necessary for Bitstream related pages
@@ -22,6 +23,7 @@ import { BitstreamDownloadPageComponent } from './bitstream-download-page/bitstr
2223
declarations: [
2324
BitstreamAuthorizationsComponent,
2425
EditBitstreamPageComponent,
26+
ThemedEditBitstreamPageComponent,
2527
BitstreamDownloadPageComponent,
2628
]
2729
})
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ import { IdentifierDataComponent } from '../../shared/object-list/identifier-dat
3939
import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component';
4040
import { DsoSharedModule } from '../../dso-shared/dso-shared.module';
4141
import { ItemCurateComponent } from './item-curate/item-curate.component';
42+
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
43+
4244

4345
/**
4446
* 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';
6769
ItemPublicComponent,
6870
ItemDeleteComponent,
6971
ItemStatusComponent,
72+
ThemedItemStatusComponent,
7073
ItemRelationshipsComponent,
7174
ItemBitstreamsComponent,
7275
ItemVersionHistoryComponent,
@@ -89,6 +92,9 @@ import { ItemCurateComponent } from './item-curate/item-curate.component';
8992
IdentifierDataService,
9093
ObjectValuesPipe
9194
],
95+
exports: [
96+
ItemOperationComponent,
97+
]
9298
})
9399
export class EditItemPageModule {
94100

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 { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
1110
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
1211
import { ItemMoveComponent } from './item-move/item-move.component';
@@ -42,6 +41,7 @@ import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.gua
4241
import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component';
4342
import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard';
4443
import { ItemCurateComponent } from './item-curate/item-curate.component';
44+
import { ThemedItemStatusComponent } from './item-status/themed-item-status.component';
4545

4646
/**
4747
* 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';
6767
},
6868
{
6969
path: 'status',
70-
component: ItemStatusComponent,
70+
component: ThemedItemStatusComponent,
7171
data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true },
7272
canActivate: [ItemPageStatusGuard]
7373
},
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)