uk-margin-top added in landing and deposit pages | icon-chart added in statistics and metrics tab (landing pages) | deposit: if no organization selected show warning message

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

View File

@ -8,7 +8,7 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
@Component({ @Component({
selector: 'deposit', selector: 'deposit',
template: ` template: `
<div class="container"> <div class="container uk-margin-top">
<div class="page-header" > <div class="page-header" >
<h2>Deposit {{requestFor}}</h2> <h2>Deposit {{requestFor}}</h2>
</div> </div>
@ -19,26 +19,27 @@ import {SearchOrganizationsService} from '../services/searchOrganizations.servic
Are you a grant recipient from the following: H2020; FP7 with SC39; or ERC? Are you a grant recipient from the following: H2020; FP7 with SC39; or ERC?
</i> </i>
Then you are required to publish in Then you are required to publish in
<a href="{{openAccess}}">open access</a>. <a href="{{openAccess}}" target="_blank">open access ( <i class="uk-icon-external-link"></i> )</a>.
One way to do this is to deposit your {{requestFor}} into an One way to do this is to deposit your {{requestFor}} into an
<a href="{{openAccessRepo}}">open access repository</a>. <a href="{{openAccessRepo}}" target="_blank">open access repository ( <i class="uk-icon-external-link"></i> )</a>.
</p> </p>
<p> <p>
Click the following to find more information: Click the following to find more information:
<a href="{{fp7Guidlines}}">FP7 guidelines</a>, <a href="{{fp7Guidlines}}" target="_blank">FP7 guidelines ( <i class="uk-icon-external-link"></i> )</a>,
<a href="{{h2020Guidlines}}">H2020 guidelines</a>, <a href="{{h2020Guidlines}}" target="_blank">H2020 guidelines ( <i class="uk-icon-external-link"></i> )</a>,
<a href="{{ercGuidlines}}">ERC guidelines</a> OR <a href="{{ercGuidlines}}" target="_blank">ERC guidelines ( <i class="uk-icon-external-link"></i> )</a> OR
<a href="{{helpdesk}}">ask a question</a> to OpenAIREs national representative. <a href="{{helpdesk}}" target="_blank">ask a question ( <i class="uk-icon-external-link"></i> )</a> to OpenAIREs national representative.
</p> </p>
<h3>Locate data provider via your institution</h3> <h3>Locate data provider via your institution</h3>
<form class= "uk-form uk-form-row"> <form class= "uk-form uk-form-row">
<entities-autocomplete [entityType]="'organization'" [depositType]=compatibility [selectedValue]=selectedId [showSelected]=true <entities-autocomplete (click)="warningMessage = ''" [entityType]="'organization'" [depositType]=compatibility [selectedValue]=selectedId [showSelected]=true
[placeHolderMessage] = "'Search for Organizations'" [title] = "'Organizations'" [multipleSelections]=false [placeHolderMessage] = "'Search for Organizations'" [title] = "'Organizations'" [multipleSelections]=false
(selectedValueChanged)="valueChanged($event)" ></entities-autocomplete> (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</button>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
</form> </form>
</div> </div>
</div> </div>
@ -59,7 +60,8 @@ export class DepositComponent {
public status: number; public status: number;
public errorCodes:ErrorCodes = new ErrorCodes(); public errorCodes:ErrorCodes = new ErrorCodes();
public selectedId = ""; public selectedId: string = "";
private warningMessage: string = "";
constructor (private _router: Router, private _searchOrganizationsService: SearchOrganizationsService) { constructor (private _router: Router, private _searchOrganizationsService: SearchOrganizationsService) {
@ -74,13 +76,15 @@ export class DepositComponent {
organizationSelected(id: string) { organizationSelected(id: string) {
console.info("organization selected");
if(id && id.length > 0){ if(id && id.length > 0){
if(this.requestFor == "Publications") { if(this.requestFor == "Publications") {
this._router.navigate( ['deposit-publications-result'], { queryParams: { "organizationId": id } } ); this._router.navigate( ['deposit-publications-result'], { queryParams: { "organizationId": id } } );
} else if(this.requestFor == "Research Data") { } else if(this.requestFor == "Research Data") {
this._router.navigate( ['deposit-datasets-result'], { queryParams: { "organizationId": id } } ); this._router.navigate( ['deposit-datasets-result'], { queryParams: { "organizationId": id } } );
} }
} else {
this.warningMessage = "No organization selected";
} }
} }

View File

@ -12,7 +12,7 @@ import {OrganizationService} from '../services/organization.service';
@Component({ @Component({
selector: 'deposit-result', selector: 'deposit-result',
template: ` template: `
<div class="container"> <div class="container uk-margin-top">
<div class="page-header" > <div class="page-header" >
<h2>Deposit {{requestFor}}</h2> <h2>Deposit {{requestFor}}</h2>
</div> </div>

View File

@ -1,4 +1,4 @@
<div class="uk-container person"> <div class="uk-container uk-margin-top datasource">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>

View File

@ -17,6 +17,9 @@ import { SearchDataprovidersService } from '../../services/searchDataproviders.s
<li *ngIf="tabs.length>0" class="uk-active"> <li *ngIf="tabs.length>0" class="uk-active">
<a href="#{{tabs[0].content}}"> <a href="#{{tabs[0].content}}">
{{tabs[0].name}} {{tabs[0].name}}
<i *ngIf="tabs[0].content == 'metricsTab'" class="uk-icon-line-chart"></i>
<i *ngIf="tabs[0].content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
<span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='publicationsTab'"> <span class="uk-badge uk-badge-notification" *ngIf="tabs[0].content=='publicationsTab'">
{{searchPublicationsComponent.searchUtils.totalResults}} {{searchPublicationsComponent.searchUtils.totalResults}}
</span> </span>
@ -39,6 +42,9 @@ import { SearchDataprovidersService } from '../../services/searchDataproviders.s
<a *ngIf="i>0" <a *ngIf="i>0"
(click)="search(tab.content, 1, 10)" href="#{{tab.content}}"> (click)="search(tab.content, 1, 10)" href="#{{tab.content}}">
{{tab.name}} {{tab.name}}
<i *ngIf="tab.content == 'metricsTab'" class="uk-icon-line-chart"></i>
<i *ngIf="tab.content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='publicationsTab'"> <span class="uk-badge uk-badge-notification" *ngIf="tab.content=='publicationsTab'">
{{searchPublicationsComponent.searchUtils.totalResults}} {{searchPublicationsComponent.searchUtils.totalResults}}
</span> </span>

View File

@ -1,4 +1,4 @@
<div class="uk-container dataset"> <div class="uk-container uk-margin-top dataset">
<!--div class="container-header" --> <!--div class="container-header" -->
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>

View File

@ -1,4 +1,4 @@
<div class="uk-container organization"> <div class="uk-container uk-margin-top organization">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>

View File

@ -1,4 +1,4 @@
<div class="uk-container person"> <div class="uk-container uk-margin-top person">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>

View File

@ -1,4 +1,4 @@
<div class="uk-container person"> <div class="uk-container uk-margin-top project">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
@ -6,7 +6,7 @@
<div class="uk-width-7-10"> <div class="uk-width-7-10">
<!--h3 *ngIf="projectInfo.acronym != undefined && projectInfo.acronym != ''">{{projectInfo.acronym}}</h3> <!--h3 *ngIf="projectInfo.acronym != undefined && projectInfo.acronym != ''">{{projectInfo.acronym}}</h3>
<h3 *ngIf="projectInfo.acronym == undefined || projectInfo.acronym == ''">{{projectInfo.title}}</h3--> <h3 *ngIf="projectInfo.acronym == undefined || projectInfo.acronym == ''">{{projectInfo.title}}</h3-->
<h3>{{projectName}}</h3> <h2>{{projectName}}</h2>
<dl class="uk-description-list-horizontal custom-description-list-horizontal"> <dl class="uk-description-list-horizontal custom-description-list-horizontal">
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt> <dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
@ -75,11 +75,13 @@
<li (click)="statsClicked=true;"> <li (click)="statsClicked=true;">
<a href="#statisticsTab"> <a href="#statisticsTab">
Statistics Statistics
<i class="uk-icon-pie-chart"></i>
</a> </a>
</li> </li>
<li (click)="metricsClicked=true;"> <li (click)="metricsClicked=true;">
<a href="#metricsTab"> <a href="#metricsTab">
Metrics Metrics
<i class="uk-icon-line-chart"></i>
</a> </a>
</li> </li>
</ul> </ul>

View File

@ -1,4 +1,4 @@
<div class="uk-container publication"> <div class="uk-container uk-margin-top publication">
<!--div class="container-header" --> <!--div class="container-header" -->
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
@ -102,6 +102,7 @@
<li> <li>
<a href="#metricsTab" (click)="metricsClicked=true;"> <a href="#metricsTab" (click)="metricsClicked=true;">
Metrics Metrics
<i class="uk-icon-line-chart"></i>
</a> </a>
</li> </li>
</ul> </ul>
@ -242,6 +243,10 @@
<dl class="uk-description-list-line functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt >Share - Bookmark</dt> <dt >Share - Bookmark</dt>
<dd> <dd>
<!--div *ngIf="doi != undefined"
data-badge-popover="right" data-badge-type="donut"
data-doi="10.7717/peerj.1150" class="altmetric-embed">
</div-->
</dd> </dd>
</dl> </dl>
</li> </li>

View File

@ -58,6 +58,8 @@ export class PublicationComponent {
public bioentitiesNum: number = 0; public bioentitiesNum: number = 0;
private doi: string;
public result ; public result ;
/* @ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ; /* @ViewChild (InlineClaimProjectComponent) inlineClaimProject : InlineClaimProjectComponent ;
@ -89,6 +91,10 @@ export class PublicationComponent {
this.result = {id: this.articleId, type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''}; this.result = {id: this.articleId, type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''};
// this.result.push(result_); // this.result.push(result_);
if(this.publicationInfo.identifiers != undefined && this.publicationInfo.identifiers.has('doi')) {
this.doi = this.publicationInfo.identifiers.get('doi')[0];
}
}, },
err => { err => {
console.log(err); console.log(err);

View File

@ -72,9 +72,7 @@ export class DataProviderService {
if(this.dataProviderInfo.tabsInTypes.datasetsTab.has(data[1].classid)) { if(this.dataProviderInfo.tabsInTypes.datasetsTab.has(data[1].classid)) {
this.dataProviderInfo.tabs.push({"name": "Datasets", "content": "datasetsTab"}); this.dataProviderInfo.tabs.push({"name": "Datasets", "content": "datasetsTab"});
} }
if(this.dataProviderInfo.tabsInTypes.statisticsTab.has(data[1].classid)) {
this.dataProviderInfo.tabs.push({"name": "Statistics", "content": "statisticsTab"});
}
if(this.dataProviderInfo.tabsInTypes.projectsTab.has(data[1].classid)) { if(this.dataProviderInfo.tabsInTypes.projectsTab.has(data[1].classid)) {
this.dataProviderInfo.tabs.push({"name": "Projects", "content": "projectsTab"}); this.dataProviderInfo.tabs.push({"name": "Projects", "content": "projectsTab"});
} }
@ -87,6 +85,10 @@ export class DataProviderService {
this.dataProviderInfo.tabs.push({"name": "Related Data Providers", "content": "relatedDatasourcesTab"}); this.dataProviderInfo.tabs.push({"name": "Related Data Providers", "content": "relatedDatasourcesTab"});
} }
if(this.dataProviderInfo.tabsInTypes.statisticsTab.has(data[1].classid)) {
this.dataProviderInfo.tabs.push({"name": "Statistics", "content": "statisticsTab"});
}
this.dataProviderInfo.tabs.push({"name": "Metrics", "content": "metricsTab"}); this.dataProviderInfo.tabs.push({"name": "Metrics", "content": "metricsTab"});
if(this.dataProviderInfo.resultTypes.collectedFrom.has(data[1].classid)) { if(this.dataProviderInfo.resultTypes.collectedFrom.has(data[1].classid)) {

View File

@ -42,9 +42,8 @@ export class DatasetService {
this._cache.set(key, res); this._cache.set(key, res);
}) })
.map(res => this.parseDatasetInfo(res)); .map(res => this.parseDatasetInfo(res));
} }
private handleError (error: Response) { private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure // in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console // instead of just logging it to the console

View File

@ -66,6 +66,9 @@
} }
} }
</script> </script>
<!--script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script-->
<!-- End of Google sitelinks search markup--> <!-- End of Google sitelinks search markup-->
<style> <style>
.custom-autocomplete .uk-nav-autocomplete > li > a:hover { .custom-autocomplete .uk-nav-autocomplete > li > a:hover {