merged branch cris-registration (r62082:HEAD)
This commit is contained in:
parent
3c74f2a381
commit
c6ec50f0b0
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
|
@ -14,14 +14,14 @@
|
|||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "12.1.2",
|
||||
"@angular/common": "12.1.2",
|
||||
"@angular/compiler": "12.1.2",
|
||||
"@angular/core": "12.1.2",
|
||||
"@angular/forms": "12.1.2",
|
||||
"@angular/platform-browser": "12.1.2",
|
||||
"@angular/platform-browser-dynamic": "^12.1.2",
|
||||
"@angular/router": "12.1.2",
|
||||
"@angular/animations": "12.2.16",
|
||||
"@angular/common": "12.2.16",
|
||||
"@angular/compiler": "12.2.16",
|
||||
"@angular/core": "12.2.16",
|
||||
"@angular/forms": "12.2.16",
|
||||
"@angular/platform-browser": "12.2.16",
|
||||
"@angular/platform-browser-dynamic": "^12.2.16",
|
||||
"@angular/router": "12.2.16",
|
||||
"altair": "^1.0.0",
|
||||
"bootstrap": "^4.1.3",
|
||||
"core-js": "^2.5.4",
|
||||
|
@ -37,10 +37,10 @@
|
|||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.1.2",
|
||||
"@angular/cli": "~12.1.2",
|
||||
"@angular/compiler-cli": "^12.1.2",
|
||||
"@angular/language-service": "^12.1.2",
|
||||
"@angular-devkit/build-angular": "~12.2.17",
|
||||
"@angular/cli": "~12.2.17",
|
||||
"@angular/compiler-cli": "^12.2.16",
|
||||
"@angular/language-service": "^12.2.16",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^12.11.1",
|
||||
|
|
|
@ -65,7 +65,7 @@ export class AppComponent implements OnInit {
|
|||
console.log(error);
|
||||
},
|
||||
() => {
|
||||
console.log(this.reposOfUser);
|
||||
// console.log(this.reposOfUser);
|
||||
this.reposOfUser.forEach(repo => {
|
||||
if (!repo.consentTermsOfUse || !repo.fullTextDownload) {
|
||||
this.addTerm(repo.officialname, repo.id, repo.consentTermsOfUse);
|
||||
|
|
|
@ -26,7 +26,7 @@ export const interfaceFormDesc = {
|
|||
/* Desription of the Datasource Info Forms Fields */
|
||||
export const softwarePlatformDesc = {
|
||||
desc: 'The typology used by your repository/journal.\nIf you use a typology not found in the drop-down list,\nyou can enter a custom name in the field below.',
|
||||
label: 'Software Platform (*)',
|
||||
label: 'Software Platform',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
@ -40,14 +40,14 @@ export const platformNameDesc = {
|
|||
|
||||
export const officialNameDesc = {
|
||||
desc: 'Your repository\'s/journal\'s official name.',
|
||||
label: 'Official Name (*)',
|
||||
label: 'Official Name',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const issnDesc = {
|
||||
desc: 'Input your journal\'s issn (www.issn.org)',
|
||||
label: 'ISSN (*)',
|
||||
label: 'ISSN',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
@ -68,49 +68,49 @@ export const lissnDesc = {
|
|||
|
||||
export const repoDescriptionDesc = {
|
||||
desc: 'A description of your repository/journal',
|
||||
label: 'Description (*)',
|
||||
label: 'Description',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const countryDesc = {
|
||||
desc: 'The country where your repository/journal is located',
|
||||
label: 'Country (*)',
|
||||
label: 'Country',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const longtitudeDesc = {
|
||||
desc: 'The (approximate) longtitude of your repository/journal\'s location',
|
||||
label: 'Longtitude (*)',
|
||||
label: 'Longtitude',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const latitudeDesc = {
|
||||
desc: 'The (approximate) latitude of your repository/journal\'s location',
|
||||
label: 'Latitude (*)',
|
||||
label: 'Latitude',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const websiteUrlDesc = {
|
||||
desc: 'The main page of your repository/journal\'s website',
|
||||
label: 'Entry URL (*)',
|
||||
label: 'Entry URL',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const institutionNameDesc = {
|
||||
desc: 'The institution that your repository belongs to',
|
||||
label: 'Institution (*)',
|
||||
label: 'Institution',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const englishNameDesc = {
|
||||
desc: 'Your repository/journal\'s name in english',
|
||||
label: 'English Name (*)',
|
||||
label: 'English Name',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
@ -124,35 +124,35 @@ export const logoUrlDesc = {
|
|||
|
||||
export const timezoneDesc = {
|
||||
desc: 'The timezone of the area where your repository/ journal is located',
|
||||
label: 'Timezone (*)',
|
||||
label: 'Timezone',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const datasourceTypeDesc = {
|
||||
desc: 'The type of your repository',
|
||||
label: 'Repository Type (*)',
|
||||
label: 'Repository Type',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const journalTypeDesc = {
|
||||
desc: 'The type of your journal',
|
||||
label: 'Journal Type (*)',
|
||||
label: 'Journal Type',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const aggregatorTypeDesc = {
|
||||
desc: 'The type of your aggregator',
|
||||
label: 'Aggregator Type (*)',
|
||||
label: 'Aggregator Type',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
||||
export const adminEmailDesc = {
|
||||
desc: 'The email address of the repository/journal\'s administrator',
|
||||
label: 'Admin Email (*)',
|
||||
label: 'Admin Email',
|
||||
mandatory: true,
|
||||
recommended: false
|
||||
};
|
||||
|
|
|
@ -57,8 +57,7 @@
|
|||
<div *ngFor="let inter of dataForInterfaceComp" class="uk-width-1-2@m uk-margin-bottom">
|
||||
<div>
|
||||
<div class="md-card" style="height: 100%">
|
||||
<app-repository-interface-form #interfacesArray
|
||||
[data]="inter"
|
||||
<app-repository-interface-form #interfacesArray [data]="inter"
|
||||
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
||||
</app-repository-interface-form>
|
||||
</div>
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
<h3>Literature repository</h3>
|
||||
<!--<a [routerLink]="['literature']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>-->
|
||||
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('literature')" style="cursor: pointer">
|
||||
<p class="uk-margin-remove">Make sure your repository is already registered in OpenDOAR, the authoritative
|
||||
directory of institutional and thematic OA repositories, and is compatible with the OpenAIRE Guidelines for Literature Repositories.</p>
|
||||
<p class="uk-margin-remove">Make sure your repository is already registered in OpenDOAR, the
|
||||
authoritative directory of institutional and thematic OA repositories, and is compatible with the
|
||||
OpenAIRE Guidelines for Literature Repositories.</p>
|
||||
<a href="http://v2.sherpa.ac.uk/opendoar/" target="_blank">
|
||||
List provided by
|
||||
<br>
|
||||
OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
|
||||
List provided by<br>
|
||||
OpenDOAR<i class="fas fa-external-link-alt" style="margin-left: 3px !important;"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
@ -108,6 +108,22 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
|
||||
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
|
||||
<a [routerLink]="['cris']" [queryParams]="{ step: 'selectDatasource' }" class="el-link uk-position-cover uk-margin-remove-adjacent"></a>
|
||||
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
|
||||
<div class="">
|
||||
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Cris.svg" alt="" width="50">
|
||||
</div>
|
||||
<h3>CRIS systems</h3>
|
||||
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary" (click)="goTo('cris')" style="cursor: pointer">
|
||||
<p class="uk-margin-remove">Stay tuned.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr style="border-top: 1px solid #dedede; margin-top: 40px; margin-bottom: 30px;">
|
||||
|
@ -117,23 +133,6 @@
|
|||
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
|
||||
|
||||
<div class="uk-row-first">
|
||||
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
|
||||
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
|
||||
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
|
||||
<div class="md-card-content large-padding uk-margin-medium-top uk-margin-bottom">
|
||||
<div class="">
|
||||
<img class="el-image" src="../../../assets/imgs/datasourcetypes/Cris.svg" alt="" width="50">
|
||||
</div>
|
||||
<h3>CRIS systems</h3>
|
||||
<div class="uk-transition-slide-bottom uk-position-bottom uk-overlay uk-overlay-primary">
|
||||
<p class="uk-margin-remove">Stay tuned.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="whiteFilm"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
|
||||
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
|
||||
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
|
||||
|
@ -167,11 +166,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
|
||||
|
||||
<div class="uk-row-first">
|
||||
<div class="">
|
||||
<div class="uk-text-center md-card md-card-default md-card-hover uk-scrollspy-inview uk-animation-slide-top-medium
|
||||
datasourceTypeCard uk-inline-clip uk-transition-toggle" uk-scrollspy-class="" tabindex="0">
|
||||
<a class="el-link uk-position-cover uk-margin-remove-adjacent uk-disabled"></a>
|
||||
|
@ -190,6 +185,12 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="uk-margin uk-grid uk-grid-match uk-grid-medium repositoryTypeSelection uk-child-width-1-3@l uk-child-widht-1-3@m" uk-grid="">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- RIGHT HELP CONTENT -->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from "@angular/router";
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-sources-register',
|
||||
|
@ -8,27 +8,28 @@ import { Router } from "@angular/router";
|
|||
|
||||
export class SourcesRegisterComponent implements OnInit {
|
||||
|
||||
constructor(private router: Router) {
|
||||
}
|
||||
constructor(private router: Router) {}
|
||||
|
||||
ngOnInit() {
|
||||
let body = document.getElementsByTagName('body')[0];
|
||||
body.classList.remove("top_bar_active"); //remove the class
|
||||
body.classList.remove("page_heading_active");
|
||||
body.classList.remove("landing");
|
||||
body.classList.add("dashboard");
|
||||
const body = document.getElementsByTagName('body')[0];
|
||||
body.classList.remove('top_bar_active'); // remove the class
|
||||
body.classList.remove('page_heading_active');
|
||||
body.classList.remove('landing');
|
||||
body.classList.add('dashboard');
|
||||
}
|
||||
|
||||
// fixme still when I click the link inside the text in overlay, this event happens as well (I go to the first step of the wizard)
|
||||
goTo(datasourceType: string) {
|
||||
if(datasourceType==='literature') {
|
||||
if (datasourceType === 'literature') {
|
||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
||||
} else if(datasourceType==='data') {
|
||||
} else if (datasourceType === 'data') {
|
||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
||||
} else if(datasourceType==='journal') {
|
||||
} else if (datasourceType === 'journal') {
|
||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
||||
} else if(datasourceType==='aggregator') {
|
||||
} else if (datasourceType === 'aggregator') {
|
||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=basicInformation`);
|
||||
} else if (datasourceType === 'cris') {
|
||||
this.router.navigateByUrl(`/sources/register/${datasourceType}?step=selectDatasource`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
</a>
|
||||
. <br>
|
||||
<span *ngIf="latestUpdate && (latestUpdate !== 'null')">
|
||||
<b>Last Updated: </b>{{ latestUpdate }}
|
||||
</span>
|
||||
<b>Last Updated: </b>{{ latestUpdate }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-margin-medium-top">
|
||||
<div class="md-input-wrapper md-input-filled">
|
||||
|
|
|
@ -51,39 +51,41 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
|
|||
} else if (this.mode === 're3data') {
|
||||
this.sourceUrl = 'https://www.re3data.org/';
|
||||
this.sourceTitle = 'Re3data';
|
||||
} else if (this.mode === 'cris') {
|
||||
this.sourceUrl = 'https://eurocris.org';
|
||||
this.sourceTitle = 'euroCris';
|
||||
}
|
||||
this.getLatestUpdate();
|
||||
}
|
||||
|
||||
getCountries() {
|
||||
this.repoService.getCountries()
|
||||
.subscribe(
|
||||
countries => {
|
||||
// TODO: check again getCountries null return values
|
||||
/*/!* check for null values *!/
|
||||
let nullVals = countries.filter(el => el.name === null);
|
||||
/!* remove null values from array *!/
|
||||
for (let nullVal of nullVals) {
|
||||
let i = countries.findIndex(el => el === nullVal);
|
||||
/!* remove null value from array *!/
|
||||
if (i !== -1) { countries.splice(i, 1); }
|
||||
}*/
|
||||
this.repoService.getCountries().subscribe(
|
||||
countries => {
|
||||
// TODO: check again getCountries null return values
|
||||
/*/!* check for null values *!/
|
||||
let nullVals = countries.filter(el => el.name === null);
|
||||
/!* remove null values from array *!/
|
||||
for (let nullVal of nullVals) {
|
||||
let i = countries.findIndex(el => el === nullVal);
|
||||
/!* remove null value from array *!/
|
||||
if (i !== -1) { countries.splice(i, 1); }
|
||||
}*/
|
||||
|
||||
/* sort countries array */
|
||||
this.countries = countries.sort( function(a, b) {
|
||||
if (a.name < b.name) {
|
||||
return -1;
|
||||
} else if (a.name > b.name) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} );
|
||||
},
|
||||
error => {
|
||||
this.alertMessage = noServiceMessage;
|
||||
console.log(error);
|
||||
});
|
||||
/* sort countries array */
|
||||
this.countries = countries.sort( function(a, b) {
|
||||
if (a.name < b.name) {
|
||||
return -1;
|
||||
} else if (a.name > b.name) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} );
|
||||
},
|
||||
error => {
|
||||
this.alertMessage = noServiceMessage;
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
getReposInCountry(i: number) {
|
||||
|
|
|
@ -74,7 +74,8 @@
|
|||
#datasourcesByCountry
|
||||
[mode]="currentMode"
|
||||
(emitRepoId)="getRepoId($event)"
|
||||
(promptNext)="goToStep2($event)"></app-select-existing-datasource>
|
||||
(promptNext)="goToStep2($event)">
|
||||
</app-select-existing-datasource>
|
||||
</section>
|
||||
|
||||
<!-- second section -->
|
||||
|
@ -83,9 +84,9 @@
|
|||
class="body step-1 {{ (currentStep == 1) ? 'current' : '' }}" data-step="1" aria-hidden="true">
|
||||
|
||||
<datasource-update-form *ngIf="(currentStep === 1) && (repo !== null) && !loadingMessage"
|
||||
#registerDatasource
|
||||
[selectedRepo]="repo"
|
||||
(emittedInfo)="getUpdatedRepo($event)"></datasource-update-form>
|
||||
#registerDatasource [selectedRepo]="repo" [mode]="currentMode"
|
||||
(emittedInfo)="getUpdatedRepo($event)">
|
||||
</datasource-update-form>
|
||||
</section>
|
||||
|
||||
<!-- third section -->
|
||||
|
@ -99,7 +100,7 @@
|
|||
<div>
|
||||
<div class="md-card" style="height: 100%">
|
||||
<app-repository-interface-form #interfacesArray
|
||||
[data]="inter"
|
||||
[data]="inter" [mode]="currentMode"
|
||||
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
||||
</app-repository-interface-form>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
} from '../../../domain/shared-messages';
|
||||
import { DatasourceUpdateFormComponent } from '../../../shared/reusablecomponents/sources-forms/datasource-update-form.component';
|
||||
import { RegisterDatasourceSelectExistingComponent } from './register-datasource-select-existing.component';
|
||||
import {DatasourceUpdateTermsFormComponent} from "../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component";
|
||||
import {DatasourceUpdateTermsFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-register-existing-datasource',
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<div>
|
||||
<div class="md-card" style="height: 100%">
|
||||
<app-repository-interface-form #interfacesArray
|
||||
[data]="inter"
|
||||
[data]="inter" [mode]=""
|
||||
(emitDeleteInterface)="removeInterfaceFromList($event)">
|
||||
</app-repository-interface-form>
|
||||
</div>
|
||||
|
|
|
@ -9,12 +9,13 @@ import { DatasourceNewInterfaceFormComponent } from '../../../shared/reusablecom
|
|||
import { from, of } from 'rxjs';
|
||||
import { concatMap } from 'rxjs/operators';
|
||||
import { errorsInInterfaces, formErrorRegisterRepo, noInterfacesSaved } from '../../../domain/shared-messages';
|
||||
import {DatasourceUpdateTermsFormComponent} from "../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component";
|
||||
import {DatasourceUpdateTermsFormComponent} from '../../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-register-new-datasource',
|
||||
templateUrl: './register-new-datasource.component.html'
|
||||
})
|
||||
|
||||
export class RegisterNewDatasourceComponent implements OnInit {
|
||||
loadingMessage: string;
|
||||
errorMessage: string;
|
||||
|
@ -205,7 +206,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
|
|||
);
|
||||
}
|
||||
|
||||
//recheck if needed
|
||||
// recheck if needed
|
||||
getTerms(repo: Repository) {
|
||||
console.log('this.repo', this.repo.consentTermsOfUse, this.repo.fullTextDownload);
|
||||
console.log('repo', repo.consentTermsOfUse, repo.fullTextDownload);
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* updated by myrto on 19/12/2018
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { RegisterExistingDatasourceComponent } from './register-existing-datasource.component';
|
||||
|
||||
@Component ({
|
||||
selector: 'app-sr-literature',
|
||||
templateUrl: './register-existing-datasource.component.html'
|
||||
})
|
||||
export class SrCrisComponent extends RegisterExistingDatasourceComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.datasourceType = 'cris';
|
||||
this.currentMode = 'cris';
|
||||
super.ngOnInit();
|
||||
}
|
||||
|
||||
}
|
|
@ -15,6 +15,7 @@ import { SrAggregatorComponent } from './sources-register/sr-aggregator.componen
|
|||
import { RegisterNewDatasourceComponent } from './sources-register/register-new-datasource.component';
|
||||
import { RegisterExistingDatasourceComponent } from './sources-register/register-existing-datasource.component';
|
||||
import { DatasourceUpdateTermsFormComponent } from '../../shared/reusablecomponents/sources-forms/datasource-update-terms-form.component';
|
||||
import {SrCrisComponent} from './sources-register/sr-cris.component';
|
||||
|
||||
@NgModule ({
|
||||
imports: [
|
||||
|
@ -37,6 +38,7 @@ import { DatasourceUpdateTermsFormComponent } from '../../shared/reusablecompone
|
|||
SrDataComponent,
|
||||
SrJournalComponent,
|
||||
SrAggregatorComponent,
|
||||
SrCrisComponent,
|
||||
RegisterDatasourceSelectExistingComponent,
|
||||
DatasourceUpdateTermsFormComponent,
|
||||
RepoFilter // a pipe that searches for string in repository name
|
||||
|
|
|
@ -5,6 +5,7 @@ import { SrLiteratureComponent } from './sources-register/sr-literature.componen
|
|||
import { SrDataComponent } from './sources-register/sr-data.component';
|
||||
import { SrJournalComponent } from './sources-register/sr-journal.component';
|
||||
import { SrAggregatorComponent } from './sources-register/sr-aggregator.component';
|
||||
import {SrCrisComponent} from './sources-register/sr-cris.component';
|
||||
|
||||
const sourcesRoutes: Routes = [
|
||||
{
|
||||
|
@ -33,30 +34,14 @@ const sourcesRoutes: Routes = [
|
|||
{
|
||||
path: 'aggregator',
|
||||
component: SrAggregatorComponent
|
||||
},
|
||||
{
|
||||
path: 'cris',
|
||||
component: SrCrisComponent
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
// path: '',
|
||||
// component: SourcesRegisterComponent,
|
||||
// children: [
|
||||
// {
|
||||
// path: 'literature',
|
||||
// component: SrLiteratureComponent
|
||||
// },
|
||||
// {
|
||||
// path: 'data',
|
||||
// component: SrDataComponent
|
||||
// },
|
||||
// {
|
||||
// path: 'journal',
|
||||
// component: SrJournalComponent
|
||||
// },
|
||||
// {
|
||||
// path: 'aggregator',
|
||||
// component: SrAggregatorComponent
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -122,14 +122,14 @@ export class MyGroup implements OnInit, AfterContentInit {
|
|||
<div class="">
|
||||
<label class="" *ngIf="description?.label !== null && description?.label !== ''"
|
||||
[ngClass]="{'required' : description.mandatory==true}" title="{{ description.desc }}">
|
||||
{{ description.label }}
|
||||
{{ description.label + (description.mandatory ? ' (*)' : '') }}
|
||||
</label>
|
||||
<ng-content></ng-content>
|
||||
<span class="md-input-bar"></span>
|
||||
</div>
|
||||
`
|
||||
|
||||
})
|
||||
|
||||
export class InlineFormWrapper implements OnChanges {
|
||||
|
||||
@Input() public description: Description = null;
|
||||
|
|
|
@ -26,6 +26,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
|||
invalidCustomBaseUrl = invalidCustomBaseUrl;
|
||||
|
||||
@Input() data: any[] = []; // expects an array containing at least 3 of the 4 below fields in this order
|
||||
@Input() mode: string = null;
|
||||
inRegister: boolean;
|
||||
interfaceID: number; // holds the interface index in the interfaces array as displayed
|
||||
currentRepo: RepoFields; // a fraction of the Repository class
|
||||
|
@ -125,7 +126,11 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
|
|||
}
|
||||
|
||||
getCompatibilityClasses() {
|
||||
this.repoService.getCompatibilityClasses(this.currentRepo.datasourceType).subscribe(
|
||||
// FIXME: Use eoscDatasourceType when we support the new model
|
||||
if (this.mode === null) {
|
||||
this.mode = this.currentRepo.datasourceType;
|
||||
}
|
||||
this.repoService.getCompatibilityClasses(this.mode).subscribe(
|
||||
classes => {
|
||||
this.compClasses = classes;
|
||||
this.classCodes = Object.keys(this.compClasses);
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Description, softwarePlatformDesc, platformNameDesc, officialNameDesc,
|
|||
longtitudeDesc, latitudeDesc, websiteUrlDesc, institutionNameDesc, englishNameDesc, logoUrlDesc, timezoneDesc,
|
||||
datasourceTypeDesc, adminEmailDesc, lissnDesc, eissnDesc, issnDesc } from '../../../domain/oa-description';
|
||||
import { AuthenticationService } from '../../../services/authentication.service';
|
||||
import {SharedService} from "../../../services/shared.service";
|
||||
import {SharedService} from '../../../services/shared.service';
|
||||
|
||||
@Component ({
|
||||
selector: 'datasource-update-form',
|
||||
|
@ -32,6 +32,8 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
|||
|
||||
@Input() selectedRepo: Repository;
|
||||
|
||||
@Input() mode: string;
|
||||
|
||||
@Input() showButton: boolean;
|
||||
|
||||
repoId: string;
|
||||
|
@ -99,7 +101,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
|||
|
||||
setupUpdateForm() {
|
||||
if (this.selectedRepo) {
|
||||
console.log(`my datasource type is: ${this.selectedRepo.datasourceType}`);
|
||||
console.log(`mode is: ${this.mode}`);
|
||||
|
||||
this.updateGroup.setValue({
|
||||
softwarePlatform: this.selectedRepo.typology,
|
||||
|
@ -126,19 +128,22 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
|||
this.updateGroup.get('platformName').setValue(this.selectedRepo.typology);
|
||||
}
|
||||
|
||||
if ((this.selectedRepo.datasourceType === 'opendoar') ||
|
||||
(this.selectedRepo.datasourceType === 're3data')) {
|
||||
// FIXME: Use eoscDatasourceType when we support the new model
|
||||
if ((this.mode === 'opendoar') || (this.mode === 're3data')) {
|
||||
|
||||
// this.updateGroup.get('officialName').disable();
|
||||
this.updateGroup.get('country').disable();
|
||||
// this.updateGroup.get('longtitude').disable();
|
||||
// this.updateGroup.get('latitude').disable();
|
||||
// this.updateGroup.get('websiteUrl').disable();
|
||||
// this.updateGroup.get('institutionName').disable();
|
||||
|
||||
}
|
||||
|
||||
if (this.selectedRepo.datasourceType === 'journal') {
|
||||
// FIXME: Use eoscDatasourceType when we support the new model
|
||||
if (this.mode === 'cris') {
|
||||
|
||||
this.longtitudeDesc.mandatory = false;
|
||||
this.latitudeDesc.mandatory = false;
|
||||
this.datasourceTypeDesc.label = 'CRIS scope/type';
|
||||
}
|
||||
|
||||
// FIXME: Use eoscDatasourceType when we support the new model
|
||||
if (this.mode === 'journal') {
|
||||
|
||||
let ssnToShow = this.selectedRepo.issn.slice(0, 4) + '-' + this.selectedRepo.issn.toString().slice(4);
|
||||
this.updateGroup.get('issn').setValue(ssnToShow);
|
||||
|
@ -160,12 +165,12 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
|||
this.updateGroup.get('eissn').disable();
|
||||
this.updateGroup.get('lissn').disable();*/
|
||||
}
|
||||
/*this.getDatasourceClasses();*/
|
||||
}
|
||||
}
|
||||
|
||||
getDatasourceClasses() {
|
||||
this.repoService.getDatasourceClasses(this.selectedRepo.datasourceType).subscribe(
|
||||
// FIXME: Use eoscDatasourceType when we support the new model
|
||||
this.repoService.getDatasourceClasses(this.mode).subscribe(
|
||||
classes => this.datasourceClasses = classes,
|
||||
error => {
|
||||
this.loadingMessage = '';
|
||||
|
@ -266,7 +271,7 @@ export class DatasourceUpdateFormComponent implements OnInit {
|
|||
} else {
|
||||
this.successMessage = formSuccessUpdatedRepo;
|
||||
}
|
||||
//fixme is this the place to update the subject??
|
||||
// fixme is this the place to update the subject??
|
||||
this.sharedService.setRepository(this.selectedRepo);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue