Deposit Results Page: back button added

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45404 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2017-01-16 14:53:51 +00:00
parent dc5fa6506e
commit 67e88eaa45
2 changed files with 22 additions and 9 deletions

View File

@ -38,7 +38,9 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
[placeHolderMessage] = "'Search for Organizations'" [title] = "'Organizations'" [multipleSelections]=false
(selectedValueChanged)="valueChanged($event)">
</entities-autocomplete>
<button class="uk-button" type="submit" (click)="organizationSelected(selectedId)" >Next</button>
<button class="uk-button" type="submit" (click)="organizationSelected(selectedId)" >
Next <i class="uk-icon-arrow-circle-right"></i>
</button>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
</form>
</div>
@ -47,14 +49,13 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
})
export class DepositComponent {
public keyword: string='';
@Input() keyword: string='';
public openAccess: string;
public openAccessRepo: string;
public fp7Guidlines: string;
public h2020Guidlines: string;
public ercGuidlines: string;
public helpdesk: string;
public organizations: {"name": string, "id": string}[] = [];
@Input() compatibility: string = '';
@Input() requestFor: string = "Publications";

View File

@ -1,7 +1,7 @@
import {Component, Input} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {OpenaireProperties, ErrorCodes} from '../utils/properties/openaireProperties';
import { Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router';
import { SearchDataprovidersComponent } from '../searchPages/simple/searchDataproviders.component';
import { SearchDataprovidersService } from '../services/searchDataproviders.service';
@ -25,8 +25,8 @@ import {OrganizationService} from '../services/organization.service';
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults > 0">
<h2 *ngIf="organization != undefined">
<span>Data providers for institution: </span>
<a *ngIf="organization['url']!=''" href="{{organization.url}}">
<span>{{organization['name']}}</span>
<a *ngIf="organization['url']!=''" href="{{organization.url}}" target="_blank">
<span>{{organization['name']}} ( <i class="uk-icon-external-link"></i> )</span>
</a>
<span *ngIf="organization['url']==''">{{organization['name']}}</span>
</h2>
@ -61,9 +61,13 @@ import {OrganizationService} from '../services/organization.service';
</div>
You can still deposit your {{requestFor}} in
<a href="{{zenodo}}">OpenAIRE's Zenodo catch-all repository </a>
<a href="{{zenodo}}" target="_blank">OpenAIRE's Zenodo catch-all repository ( <i class="uk-icon-external-link"></i> )</a>
hosted by CERN.
</div>
<button class="uk-button" type="submit" (click)="goToDeposit()">
<i class="uk-icon-arrow-circle-left"></i> Back
</button>
</div>
`
})
@ -84,7 +88,8 @@ export class DepositResultComponent {
@Input() compatibility: string = '';
@Input() requestFor: string = "Publications";
constructor (private route: ActivatedRoute,
constructor (private _router: Router,
private route: ActivatedRoute,
private _searchDataprovidersService: SearchDataprovidersService,
private _organizationService: OrganizationService) {
console.info("depositResult constructor");
@ -138,7 +143,6 @@ export class DepositResultComponent {
data => {
this.organization = data.title;
this.status = this.errorCodes.DONE;
console.info("done");
this.subDataproviders = this.route.queryParams.subscribe(params => {
this.searchDataproviders();
});
@ -156,4 +160,12 @@ export class DepositResultComponent {
}
);
}
goToDeposit() {
if(this.requestFor == "Publications") {
this._router.navigate( ['deposit-publications'] );
} else if(this.requestFor == "Research Data") {
this._router.navigate( ['deposit-datasets'] );
}
}
}