Skip to content
Snippets Groups Projects

Feature/mapping from iso19115

Merged Baptiste Toulemonde requested to merge feature/mapping_from_iso19115 into master
Files
3
<ng-container *ngIf="type !== 'ISO 19115'; else xml">
<form #form="ngForm">
<nb-card>
<nb-card-body>
<nb-select placeholder="Select ontology" [(ngModel)]="ontology" (ngModelChange)="selectOntology()"
name="ontology">
<nb-option value="dcat">Dcat</nb-option>
<nb-option value="geodcat">GeoDcat</nb-option>
</nb-select>
</nb-card-body>
</nb-card>
<form #form="ngForm" *ngIf="ontology">
<div class="card-row">
<div class="card-col">
<nb-card size="giant">
@@ -16,21 +26,17 @@
</div>
<ng-container
*ngFor="let dataset of obsDcatVocabulary | async; let index = index ;trackBy:trackByIndex ;">
*ngFor="let dataset of dcatVocabulary ; let index = index">
<nb-form-field>
<div class="row">
<div class="col-3" style="margin-right: 10px;">
<nb-form-field>
<input
*ngIf=" dataset.identifier !== 'dct:hasVersion' && dataset.identifier !== 'dct:title'"
nbInput fullWidth type="text" value="{{dataset.identifier}} "
disabled />
<input
*ngIf=" dataset.identifier === 'dct:hasVersion' || dataset.identifier === 'dct:title' "
nbInput fullWidth type="text" value="{{dataset.identifier}} *"
disabled />
<input *ngIf=" dataset.identifier !== 'dct:title'" nbInput fullWidth
type="text" value="{{dataset.identifier}} " disabled />
<input *ngIf=" dataset.identifier === 'dct:title' " nbInput fullWidth
type="text" value="{{dataset.identifier}} *" disabled />
<button nbSuffix nbTooltip="{{dataset.name}}: {{dataset.usageNote}}"
nbTooltipStatus="info" nbButton status="basic" ghost>
<nb-icon [icon]=" 'question-mark-circle-outline' " pack="eva">
@@ -43,22 +49,22 @@
<nb-form-field>
<input
*ngIf="dataset.identifier === 'dct:hasVersion' || dataset.identifier === 'dct:title' "
required #autoInput #{{dataset.identifier}}="ngModel" fullWidth
id="{{dataset.identifier}}" name="{{dataset.identifier}}" nbInput
*ngIf=" dataset.identifier === 'dct:title' "
required fullWidth
name=" {{index}}" nbInput
(ngModelChange)="onModelChange($event)" [nbAutocomplete]="auto"
[(ngModel)]="selectedPaths[index]" autocomplete="false"
(focus)="reset()" />
[(ngModel)]="selectedPaths[index]"
(focus)="reset()" placeholder="{{index}}" />
<div
*ngIf="dataset.identifier.invalid && (dataset.identifier.dirty || dataset.identifier.touched)">
champ obligatoire</div>
<input
*ngIf=" dataset.identifier !== 'dct:hasVersion' && dataset.identifier !== 'dct:title'"
#autoInput #{{dataset.identifier}}="ngModel" fullWidth
id="{{dataset.identifier}}" name="{{dataset.identifier}}" nbInput
*ngIf=" dataset.identifier !== 'dct:title'"
fullWidth
name=" {{index}}" nbInput
(ngModelChange)="onModelChange($event)" [nbAutocomplete]="auto"
[(ngModel)]="selectedPaths[index]" autocomplete="false"
(focus)="reset()" />
[(ngModel)]="selectedPaths[index]"
(focus)="reset()" placeholder="{{index}}" />
<nb-autocomplete #auto>
@@ -184,12 +190,13 @@
</nb-card>
</div>
</div>
</ng-container>
<ng-template #xml>
<nb-card>
<nb-card-body>
</nb-card-body>
<nb-card-footer>
<div class="row">
@@ -197,24 +204,25 @@
</div>
</nb-card-footer>
</nb-card>
<nb-card size="giant" >
<nb-card-body [nbSpinner]="loading">
<nb-card size="giant">
<nb-card-body [nbSpinner]="loading">
<pre>{{itemsdataset[index] }} </pre>
</nb-card-body>
<nb-card-footer>
<div class="row">
<div >
<button nbButton (click)=" prev()" [disabled]="index == 0" [disabled]=" index == 0 && index <= itemsdataset.length -1 " >prev</button>
<div>
<button nbButton (click)=" prev()" [disabled]="index == 0"
[disabled]=" index == 0 && index <= itemsdataset.length -1 ">prev</button>
</div>
<div >
<button nbButton (click)=" next()"
[disabled]="index == mappedMetadatas.length -1" [disabled]="index == itemsdataset.length -1 " >next</button>
<div>
<button nbButton (click)=" next()" [disabled]="index == mappedMetadatas.length -1"
[disabled]="index == itemsdataset.length -1 ">next</button>
</div>
</div>
<div class="row">
<div class="button-center" >
<div class="button-center">
<button nbButton status="primary" (click)=" publishDatasetFromGeodcatApi()" [nbSpinner]="loading"
nbSpinnerStatus="basic">Publish</button>
</div>
@@ -222,5 +230,5 @@
</nb-card-footer>
</nb-card>
</ng-template>
\ No newline at end of file
Loading