more checks and changes in publication landing page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@43089 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2016-06-30 13:31:06 +00:00
parent 0a78e4e143
commit 9de98a9f6f
3 changed files with 165 additions and 152 deletions

View File

@ -9,6 +9,9 @@ import {LinkingComponent} from './claimPages/linking/linking.component';
import {LinkingHomeComponent} from './claimPages/linking/linkingHome.component';
import {MyClaimsComponent} from './claimPages/myClaims/myClaims.component';
import {ProjectComponent} from './landingPages/project/project.component';
import {PublicationComponent} from './landingPages/publication/publication.component';
import 'rxjs/Rx';
@ -69,7 +72,9 @@ import 'rxjs/Rx';
{ path: '/search', component: SearchComponent, name: 'Search' },
// { path: '/upload', component: BasicProgressbar, name: 'Upload' },
{ path: '/linking', component: LinkingComponent, name: 'Linking' },
{ path: '/my-claims', component: MyClaimsComponent, name: 'MyClaims' }
{ path: '/my-claims', component: MyClaimsComponent, name: 'MyClaims' },
{ path: '/project', component: ProjectComponent, name: 'Project' },
{ path: '/publication', component: PublicationComponent, name: 'Publication' }
])
export class App {

View File

@ -13,39 +13,29 @@ import { RouteParams} from '@angular/router-deprecated';
<div *ngIf="publicationInfo != null">
<div class="publication">
<h2>{{publicationInfo.title}}</h2>
<p>
{{publicationInfo.authors}} ({{publicationInfo.date}})
</p>
<div class="row" *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">
<!--span>Publisher:</span>
<span>{{publicationInfo.publisher}}</span-->
<div class="col-md-1"> Publisher: </div>
<span>{{publicationInfo.publisher}}</span>
<!--div class="col-md-11"> {{publicationInfo.publisher}} </div-->
</div>
<div class="row" *ngIf="publicationInfo.journal != undefined && publicationInfo.journal != ''">
<!--span>Journal:</span>
<span>{{publicationInfo.journal}}</span-->
<div class="col-md-1"> Journal: </div>
<span>{{publicationInfo.journal}}</span>
<!--div class="col-md-11"> {{publicationInfo.journal}} </div-->
</div>
<div class="row" *ngIf="publicationInfo.languages != undefined && publicationInfo.languages != 'Undetermined' && publicationInfo.languages != ''">
<!--span>Languages:</span>
<span>{{publicationInfo.languages}}</span-->
<div class="col-md-1"> Languages: </div>
<span>{{publicationInfo.languages}}</span>
<!--div class="col-md-11"> {{publicationInfo.languages}} </div-->
</div>
<div class="row" *ngIf="publicationInfo.types != undefined">
<div class="col-md-1"> Types: </div>
<span>{{publicationInfo.types}}</span>
</div>
<div class="row" *ngIf="publicationInfo.subjects != undefined">
<!--span>Subjects:</span>
<span>{{publicationInfo.subjects}}</span-->
<div class="col-md-1"> Subjects: </div>
<span> {{publicationInfo.subjects}} </span>
</div>
@ -56,9 +46,9 @@ import { RouteParams} from '@angular/router-deprecated';
</span>
</div>
<div >
<!--div class="col-md-12"-->
<blockquote>
{{publicationInfo.description}}
<!--/div-->
</blockquote>
</div>
@ -70,10 +60,13 @@ import { RouteParams} from '@angular/router-deprecated';
</ul>
<div class="tab-content">
<div id="citationsTab" class="tab-pane fade in active">
<h3>REFERENCES</h3>
<div *ngIf="publicationInfo.references != undefined">
<div *ngFor="let item of publicationInfo.references">
<div *ngIf="item != undefined">
<p *ngIf="item['url'] != undefined">
<a class="custom-external" href="{{item['url']}}" target="_blank">
{{item['text']}}
@ -82,46 +75,35 @@ import { RouteParams} from '@angular/router-deprecated';
<p *ngIf="item['url'] == undefined">
{{item['text']}}
</p>
</div>
</div>
</div>
</div>
<div id="dataTab" class="tab-pane fade">
<h3>dataTab</h3>
<h3>RELATED RESEARCH DATA</h3>
<!--div *ngFor="let key of publicationInfo.relatedResearchData.keys()">
<span *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.relatedResearchData.get(key)[0]}}
</a>
</span>
<span>
({{publicationInfo.relatedResearchData.get(key)[1]}})
</span>
<span class="badge">{{publicationInfo.relatedResearchData.get(key)[2]}}</span>
</div>
</div-->
<table id="inferredTable" class="display inferredTable dataTable no-footer" role="grid">
<table id="inferredTable">
<thead>
<tr role="row">
<th class="sorting" tabindex="0" aria-controls="inferredTable" rowspan="1" colspan="1" aria-label="Title: activate to sort column ascending">Title</th>
<th class="sorting_desc" tabindex="0" aria-controls="inferredTable" rowspan="1" colspan="1" style="width: 93px;" aria-sort="descending" aria-label="Trust: activate to sort column ascending">Trust</th>
<th>Title</th>
<th>Trust</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let key of publicationInfo.relatedResearchData.keys()" role="row">
<tbody *ngIf="publicationInfo.relatedResearchData != undefined">
<tr *ngFor="let key of publicationInfo.relatedResearchData.keys()">
<td *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.relatedResearchData.get(key)[0]}}
</a>
({{publicationInfo.relatedResearchData.get(key)[1]}})
</td>
<!--td class="badge">{{publicationInfo.relatedResearchData.get(key)[2]}}</td-->
<td class="progress">
<td>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "publicationInfo.relatedResearchData.get(key)[2]">
{{publicationInfo.relatedResearchData.get(key)[2]}}
</div>
</div>
</td>
</tr>
@ -130,25 +112,78 @@ import { RouteParams} from '@angular/router-deprecated';
</div>
<div id="similarTab" class="tab-pane fade">
<h3>similarTab</h3>
<p>Some content in similarTab.</p>
<h3>SIMILAR PUBLICATIONS</h3>
<table id="similarTable">
<thead>
<tr>
<th>Title</th>
<th>Trust</th>
</tr>
</thead>
<tbody *ngIf="publicationInfo.similarPublications != undefined">
<tr *ngFor="let key of publicationInfo.similarPublications.keys()">
<td *ngIf="key != undefined">
<a class="custom-external" href="{{key}}" target="_blank">
{{publicationInfo.similarPublications.get(key)[0]}}
</a>
({{publicationInfo.similarPublications.get(key)[1]}})
</td>
<td class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "publicationInfo.similarPublications.get(key)[2]">
{{publicationInfo.similarPublications.get(key)[2]}}
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="bioentitiesTab" class="tab-pane fade">
<p> YO men </p>
<h3>BIOENTITIES</h3>
<table id="bioentitiesTable">
<thead>
<tr>
<th>Bio Entity</th>
<th>Site Name</th>
</tr>
</thead>
<div *ngIf="publicationInfo.bioentities != undefined">
<tbody *ngFor="let key of publicationInfo.bioentities.keys()">
<div *ngIf="publicationInfo.bioentities.get(key) != undefined">
<tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()">
<td *ngIf="keyIn != undefined">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" target="_blank">
{{keyIn}}
</a>
</td>
<td>
{{key}}
</td>
</tr>
</div>
</tbody>
</div>
</table>
</div>
</div>
</div>
<!--p>
<span>Identifiers:</span>
<span *ngFor="let key of publicationInfo.identifiers.keys()">
{{key}}:
<span *ngFor="let value of publicationInfo.identifiers.values()">{{value}}</span>
,
</span>
</p-->
<div class="mainFunctionsBlock">
<div class="functionsSection" *ngIf="publicationInfo.collectedFrom != undefined">
<h3 class="title">Collected from</h3>
<ul class="line" *ngFor="let key of publicationInfo.collectedFrom.keys()">
<li class="collectedFrom">
<a href="{{publicationInfo.collectedFrom.get(key)}}">
{{key}}
</a>
</li>
</ul>
</div>
</div>
</div>

