Skip to content

Commit 9627ebb

Browse files
authored
Merge branch 'DSpace:main' into DA-8586
2 parents 68a3c8a + 95b8dc3 commit 9627ebb

50 files changed

Lines changed: 2706 additions & 6816 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.

config/config.example.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ auth:
5555

5656
# Form settings
5757
form:
58+
# Sets the spellcheck textarea attribute value
59+
spellCheck: true
5860
# NOTE: Map server-side validators to comparative Angular form validators
5961
validatorMap:
6062
required: required
@@ -143,6 +145,9 @@ languages:
143145
- code: nl
144146
label: Nederlands
145147
active: true
148+
- code: pl
149+
label: Polski
150+
active: true
146151
- code: pt-PT
147152
label: Português
148153
active: true
@@ -174,6 +179,7 @@ languages:
174179
label: Yкраї́нська
175180
active: true
176181

182+
177183
# Browse-By Pages
178184
browseBy:
179185
# Amount of years to display using jumps of one year (current year - oneYearLimit)

src/app/access-control/group-registry/group-form/group-form.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import { followLink } from '../../../shared/utils/follow-link-config.model';
4646
import { NoContent } from '../../../core/shared/NoContent.model';
4747
import { Operation } from 'fast-json-patch';
4848
import { ValidateGroupExists } from './validators/group-exists.validator';
49+
import { environment } from '../../../../environments/environment';
4950

5051
@Component({
5152
selector: 'ds-group-form',
@@ -194,6 +195,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
194195
label: groupDescription,
195196
name: 'groupDescription',
196197
required: false,
198+
spellCheck: environment.form.spellCheck,
197199
});
198200
this.formModel = [
199201
this.groupName,

src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Router } from '@angular/router';
1515
import { hasValue, isEmpty } from '../../../../shared/empty.util';
1616
import { TranslateService } from '@ngx-translate/core';
1717
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
18+
import { environment } from '../../../../../environments/environment';
1819

