Skip to content

Commit d523e1e

Browse files
authored
Merge branch 'main' into DURACOM-138
2 parents 0cf46d0 + 959f826 commit d523e1e

31 files changed

Lines changed: 2871 additions & 169 deletions

config/config.example.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ languages:
214214
- code: tr
215215
label: Türkçe
216216
active: true
217+
- code: vi
218+
label: Tiếng Việt
219+
active: true
217220
- code: kk
218221
label: Қазақ
219222
active: true

src/app/community-list-page/community-list/community-list.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<span class="fa fa-chevron-right invisible" aria-hidden="true"></span>
99
</button>
1010
<div class="align-middle pt-2">
11-
<a *ngIf="node!==loadingNode" [routerLink]="[]" (click)="getNextPage(node)"
11+
<button *ngIf="node!==loadingNode" (click)="getNextPage(node)"
1212
class="btn btn-outline-primary btn-sm" role="button">
1313
<i class="fas fa-angle-down"></i> {{ 'communityList.showMore' | translate }}
14-
</a>
14+
</button>
1515
<ds-themed-loading *ngIf="node===loadingNode && dataSource.loading$ | async" class="ds-themed-loading"></ds-themed-loading>
1616
</div>
1717
</div>

src/app/community-list-page/community-list/community-list.component.spec.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { of as observableOf } from 'rxjs';
1616
import { By } from '@angular/platform-browser';
1717
import { isEmpty, isNotEmpty } from '../../shared/empty.util';
1818
import { FlatNode } from '../flat-node.model';
19+
import { RouterLinkWithHref } from '@angular/router';
1920

2021
describe('CommunityListComponent', () => {
2122
let component: CommunityListComponent;
@@ -194,7 +195,7 @@ describe('CommunityListComponent', () => {
194195
}),
195196
CdkTreeModule,
196197
RouterTestingModule],
197-
declarations: [CommunityListComponent],
198+
declarations: [CommunityListComponent, RouterLinkWithHref],
198199
providers: [CommunityListComponent,
199200
{ provide: CommunityListService, useValue: communityListServiceStub },],
200201
schemas: [CUSTOM_ELEMENTS_SCHEMA],
@@ -230,16 +231,22 @@ describe('CommunityListComponent', () => {
230231
expect(showMoreEl).toBeTruthy();
231232
});
232233

234+
it('should not render the show more button as an empty link', () => {
235+
const debugElements = fixture.debugElement.queryAll(By.directive(RouterLinkWithHref));
236+
expect(debugElements).toBeTruthy();
237+
});
238+
233239
describe('when show more of top communities is clicked', () => {
234240
beforeEach(fakeAsync(() => {
235-
const showMoreLink = fixture.debugElement.query(By.css('.show-more-node a'));
241+
const showMoreLink = fixture.debugElement.query(By.css('.show-more-node .btn-outline-primary'));
236242
showMoreLink.triggerEventHandler('click', {
237243
preventDefault: () => {/**/
238244
}
239245
});
240246
tick();
241247
fixture.detectChanges();
242248
}));
249+
243250
it('tree contains maximum of currentPage (2) * (2) elementsPerPage of first top communities, or less if there are less communities (3)', () => {
244251
const expandableNodesFound = fixture.debugElement.queryAll(By.css('.expandable-node a'));
245252
const childlessNodesFound = fixture.debugElement.queryAll(By.css('.childless-node a'));

src/app/curation-form/curation-form.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input, OnInit } from '@angular/core';
1+
import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';
22
import { ScriptDataService } from '../core/data/processes/script-data.service';
33
import { FormControl, FormGroup } from '@angular/forms';
44
import { getFirstCompletedRemoteData } from '../core/shared/operators';
@@ -40,7 +40,8 @@ export class CurationFormComponent implements OnInit {
4040
private notificationsService: NotificationsService,
4141
private translateService: TranslateService,
4242
private handleService: HandleService,
43-
private router: Router
43+
private router: Router,
44+
private cdr: ChangeDetectorRef
4445
) {
4546
}
4647

@@ -59,6 +60,7 @@ export class CurationFormComponent implements OnInit {
5960
.filter((value) => isNotEmpty(value) && value.includes('='))
6061
.map((value) => value.split('=')[1].trim());
6162
this.form.get('task').patchValue(this.tasks[0]);
63+
this.cdr.detectChanges();
6264
});
6365
}
6466

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
@media screen and (max-width: map-get($grid-breakpoints, md)) {
2-
:host.open {
3-
background-color: var(--bs-white);
4-
top: 0;
5-
position: sticky;
6-
}
1+
:host {
2+
position: relative;
3+
z-index: var(--ds-nav-z-index);
74
}

src/app/header-nav-wrapper/themed-header-navbar-wrapper.component.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/app/header/header.component.scss

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
line-height: 1.5;
1212
}
1313

14-
.navbar ::ng-deep {
15-
a {
16-
color: var(--ds-header-icon-color);
14+
.navbar-toggler {
15+
border: none;
16+
color: var(--ds-header-icon-color);
1717

18-
&:hover, &:focus {
19-
color: var(--ds-header-icon-color-hover);
20-
}
18+
&:hover, &:focus {
19+
color: var(--ds-header-icon-color-hover);
2120
}
2221
}
2322

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { IdentifierDataService } from '../../core/data/identifier-data.service';
3838
import { IdentifierDataComponent } from '../../shared/object-list/identifier-data/identifier-data.component';
3939
import { ItemRegisterDoiComponent } from './item-register-doi/item-register-doi.component';
4040
import { DsoSharedModule } from '../../dso-shared/dso-shared.module';
41-
41+
import { ItemCurateComponent } from './item-curate/item-curate.component';
4242

4343
/**
4444
* Module that contains all components related to the Edit Item page administrator functionality
@@ -81,7 +81,8 @@ import { DsoSharedModule } from '../../dso-shared/dso-shared.module';
8181
VirtualMetadataComponent,
8282
ItemAuthorizationsComponent,
8383
IdentifierDataComponent,
84-
ItemRegisterDoiComponent
84+
ItemRegisterDoiComponent,
85+
ItemCurateComponent
8586
],
8687
providers: [
8788
BundleDataService,

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { ItemPageVersionHistoryGuard } from './item-page-version-history.guard';
4141
import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.guard';
4242
import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component';
4343
import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard';
44+
import { ItemCurateComponent } from './item-curate/item-curate.component';
4445

4546
/**
4647
* Routing module that handles the routing for the Edit Item page administrator functionality
@@ -82,6 +83,11 @@ import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard';
8283
data: { title: 'item.edit.tabs.metadata.title', showBreadcrumbs: true },
8384
canActivate: [ItemPageMetadataGuard]
8485
},
86+
{
87+
path: 'curate',
88+
component: ItemCurateComponent,
89+
data: { title: 'item.edit.tabs.curate.title', showBreadcrumbs: true }
90+
},
8591
{
8692
path: 'relationships',
8793
component: ItemRelationshipsComponent,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<div class="container mt-3">
2+
<h3>{{'item.edit.curate.title' |translate:{item: (itemName$ |async)} }}</h3>
3+
<ds-curation-form
4+
*ngIf="dsoRD$ | async as dsoRD"
5+
[dsoHandle]="dsoRD?.payload.handle"
6+
></ds-curation-form>
7+
</div>

0 commit comments

Comments
 (0)