Skip to content

Commit 109418b

Browse files
Merge remote-tracking branch 'upstream/main' into fix-specs-without-expectations_contribute-main
# Conflicts: # src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts
2 parents bba6971 + bfeeeac commit 109418b

134 files changed

Lines changed: 3493 additions & 1122 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: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ submission:
136136
# NOTE: example of configuration
137137
# # NOTE: metadata name
138138
# - name: dc.author
139-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
139+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
140140
# style: fas fa-user
141141
- name: dc.author
142142
style: fas fa-user
@@ -147,18 +147,40 @@ submission:
147147
confidence:
148148
# NOTE: example of configuration
149149
# # NOTE: confidence value
150-
# - name: dc.author
151-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
152-
# style: fa-user
150+
# - value: 600
151+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
152+
# style: text-success
153+
# icon: fa-circle-check
154+
# # NOTE: the class configured in property style is used by default, the icon property could be used in component
155+
# configured to use a 'icon mode' display (mainly in edit-item page)
153156
- value: 600
154157
style: text-success
158+
icon: fa-circle-check
155159
- value: 500
156160
style: text-info
161+
icon: fa-gear
157162
- value: 400
158163
style: text-warning
164+
icon: fa-circle-question
165+
- value: 300
166+
style: text-muted
167+
icon: fa-thumbs-down
168+
- value: 200
169+
style: text-muted
170+
icon: fa-circle-exclamation
171+
- value: 100
172+
style: text-muted
173+
icon: fa-circle-stop
174+
- value: 0
175+
style: text-muted
176+
icon: fa-ban
177+
- value: -1
178+
style: text-muted
179+
icon: fa-circle-xmark
159180
# default configuration
160181
- value: default
161182
style: text-muted
183+
icon: fa-circle-xmark
162184

163185
# Default Language in which the UI will be rendered if the user's browser language is not an active language
164186
defaultLanguage: en
@@ -272,6 +294,8 @@ homePage:
272294
# No. of communities to list per page on the home page
273295
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
274296
pageSize: 5
297+
# Enable or disable the Discover filters on the homepage
298+
showDiscoverFilters: false
275299

276300
# Item Config
277301
item:
@@ -285,8 +309,17 @@ item:
285309
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
286310
pageSize: 5
287311

312+
# Community Page Config
313+
community:
314+
# Search tab config
315+
searchSection:
316+
showSidebar: true
317+
288318
# Collection Page Config
289319
collection:
320+
# Search tab config
321+
searchSection:
322+
showSidebar: true
290323
edit:
291324
undoTimeout: 10000 # 10 seconds
292325

@@ -391,4 +424,3 @@ comcolSelectionSort:
391424
# suggestion:
392425
# - collectionId: 8f7df5ca-f9c2-47a4-81ec-8a6393d6e5af
393426
# source: "openaire"
394-
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +0,0 @@
1-
:host {
2-
::ng-deep {
3-
.switch {
4-
position: absolute;
5-
top: calc(var(--bs-spacer) * 2.5);
6-
}
7-
}
8-
}
9-
:host ::ng-deep ds-dynamic-form-control-container > div > label {
10-
margin-top: 1.75rem;
11-
}
12-