1920
/**
2021
* The component responsible for rendering the form to create/edit a bitstream format
@@ -90,6 +91,7 @@ export class FormatFormComponent implements OnInit {
9091
name: 'description',
9192
label: 'admin.registries.bitstream-formats.edit.description.label',
9293
hint: 'admin.registries.bitstream-formats.edit.description.hint',
94+
spellCheck: environment.form.spellCheck,
9395

9496
}),
9597
new DynamicSelectModel({

src/app/collection-page/collection-form/collection-form.models.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { DynamicFormControlModel, DynamicInputModel, DynamicTextAreaModel } from '@ng-dynamic-forms/core';
22
import { DynamicSelectModelConfig } from '@ng-dynamic-forms/core/lib/model/select/dynamic-select.model';
3+
import { environment } from '../../../environments/environment';
34

45
export const collectionFormEntityTypeSelectionConfig: DynamicSelectModelConfig<string> = {
56
id: 'entityType',
@@ -26,21 +27,26 @@ export const collectionFormModels: DynamicFormControlModel[] = [
2627
new DynamicTextAreaModel({
2728
id: 'description',
2829
name: 'dc.description',
30+
spellCheck: environment.form.spellCheck,
2931
}),
3032
new DynamicTextAreaModel({
3133
id: 'abstract',
3234
name: 'dc.description.abstract',
35+
spellCheck: environment.form.spellCheck,
3336
}),
3437
new DynamicTextAreaModel({
3538
id: 'rights',
3639
name: 'dc.rights',
40+
spellCheck: environment.form.spellCheck,
3741
}),
3842
new DynamicTextAreaModel({
3943
id: 'tableofcontents',
4044
name: 'dc.description.tableofcontents',
45+
spellCheck: environment.form.spellCheck,
4146
}),
4247
new DynamicTextAreaModel({
4348
id: 'license',
4449
name: 'dc.rights.license',
50+
spellCheck: environment.form.spellCheck,
4551
})
4652
];

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import { MenuItemType } from '../shared/menu/menu-item-type.model';
7272
id: 'statistics_collection_:id',
7373
active: true,
7474
visible: true,
75+
index: 2,
7576
model: {
7677
type: MenuItemType.LINK,
7778
text: 'menu.section.statistics',

src/app/community-page/community-form/community-form.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { CommunityDataService } from '../../core/data/community-data.service';
1313
import { AuthService } from '../../core/auth/auth.service';
1414
import { RequestService } from '../../core/data/request.service';
1515
import { ObjectCacheService } from '../../core/cache/object-cache.service';
16+
import { environment } from '../../../environments/environment';
1617

1718
/**
1819
* Form used for creating and editing communities
@@ -52,18 +53,22 @@ export class CommunityFormComponent extends ComColFormComponent<Community> {
5253
new DynamicTextAreaModel({
5354
id: 'description',
5455
name: 'dc.description',
56+
spellCheck: environment.form.spellCheck,
5557
}),
5658
new DynamicTextAreaModel({
5759
id: 'abstract',
5860
name: 'dc.description.abstract',
61+
spellCheck: environment.form.spellCheck,
5962
}),
6063
new DynamicTextAreaModel({
6164
id: 'rights',
6265
name: 'dc.rights',
66+
spellCheck: environment.form.spellCheck,
6367
}),
6468
new DynamicTextAreaModel({
6569
id: 'tableofcontents',
6670
name: 'dc.description.tableofcontents',
71+
spellCheck: environment.form.spellCheck,
6772
}),
6873
];
6974

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { MenuItemType } from '../shared/menu/menu-item-type.model';
5555
id: 'statistics_community_:id',
5656
active: true,
5757
visible: true,
58+
index: 2,
5859
model: {
5960
type: MenuItemType.LINK,
6061
text: 'menu.section.statistics',

src/app/core/locale/locale.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class LocaleService {
4040
protected translate: TranslateService,
4141
protected authService: AuthService,
4242
protected routeService: RouteService,
43-
@Inject(DOCUMENT) private document: any
43+
@Inject(DOCUMENT) protected document: any
4444
) {
4545
}
4646

src/app/core/locale/server-locale.service.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
import { LANG_ORIGIN, LocaleService } from './locale.service';
2-
import { Injectable } from '@angular/core';
2+
import { Inject, Injectable } from '@angular/core';
33
import { combineLatest, Observable, of as observableOf } from 'rxjs';
44
import { map, mergeMap, take } from 'rxjs/operators';
5-
import { isEmpty, isNotEmpty } from '../../shared/empty.util';
5+
import { hasValue, isEmpty, isNotEmpty } from '../../shared/empty.util';
6+
import { NativeWindowRef, NativeWindowService } from '../services/window.service';
7+
import { REQUEST } from '@nguniversal/express-engine/tokens';
8+
import { CookieService } from '../services/cookie.service';
9+
import { TranslateService } from '@ngx-translate/core';
10+
import { AuthService } from '../auth/auth.service';
11+
import { RouteService } from '../services/route.service';
12+
import { DOCUMENT } from '@angular/common';
613

714
@Injectable()
815
export class ServerLocaleService extends LocaleService {
916

17+
constructor(
18+
@Inject(NativeWindowService) protected _window: NativeWindowRef,
19+
@Inject(REQUEST) protected req: Request,
20+
protected cookie: CookieService,
21+
protected translate: TranslateService,
22+
protected authService: AuthService,
23+
protected routeService: RouteService,
24+
@Inject(DOCUMENT) protected document: any
25+
) {
26+
super(_window, cookie, translate, authService, routeService, document);
27+
}
28+
1029
/**
1130
* Get the languages list of the user in Accept-Language format
1231
*
@@ -50,6 +69,10 @@ export class ServerLocaleService extends LocaleService {
5069
if (isNotEmpty(epersonLang)) {
5170
languages.push(...epersonLang);
5271
}
72+
if (hasValue(this.req.headers['accept-language'])) {
73+
languages.push(...this.req.headers['accept-language'].split(',')
74+
);
75+
}
5376
return languages;
5477
})
5578
);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import { OrcidPageGuard } from './orcid-page/orcid-page.guard';
6767
id: 'statistics_item_:id',
6868
active: true,
6969
visible: true,
70+
index: 2,
7071
model: {
7172
type: MenuItemType.LINK,
7273
text: 'menu.section.statistics',

0 commit comments

Comments
 (0)