Skip to content

Commit ebdd7c5

Browse files
author
abhinav
committed
124198: Add themeable ItemBitstreamsComponent
1 parent 404ccd9 commit ebdd7c5

File tree

7 files changed

+55
-2
lines changed

7 files changed

+55
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import { ResultsBackButtonModule } from '../../shared/results-back-button/result
4646
import {
4747
AccessControlFormModule
4848
} from '../../shared/access-control-form-container/access-control-form.module';
49+
import { ThemedItemBitstreamsComponent } from './item-bitstreams/themed-item-bitstreams.component';
4950

5051
/**
5152
* Module that contains all components related to the Edit Item page administrator functionality
@@ -79,6 +80,7 @@ import {
7980
ThemedItemStatusComponent,
8081
ItemRelationshipsComponent,
8182
ItemBitstreamsComponent,
83+
ThemedItemBitstreamsComponent,
8284
ItemVersionHistoryComponent,
8385
ItemEditBitstreamComponent,
8486
ItemEditBitstreamBundleComponent,
@@ -102,6 +104,8 @@ import {
102104
],
103105
exports: [
104106
ItemOperationComponent,
107+
ItemEditBitstreamBundleComponent,
108+
ItemEditBitstreamDragHandleComponent,
105109
]
106110
})
107111
export class EditItemPageModule {

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,7 @@ 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 { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
9+
import { ThemedItemBitstreamsComponent } from './item-bitstreams/themed-item-bitstreams.component';
1010
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
1111
import { ItemMoveComponent } from './item-move/item-move.component';
1212
import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component';
@@ -74,7 +74,7 @@ import { ItemAccessControlComponent } from './item-access-control/item-access-co
7474
},
7575
{
7676
path: 'bitstreams',
77-
component: ItemBitstreamsComponent,
77+
component: ThemedItemBitstreamsComponent,
7878
data: { title: 'item.edit.tabs.bitstreams.title', showBreadcrumbs: true },
7979
canActivate: [ItemPageBitstreamsGuard]
8080
},
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { ThemedComponent } from '../../../shared/theme-support/themed.component';
2+
import { ItemBitstreamsComponent } from './item-bitstreams.component';
3+
import { Component, Input } from '@angular/core';
4+
import { Item } from '../../../core/shared/item.model';
5+
6+
/**
7+
* Themed wrapper for {@link ItemBitstreamsComponent}
8+
*/
9+
@Component({
10+
selector: 'ds-themed-item-bitstreams',
11+
styleUrls: ['./item-bitstreams.component.scss'],
12+
templateUrl: '../../../shared/theme-support/themed.component.html',
13+
})
14+
export class ThemedItemBitstreamsComponent extends ThemedComponent<ItemBitstreamsComponent> {
15+
@Input() item: Item;
16+
17+
protected inAndOutputNames: (keyof ItemBitstreamsComponent & keyof this)[] = [
18+
'item',
19+
];
20+
21+
protected getComponentName(): string {
22+
return 'ItemBitstreamsComponent';
23+
}
24+
25+
protected importThemedComponent(themeName: string): Promise<any> {
26+
return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component`);
27+
}
28+
29+
protected importUnthemedComponent(): Promise<any> {
30+
return import(`./item-bitstreams.component`);
31+
}
32+
}

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

Whitespace-only changes.

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

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

src/themes/custom/eager-theme.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ import {
5454
ItemSearchResultListElementComponent
5555
} from './app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component';
5656
import { TopLevelCommunityListComponent } from './app/home-page/top-level-community-list/top-level-community-list.component';
57+
import { ItemBitstreamsComponent } from './app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component';
58+
import { EditItemPageModule } from '../../app/item-page/edit-item-page/edit-item-page.module';
5759

5860

5961
/**
@@ -75,6 +77,7 @@ const ENTRY_COMPONENTS = [
7577
PublicationSidebarSearchListElementComponent,
7678
ItemSearchResultListElementComponent,
7779
TopLevelCommunityListComponent,
80+
ItemBitstreamsComponent
7881
];
7982

8083
const DECLARATIONS = [
@@ -104,6 +107,7 @@ const DECLARATIONS = [
104107
ItemPageModule,
105108
ItemSharedModule,
106109
DsoPageModule,
110+
EditItemPageModule
107111
],
108112
declarations: DECLARATIONS,
109113
providers: [

0 commit comments

Comments
 (0)