src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,35 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnIni
22
import { Bitstream } from '../../core/shared/bitstream.model';
33
import { ActivatedRoute, Router } from '@angular/router';
44
import { filter, map, switchMap, tap } from 'rxjs/operators';
5-
import { combineLatest, combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs';
6-
import { DynamicFormControlModel, DynamicFormGroupModel, DynamicFormLayout, DynamicFormService, DynamicInputModel, DynamicSelectModel } from '@ng-dynamic-forms/core';
5+
import {
6+
combineLatest,
7+
combineLatest as observableCombineLatest,
8+
Observable,
9+
of as observableOf,
10+
Subscription
11+
} from 'rxjs';
12+
import {
13+
DynamicFormControlModel,
14+
DynamicFormGroupModel,
15+
DynamicFormLayout,
16+
DynamicFormService,
17+
DynamicInputModel,
18+
DynamicSelectModel
19+
} from '@ng-dynamic-forms/core';
720
import { UntypedFormGroup } from '@angular/forms';
821
import { TranslateService } from '@ngx-translate/core';
9-
import { DynamicCustomSwitchModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model';
22+
import {
23+
DynamicCustomSwitchModel
24+
} from '../../shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model';
1025
import cloneDeep from 'lodash/cloneDeep';
1126
import { BitstreamDataService } from '../../core/data/bitstream-data.service';
12-
import { getAllSucceededRemoteDataPayload, getFirstCompletedRemoteData, getFirstSucceededRemoteData, getFirstSucceededRemoteDataPayload, getRemoteDataPayload } from '../../core/shared/operators';
27+
import {
28+
getAllSucceededRemoteDataPayload,
29+
getFirstCompletedRemoteData,
30+
getFirstSucceededRemoteData,
31+
getFirstSucceededRemoteDataPayload,
32+
getRemoteDataPayload
33+
} from '../../core/shared/operators';
1334
import { NotificationsService } from '../../shared/notifications/notifications.service';
1435
import { BitstreamFormatDataService } from '../../core/data/bitstream-format-data.service';
1536
import { BitstreamFormat } from '../../core/shared/bitstream-format.model';
@@ -245,7 +266,7 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
245266
/**
246267
* All input models in a simple array for easier iterations
247268
*/
248-
inputModels = [this.fileNameModel, this.primaryBitstreamModel, this.descriptionModel, this.selectedFormatModel,
269+
inputModels = [this.primaryBitstreamModel, this.fileNameModel, this.descriptionModel, this.selectedFormatModel,
249270
this.newFormatModel];
250271

251272
/**
@@ -256,8 +277,8 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
256277
new DynamicFormGroupModel({
257278
id: 'fileNamePrimaryContainer',
258279
group: [
259-
this.fileNameModel,
260-
this.primaryBitstreamModel
280+
this.primaryBitstreamModel,
281+
this.fileNameModel
261282
]
262283
}, {
263284
grid: {
@@ -295,7 +316,10 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
295316
},
296317
primaryBitstream: {
297318
grid: {
298-
host: 'col col-sm-4 d-inline-block switch border-0'
319+
container: 'col-12'
320+
},
321+
element: {
322+
container: 'text-right'
299323
}
300324
},
301325
description: {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver';
2525
import { ComcolBrowseByComponent } from '../shared/comcol/sections/comcol-browse-by/comcol-browse-by.component';
2626
import { BrowseByGuard } from '../browse-by/browse-by-guard';
2727
import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver';
28-
import { CollectionRecentlyAddedComponent } from './sections/recently-added/collection-recently-added.component';
28+
import { ComcolSearchSectionComponent } from '../shared/comcol/sections/comcol-search-section/comcol-search-section.component';
2929

3030
@NgModule({
3131
imports: [
@@ -73,7 +73,7 @@ import { CollectionRecentlyAddedComponent } from './sections/recently-added/coll
7373
{
7474
path: '',
7575
pathMatch: 'full',
76-
component: CollectionRecentlyAddedComponent,
76+
component: ComcolSearchSectionComponent,
7777
},
7878
{
7979
path: 'browse/:id',

src/app/collection-page/collection-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
<ds-themed-loading *ngIf="collectionRD?.isLoading"
5959
message="{{'loading.collection' | translate}}"></ds-themed-loading>
6060
</div>
61-
</div>
61+
</div>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { ComcolModule } from '../shared/comcol/comcol.module';
1919
import { DsoSharedModule } from '../dso-shared/dso-shared.module';
2020
import { DsoPageModule } from '../shared/dso-page/dso-page.module';
2121
import { BrowseByPageModule } from '../browse-by/browse-by-page.module';
22-
import { CollectionRecentlyAddedComponent } from './sections/recently-added/collection-recently-added.component';
2322

2423
const DECLARATIONS = [
2524
CollectionPageComponent,
@@ -29,7 +28,6 @@ const DECLARATIONS = [
2928
EditItemTemplatePageComponent,
3029
ThemedEditItemTemplatePageComponent,
3130
CollectionItemMapperComponent,
32-
CollectionRecentlyAddedComponent,
3331
];
3432

3533
@NgModule({

src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('CollectionSourceControlsComponent', () => {
8888
invoke: createSuccessfulRemoteDataObject$(process),
8989
});
9090
processDataService = jasmine.createSpyObj('processDataService', {
91-
findById: createSuccessfulRemoteDataObject$(process),
91+
autoRefreshUntilCompletion: createSuccessfulRemoteDataObject$(process),
9292
});
9393
bitstreamService = jasmine.createSpyObj('bitstreamService', {
9494
findByHref: createSuccessfulRemoteDataObject$(bitstream),
@@ -137,7 +137,7 @@ describe('CollectionSourceControlsComponent', () => {
137137
{name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId)},
138138
], []);
139139

140-
expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false);
140+
expect(processDataService.autoRefreshUntilCompletion).toHaveBeenCalledWith(process.processId);
141141
expect(bitstreamService.findByHref).toHaveBeenCalledWith(process._links.output.href);
142142
expect(notificationsService.info).toHaveBeenCalledWith(jasmine.anything() as any, 'Script text');
143143
});
@@ -151,7 +151,7 @@ describe('CollectionSourceControlsComponent', () => {
151151
{name: '-r', value: null},
152152
{name: '-c', value: collection.uuid},
153153
], []);
154-
expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false);
154+
expect(processDataService.autoRefreshUntilCompletion).toHaveBeenCalledWith(process.processId);
155155
expect(notificationsService.success).toHaveBeenCalled();
156156
});
157157
});
@@ -164,7 +164,7 @@ describe('CollectionSourceControlsComponent', () => {
164164
{name: '-o', value: null},
165165
{name: '-c', value: collection.uuid},
166166
], []);
167-
expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false);
167+
expect(processDataService.autoRefreshUntilCompletion).toHaveBeenCalledWith(process.processId);
168168
expect(notificationsService.success).toHaveBeenCalled();
169169
});
170170
});

0 commit comments

Comments
 (0)