Skip to content

Commit

Permalink
Merge remote-tracking branch 'dspace/main' into process-admin-ui-rede…
Browse files Browse the repository at this point in the history
…sign-8.0.0-next
  • Loading branch information
AAwouters committed Feb 23, 2024
2 parents adea818 + 45650c1 commit ff4b4a6
Show file tree
Hide file tree
Showing 67 changed files with 897 additions and 358 deletions.
10 changes: 9 additions & 1 deletion config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,17 @@ item:
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
pageSize: 5

# Community Page Config
community:
# Search tab config
searchSection:
showSidebar: true

# Collection Page Config
collection:
# Search tab config
searchSection:
showSidebar: true
edit:
undoTimeout: 10000 # 10 seconds

Expand Down Expand Up @@ -391,4 +400,3 @@ comcolSelectionSort:
# suggestion:
# - collectionId: 8f7df5ca-f9c2-47a4-81ec-8a6393d6e5af
# source: "openaire"

Original file line number Diff line number Diff line change
@@ -1,12 +0,0 @@
:host {
::ng-deep {
.switch {
position: absolute;
top: calc(var(--bs-spacer) * 2.5);
}
}
}
:host ::ng-deep ds-dynamic-form-control-container > div > label {
margin-top: 1.75rem;
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,35 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnIni
import { Bitstream } from '../../core/shared/bitstream.model';
import { ActivatedRoute, Router } from '@angular/router';
import { filter, map, switchMap, tap } from 'rxjs/operators';
import { combineLatest, combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs';
import { DynamicFormControlModel, DynamicFormGroupModel, DynamicFormLayout, DynamicFormService, DynamicInputModel, DynamicSelectModel } from '@ng-dynamic-forms/core';
import {
combineLatest,
combineLatest as observableCombineLatest,
Observable,
of as observableOf,
Subscription
} from 'rxjs';
import {
DynamicFormControlModel,
DynamicFormGroupModel,
DynamicFormLayout,
DynamicFormService,
DynamicInputModel,
DynamicSelectModel
} from '@ng-dynamic-forms/core';
import { UntypedFormGroup } from '@angular/forms';
import { TranslateService } from '@ngx-translate/core';
import { DynamicCustomSwitchModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model';
import {
DynamicCustomSwitchModel
} from '../../shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model';
import cloneDeep from 'lodash/cloneDeep';
import { BitstreamDataService } from '../../core/data/bitstream-data.service';
import { getAllSucceededRemoteDataPayload, getFirstCompletedRemoteData, getFirstSucceededRemoteData, getFirstSucceededRemoteDataPayload, getRemoteDataPayload } from '../../core/shared/operators';
import {
getAllSucceededRemoteDataPayload,
getFirstCompletedRemoteData,
getFirstSucceededRemoteData,
getFirstSucceededRemoteDataPayload,
getRemoteDataPayload
} from '../../core/shared/operators';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { BitstreamFormatDataService } from '../../core/data/bitstream-format-data.service';
import { BitstreamFormat } from '../../core/shared/bitstream-format.model';
Expand Down Expand Up @@ -245,7 +266,7 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
/**
* All input models in a simple array for easier iterations
*/
inputModels = [this.fileNameModel, this.primaryBitstreamModel, this.descriptionModel, this.selectedFormatModel,
inputModels = [this.primaryBitstreamModel, this.fileNameModel, this.descriptionModel, this.selectedFormatModel,
this.newFormatModel];

/**
Expand All @@ -256,8 +277,8 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
new DynamicFormGroupModel({
id: 'fileNamePrimaryContainer',
group: [
this.fileNameModel,
this.primaryBitstreamModel
this.primaryBitstreamModel,
this.fileNameModel
]
}, {
grid: {
Expand Down Expand Up @@ -295,7 +316,10 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
},
primaryBitstream: {
grid: {
host: 'col col-sm-4 d-inline-block switch border-0'
container: 'col-12'
},
element: {
container: 'text-right'
}
},
description: {
Expand Down
4 changes: 2 additions & 2 deletions src/app/collection-page/collection-page-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { DSOEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver';
import { ComcolBrowseByComponent } from '../shared/comcol/sections/comcol-browse-by/comcol-browse-by.component';
import { BrowseByGuard } from '../browse-by/browse-by-guard';
import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver';
import { CollectionRecentlyAddedComponent } from './sections/recently-added/collection-recently-added.component';
import { ComcolSearchSectionComponent } from '../shared/comcol/sections/comcol-search-section/comcol-search-section.component';

@NgModule({
imports: [
Expand Down Expand Up @@ -73,7 +73,7 @@ import { CollectionRecentlyAddedComponent } from './sections/recently-added/coll
{
path: '',
pathMatch: 'full',
component: CollectionRecentlyAddedComponent,
component: ComcolSearchSectionComponent,
},
{
path: 'browse/:id',
Expand Down
2 changes: 0 additions & 2 deletions src/app/collection-page/collection-page.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { ComcolModule } from '../shared/comcol/comcol.module';
import { DsoSharedModule } from '../dso-shared/dso-shared.module';
import { DsoPageModule } from '../shared/dso-page/dso-page.module';
import { BrowseByPageModule } from '../browse-by/browse-by-page.module';
import { CollectionRecentlyAddedComponent } from './sections/recently-added/collection-recently-added.component';

const DECLARATIONS = [
CollectionPageComponent,
Expand All @@ -29,7 +28,6 @@ const DECLARATIONS = [
EditItemTemplatePageComponent,
ThemedEditItemTemplatePageComponent,
CollectionItemMapperComponent,
CollectionRecentlyAddedComponent,
];

@NgModule({
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions src/app/community-page/community-page-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { SubComColSectionComponent } from './sections/sub-com-col-section/sub-co
import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver';
import { BrowseByGuard } from '../browse-by/browse-by-guard';
import { ComcolBrowseByComponent } from '../shared/comcol/sections/comcol-browse-by/comcol-browse-by.component';
import { ComcolSearchSectionComponent } from '../shared/comcol/sections/comcol-search-section/comcol-search-section.component';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';

@NgModule({
imports: [
Expand Down Expand Up @@ -56,7 +58,16 @@ import { ComcolBrowseByComponent } from '../shared/comcol/sections/comcol-browse
{
path: '',
pathMatch: 'full',
component: ComcolSearchSectionComponent,
},
{
path: 'subcoms-cols',
pathMatch: 'full',
component: SubComColSectionComponent,
resolve: {
breadcrumb: I18nBreadcrumbResolver,
},
data: { breadcrumbKey: 'community.subcoms-cols' },
},
{
path: 'browse/:id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('SubComColSectionComponent', () => {

beforeEach(async () => {
activatedRoute = new ActivatedRouteStub();
activatedRoute.parent = new ActivatedRouteStub();

await TestBed.configureTestingModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class SubComColSectionComponent implements OnInit {
}

ngOnInit(): void {
this.community$ = this.route.data.pipe(
this.community$ = this.route.parent.data.pipe(
map((data: Data) => (data.dso as RemoteData<Community>).payload),
);
}
Expand Down
Loading

0 comments on commit ff4b4a6

Please sign in to comment.