added cris systems as datasource choice

This commit is contained in:
John Balasis 2022-04-11 14:19:22 +00:00
parent 2459cd0a03
commit fe6d196a91
8 changed files with 2704 additions and 19699 deletions

22258
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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",

View File

@ -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 -->

View File

@ -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`);
}
}
}

View File

@ -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',

View File

@ -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

View File

@ -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
// }
// ]
}
];

View File

@ -127,7 +127,8 @@ export class DatasourceUpdateFormComponent implements OnInit {
}
if ((this.selectedRepo.datasourceType === 'opendoar') ||
(this.selectedRepo.datasourceType === 're3data')) {
(this.selectedRepo.datasourceType === 're3data') ||
(this.selectedRepo.datasourceType === 'cris')) {
// this.updateGroup.get('officialName').disable();
this.updateGroup.get('country').disable();
@ -138,6 +139,11 @@ export class DatasourceUpdateFormComponent implements OnInit {
}
if (this.selectedRepo.datasourceType === 'cris') {
this.updateGroup.get('longtitude').disable();
this.updateGroup.get('latitude').disable();
}
if (this.selectedRepo.datasourceType === 'journal') {
let ssnToShow = this.selectedRepo.issn.slice(0, 4) + '-' + this.selectedRepo.issn.toString().slice(4);
@ -266,7 +272,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);
}
);