View File

@ -85,13 +85,10 @@ export class PublicationService {
}
if(mydata['funding'].hasOwnProperty("funding_level_2")) {
funding = mydata['funding']['funding_level_2'].content;
//this.publicationInfo.fundedByProjects.get(mydata.code)[4] = mydata['funding']['funding_level_2'].content;
} else if(mydata['funding'].hasOwnProperty("funding_level_1")) {
funding = mydata['funding']['funding_level_1'].content;
//this.publicationInfo.fundedByProjects.get(mydata.code)[4] = mydata['funding']['funding_level_1'].content;
} else if(mydata['funding'].hasOwnProperty("funding_level_0")) {
funding = mydata['funding']['funding_level_0'].content;
//this.publicationInfo.fundedByProjects.get(mydata.code)[4] = mydata['funding']['funding_level_0'].content;
}
if(funding != undefined) {
@ -107,16 +104,6 @@ export class PublicationService {
if(this.publicationInfo.relatedResearchData == undefined) {
this.publicationInfo.relatedResearchData = new Map<string, string[]>();//Array<{}>();
}
/*
this.publicationInfo.relatedResearchData[counter] = {};
this.publicationInfo.relatedResearchData[counter]['title'] = mydata['title'].content;
this.publicationInfo.relatedResearchData[counter]['year'] = mydata.dateofacceptance.substring(0,4);
this.publicationInfo.relatedResearchData[counter]['trust'] = Math.round(mydata.trust*100)+"%";
let link = "https://beta.openaire.eu/search/publication?articleId=";
this.publicationInfo.relatedResearchData[counter]['link'] = link+mydata['to'].content;
counter++;
*/
let url = "https://beta.openaire.eu/search/publication?articleId="+mydata['to'].content;
this.publicationInfo.relatedResearchData.set(url, new Array<string>());
@ -137,14 +124,6 @@ export class PublicationService {
}
}
}
//for(let i in this.publicationInfo.relatedResearchData) {
// for(let key in this.publicationInfo.relatedResearchData[i]) {
// console.info(key+" : "+this.publicationInfo.relatedResearchData[i][key]);
// }
//}
}
if(data[3] != null) {
@ -214,7 +193,6 @@ export class PublicationService {
if(data[5] != null) {
this.publicationInfo.journal = data[5].content;
//console.info(this.publicationInfo.journal);
}
if(data[6] != null) {
@ -338,11 +316,6 @@ export class PublicationService {
}
console.info("\n");
/*for(let i in this.publicationInfo.relatedResearchData) {
for(let key in this.publicationInfo.relatedResearchData[i]) {
console.info(key+" : "+this.publicationInfo.relatedResearchData[i][key]);
}
}*/
console.info("\nRELATED RESEARCH DATA:");
if(this.publicationInfo.relatedResearchData != undefined) {
this.publicationInfo.relatedResearchData.forEach(function (value, key, map) {