Skip to content

Commit 643e97d

Browse files
committed
Merge branch 'gdpr-metrics_2023_02_x_DSC-1413' into metrics_text_2023_02_x_DSC_1522
2 parents 5bd3bf4 + 1e34198 commit 643e97d

16 files changed

Lines changed: 72 additions & 40 deletions

File tree

src/app/core/core.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ import {
237237
} from './metadata/schema-json-ld/schema-types/product/product-creative-work-schema-type';
238238
import { ProductDatasetSchemaType } from './metadata/schema-json-ld/schema-types/product/product-dataset-schema-type';
239239
import { PersonSchemaType } from './metadata/schema-json-ld/schema-types/Person/person-schema-type';
240+
import { InternalLinkService } from './services/internal-link.service';
240241

241242
/**
242243
* When not in production, endpoint responses can be mocked for testing purposes
@@ -270,6 +271,7 @@ const PROVIDERS = [
270271
{ provide: DspaceRestService, useFactory: restServiceFactory, deps: [MOCK_RESPONSE_MAP, HttpClient] },
271272
EPersonDataService,
272273
LinkHeadService,
274+
InternalLinkService,
273275
HALEndpointService,
274276
HostWindowService,
275277
ItemDataService,

src/app/core/data/processes/process-data.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ export class ProcessDataService extends IdentifiableDataService<Process> impleme
6868
/**
6969
* Get a process' output files
7070
* @param processId The ID of the process
71+
* @param useCacheVersionIfAvailable If value needs to be red from cache or not
7172
*/
72-
getFiles(processId: string): Observable<RemoteData<PaginatedList<Bitstream>>> {
73+
getFiles(processId: string, useCacheVersionIfAvailable = true): Observable<RemoteData<PaginatedList<Bitstream>>> {
7374
const href$ = this.getFilesEndpoint(processId);
74-
return this.bitstreamDataService.findListByHref(href$);
75+
return this.bitstreamDataService.findListByHref(href$, {}, useCacheVersionIfAvailable);
7576
}
7677

7778
/**

src/app/core/eperson/group-data.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { Operation } from 'fast-json-patch';
4141
import { RestRequestMethod } from '../data/rest-request-method';
4242
import { dataService } from '../data/base/data-service.decorator';
4343
import { getGroupEditRoute } from '../../access-control/access-control-routing-paths';
44+
import { isNotEmpty } from '../../shared/empty.util';
4445

4546
const groupRegistryStateSelector = (state: AppState) => state.groupRegistry;
4647
const editGroupSelector = createSelector(groupRegistryStateSelector, (groupRegistryState: GroupRegistryState) => groupRegistryState.editGroup);
@@ -56,7 +57,7 @@ export class GroupDataService extends IdentifiableDataService<Group> implements
5657
public subgroupsEndpoint = 'subgroups';
5758

5859
private createData: CreateData<Group>;
59-
private searchData: SearchData<Group>;
60+
private searchData: SearchDataImpl<Group>;
6061
private patchData: PatchData<Group>;
6162
private deleteData: DeleteData<Group>;
6263

@@ -91,9 +92,9 @@ export class GroupDataService extends IdentifiableDataService<Group> implements
9192
const options = new FindListOptions();
9293
options.searchParams = [new RequestParam('groupName', groupName)];
9394

94-
return this.searchBy(searchHref, options).pipe(
95+
return this.findByHref(this.searchData.getSearchByHref(searchHref, options)).pipe(
9596
getRemoteDataPayload(),
96-
map((groups: PaginatedList<Group>) => groups.totalElements > 0),
97+
map((group: Group) => isNotEmpty(group)),
9798
catchError(() => observableOf(false)),
9899
);
99100
}

src/app/item-page/full/field-components/file-section/full-file-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h5 class="simple-view-element-header">{{"item.page.filesection.original.bundle"
3333
</ng-container>
3434
</dl>
3535
</div>
36-
<div class="col-2">
36+
<div *ngIf="!hasNoDownload(file)" class="col-2">
3737
<ds-themed-file-download-link [bitstream]="file" [item]="item">
3838
{{"item.page.filesection.download" | translate}}
3939
</ds-themed-file-download-link>

src/app/item-page/full/field-components/file-section/full-file-section.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
108108
return hasValue(bundle) && !isEmpty(bundle.page);
109109
}
110110

111+
hasNoDownload(bitstream: Bitstream) {
112+
return bitstream?.allMetadataValues('bitstream.viewer.provider').includes('nodownload');
113+
}
114+
111115
ngOnDestroy(): void {
112116
this.paginationService.clearPagination(this.originalOptions.id);
113117
this.paginationService.clearPagination(this.licenseOptions.id);

src/app/process-page/detail/process-detail.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class ProcessDetailComponent implements OnInit, OnDestroy {
146146

147147
this.filesRD$ = this.processRD$.pipe(
148148
getFirstSucceededRemoteDataPayload(),
149-
switchMap((process: Process) => this.processService.getFiles(process.processId))
149+
switchMap((process: Process) => this.processService.getFiles(process.processId, false)),
150150
);
151151
}
152152

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div *ngIf="logo" class="dso-logo mb-3">
2-
<img [src]="logo._links.content.href" class="img-fluid" [attr.alt]="alternateText ? alternateText : null" (error)="errorHandler($event)"/>
2+
<img [src]="logo._links.content.href" class="w-100 img-fluid" [attr.alt]="alternateText ? alternateText : null" (error)="errorHandler($event)"/>
33
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
img {
2+
max-width: var(--ds-comcol-logo-max-width);
3+
max-height: var(--ds-comcol-logo-max-height);
4+
}

src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { FeatureID } from '../../../../core/data/feature-authorization/feature-i
3030
templateUrl: '../dso-selector-modal-wrapper.component.html',
3131
})
3232
export class ExportBatchSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit {
33-
configuration = 'backend';
33+
configuration = 'communityOrCollection';
3434
objectType = DSpaceObjectType.DSPACEOBJECT;
3535
selectorTypes = [DSpaceObjectType.COLLECTION];
3636
action = SelectorActionType.EXPORT_BATCH;

src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Observable, of } from 'rxjs';
1616
templateUrl: '../dso-selector-modal-wrapper.component.html',
1717
})
1818
export class ImportBatchSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit {
19-
configuration = 'backend';
19+
configuration = 'communityOrCollection';
2020
objectType = DSpaceObjectType.DSPACEOBJECT;
2121
selectorTypes = [DSpaceObjectType.COLLECTION];
2222
action = SelectorActionType.IMPORT_BATCH;

0 commit comments

Comments
 (0)