diff --git a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetServiceImpl.java b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetServiceImpl.java index 7586f512f4..3ddf096eab 100644 --- a/shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetServiceImpl.java +++ b/shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetServiceImpl.java @@ -185,7 +185,7 @@ private Dataset updateDatasetValues(final Dataset datasetDb, final Dataset datas datasetDb.setId(dataset.getId()); datasetDb.setProcessings(dataset.getProcessings()); datasetDb.setSubjectId(dataset.getSubjectId()); - if (dataset.getOriginMetadata().getId().equals(dataset.getUpdatedMetadata().getId())) { + if (dataset.getUpdatedMetadata().getId().equals(dataset.getOriginMetadata().getId())) { // Force creation of a new dataset metadata dataset.getUpdatedMetadata().setId(null); } diff --git a/shanoir-ng-front/src/app/datasets/dataset/common/dataset.common.component.html b/shanoir-ng-front/src/app/datasets/dataset/common/dataset.common.component.html index 5fb3237b74..31ae8d0c78 100644 --- a/shanoir-ng-front/src/app/datasets/dataset/common/dataset.common.component.html +++ b/shanoir-ng-front/src/app/datasets/dataset/common/dataset.common.component.html @@ -52,21 +52,15 @@
  • - - + {{dataset.subject?.name}} - - - - -
  • - + {{dataset.study?.name}} @@ -83,14 +77,8 @@
  • - - + {{dataset.type}} - - - - -
  • @@ -128,7 +116,7 @@
  • - {{dataset.updatedMetadata.exploredEntity? dataset.updatedMetadata.exploredEntity : dataset.originMetadata.exploredEntity}} + {{ExploredEntity.getLabel(dataset.updatedMetadata.exploredEntity? dataset.updatedMetadata.exploredEntity : dataset.originMetadata.exploredEntity)}}
  • - + - {{dataset.updatedMetadata.cardinalityOfRelatedSubjects ? dataset.updatedMetadata.cardinalityOfRelatedSubjects : dataset.originMetadata.cardinalityOfRelatedSubjects}} + {{ CardinalityOfRelatedSubjects.getLabel(dataset.updatedMetadata.cardinalityOfRelatedSubjects ? dataset.updatedMetadata.cardinalityOfRelatedSubjects : dataset.originMetadata.cardinalityOfRelatedSubjects)}} - {{dataset.updatedMetadata.processedDatasetType? dataset.updatedMetadata.processedDatasetType : dataset.originMetadata.processedDatasetType}} + {{ ProcessedDatasetType.getLabel(dataset.updatedMetadata.processedDatasetType? dataset.updatedMetadata.processedDatasetType : dataset.originMetadata.processedDatasetType)}} []; datasetTypes: Option[]; processedDatasetTypeOptions: Option[]; + CardinalityOfRelatedSubjects = CardinalityOfRelatedSubjects; + ExploredEntity = ExploredEntity; + ProcessedDatasetType = ProcessedDatasetType; + constructor( private studyService: StudyService, diff --git a/shanoir-ng-front/src/app/datasets/dataset/dataset.component.ts b/shanoir-ng-front/src/app/datasets/dataset/dataset.component.ts index cac8a6a5a7..74e8342877 100644 --- a/shanoir-ng-front/src/app/datasets/dataset/dataset.component.ts +++ b/shanoir-ng-front/src/app/datasets/dataset/dataset.component.ts @@ -2,12 +2,12 @@ * Shanoir NG - Import, manage and share neuroimaging data * Copyright (C) 2009-2019 Inria - https://www.inria.fr/ * Contact us on https://project.inria.fr/shanoir/ - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html */ @@ -128,7 +128,7 @@ export class DatasetComponent extends EntityComponent { convertNiftiToggle() { this.toggleMenu(); } - + convertNifti(id: number) { this.downloadState.status = TaskStatus.IN_PROGRESS; this.datasetService.download(this.dataset, 'nii', id).then(() => this.downloadState.status = TaskStatus.IN_PROGRESS); @@ -187,4 +187,8 @@ export class DatasetComponent extends EntityComponent { seeDicomMetadata() { this.router.navigate(['/dataset/details/dicom/' + this.dataset.id]); } -} \ No newline at end of file + + goToList(): void { + this.router.navigate(['/solr-search']); + } +}