Skip to content

Commit 943e1b4

Browse files
authored
Merge pull request DSpace#2151 from alexandrevryghem/atmire-contributions-march-2023
New themed components
2 parents 3588643 + 2f336ff commit 943e1b4

41 files changed

Lines changed: 316 additions & 50 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/app-routing.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
218218
{
219219
path: 'statistics',
220220
loadChildren: () => import('./statistics-page/statistics-page-routing.module')
221-
.then((m) => m.StatisticsPageRoutingModule)
221+
.then((m) => m.StatisticsPageRoutingModule),
222+
canActivate: [EndUserAgreementCurrentUserGuard],
222223
},
223224
{
224225
path: HEALTH_PAGE_PATH,
@@ -228,7 +229,7 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
228229
{
229230
path: ACCESS_CONTROL_MODULE_PATH,
230231
loadChildren: () => import('./access-control/access-control.module').then((m) => m.AccessControlModule),
231-
canActivate: [GroupAdministratorGuard],
232+
canActivate: [GroupAdministratorGuard, EndUserAgreementCurrentUserGuard],
232233
},
233234
{
234235
path: 'subscriptions',

src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ds-themed-results-back-button *ngIf="showBackButton | async" [back]="back"></ds-themed-results-back-button>
22
<div class="d-flex flex-row">
3-
<ds-item-page-title-field [item]="object" class="mr-auto">
4-
</ds-item-page-title-field>
3+
<ds-themed-item-page-title-field [item]="object" class="mr-auto">
4+
</ds-themed-item-page-title-field>
55
<ds-dso-edit-menu></ds-dso-edit-menu>
66
</div>
77
<div class="row">

src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ds-themed-results-back-button *ngIf="showBackButton | async" [back]="back"></ds-themed-results-back-button>
22
<div class="d-flex flex-row">
3-
<ds-item-page-title-field [item]="object" class="mr-auto">
4-
</ds-item-page-title-field>
3+
<ds-themed-item-page-title-field [item]="object" class="mr-auto">
4+
</ds-themed-item-page-title-field>
55
<ds-dso-edit-menu></ds-dso-edit-menu>
66
</div>
77
<div class="row">

src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ds-themed-results-back-button *ngIf="showBackButton | async" [back]="back"></ds-themed-results-back-button>
22
<div class="d-flex flex-row">
3-
<ds-item-page-title-field [item]="object" class="mr-auto">
4-
</ds-item-page-title-field>
3+
<ds-themed-item-page-title-field [item]="object" class="mr-auto">
4+
</ds-themed-item-page-title-field>
55
<ds-dso-edit-menu></ds-dso-edit-menu>
66
</div>
77
<div class="row">

src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ds-themed-results-back-button *ngIf="showBackButton | async" [back]="back"></ds-themed-results-back-button>
22
<div class="d-flex flex-row">
3-
<ds-item-page-title-field [item]="object" class="mr-auto">
4-
</ds-item-page-title-field>
3+
<ds-themed-item-page-title-field [item]="object" class="mr-auto">
4+
</ds-themed-item-page-title-field>
55
<ds-dso-edit-menu></ds-dso-edit-menu>
66
</div>
77
<div class="row">

src/app/entity-groups/research-entities/item-pages/person/person.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ds-themed-results-back-button *ngIf="showBackButton | async" [back]="back"></ds-themed-results-back-button>
22
<div class="d-flex flex-row">
3-
<ds-item-page-title-field class="mr-auto" [item]="object">
4-
</ds-item-page-title-field>
3+
<ds-themed-item-page-title-field class="mr-auto" [item]="object">
4+
</ds-themed-item-page-title-field>
55
<ds-dso-edit-menu></ds-dso-edit-menu>
66
</div>
77
<div class="row">

src/app/entity-groups/research-entities/item-pages/project/project.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ds-themed-results-back-button *ngIf="showBackButton | async" [back]="back"></ds-themed-results-back-button>
22
<div class="d-flex flex-row">
3-
<ds-item-page-title-field [item]="object" class="mr-auto">
4-
</ds-item-page-title-field>
3+
<ds-themed-item-page-title-field [item]="object" class="mr-auto">
4+
</ds-themed-item-page-title-field>
55
<ds-dso-edit-menu></ds-dso-edit-menu>
66
</div>
77
<div class="row">
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Component } from '@angular/core';
2+
import { ThemedComponent } from '../../../shared/theme-support/themed.component';
3+
import { FeedbackFormComponent } from './feedback-form.component';
4+
5+
/**
6+
* Themed wrapper for {@link FeedbackFormComponent}
7+
*/
8+
@Component({
9+
selector: 'ds-themed-feedback-form',
10+
styleUrls: [],
11+
templateUrl: '../../../shared/theme-support/themed.component.html',
12+
})
13+
export class ThemedFeedbackFormComponent extends ThemedComponent<FeedbackFormComponent> {
14+
15+
protected getComponentName(): string {
16+
return 'FeedbackFormComponent';
17+
}
18+
19+
protected importThemedComponent(themeName: string): Promise<any> {
20+
return import(`../../../../themes/${themeName}/app/info/feedback/feedback-form/feedback-form.component`);
21+
}
22+
23+
protected importUnthemedComponent(): Promise<any> {
24+
return import('./feedback-form.component');
25+
}
26+
27+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div class="container">
2-
<ds-feedback-form></ds-feedback-form>
3-
</div>
2+
<ds-themed-feedback-form></ds-themed-feedback-form>
3+
</div>

src/app/info/info.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ThemedEndUserAgreementComponent } from './end-user-agreement/themed-end
1010
import { ThemedPrivacyComponent } from './privacy/themed-privacy.component';
1111
import { FeedbackComponent } from './feedback/feedback.component';
1212
import { FeedbackFormComponent } from './feedback/feedback-form/feedback-form.component';
13+
import { ThemedFeedbackFormComponent } from './feedback/feedback-form/themed-feedback-form.component';
1314
import { ThemedFeedbackComponent } from './feedback/themed-feedback.component';
1415
import { FeedbackGuard } from '../core/feedback/feedback.guard';
1516

@@ -23,6 +24,7 @@ const DECLARATIONS = [
2324
ThemedPrivacyComponent,
2425
FeedbackComponent,
2526
FeedbackFormComponent,
27+
ThemedFeedbackFormComponent,
2628
ThemedFeedbackComponent
2729
];
2830

0 commit comments

Comments
 (0)