Landing pages: remove bootstrap class - add uikit class (under construction, Dataproviders still in bootstrap) | Login do not store password

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45058 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2017-01-04 14:41:42 +00:00
parent bb12a21fe3
commit e2aee4cadb
20 changed files with 384 additions and 339 deletions

View File

@ -3,19 +3,19 @@
<div *ngIf="datasetInfo != null" > <div *ngIf="datasetInfo != null" >
<showTitle [title]="datasetInfo.title"></showTitle> <showTitle [title]="datasetInfo.title"></showTitle>
</div> </div>
<div *ngIf="warningMessage.length > 0" class="alert 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="alert alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
</div> </div>
<div class="row row-offcanvas row-offcanvas-right" > <div class="uk-grid" >
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" *ngIf="datasetInfo != null"> <div class="uk-width-2-3" *ngIf="datasetInfo != null">
<div> <div>
<showAuthors [authors]="datasetInfo.authors"></showAuthors> <showAuthors [authors]="datasetInfo.authors"></showAuthors>
<span *ngIf="datasetInfo.date != ''">({{datasetInfo.date}})</span> <span *ngIf="datasetInfo.date != ''">({{datasetInfo.date}})</span>
</div> </div>
<dl class="dl-horizontal"> <dl class="uk-description-list-horizontal">
<dt *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">Publisher: </dt> <dt *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">Publisher: </dt>
<dd *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">{{datasetInfo.publisher}}</dd> <dd *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">{{datasetInfo.publisher}}</dd>
<dt *ngIf="datasetInfo.type != undefined"> Type: </dt> <dt *ngIf="datasetInfo.type != undefined"> Type: </dt>
@ -31,45 +31,45 @@
</dl> </dl>
<blockquote *ngIf="datasetInfo.description != ''"> <blockquote *ngIf="datasetInfo.description != ''">
<div class="text-justify" [innerHTML]="datasetInfo.description"></div> <div class="uk-text-justify" [innerHTML]="datasetInfo.description"></div>
</blockquote> </blockquote>
<div class="uk-text-right"> <div class="uk-text-right">
<button (click)=" toggleClaimResult()" class = "btn btn-primary btn-xs" >Add Research Results</button> <button (click)=" toggleClaimResult()" class = "uk-button uk-button-primary uk-button-mini" >Add Research Results</button>
</div> </div>
<inline-claim-result inlineType ="dataset" [inlineEntity]="result" (datasetAdded)="resultsAdded($event,false)" (publicationAdded)="resultsAdded($event,true)" ></inline-claim-result> <inline-claim-result inlineType ="dataset" [inlineEntity]="result" (datasetAdded)="resultsAdded($event,false)" (publicationAdded)="resultsAdded($event,true)" ></inline-claim-result>
<ul class="nav nav-tabs"> <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
<li class="active"> <li class="uk-active">
<a data-toggle="tab" href="#relatedTab"> <a href="#relatedTab">
Related Research Results Related Research Results
<span *ngIf="datasetInfo.relatedResearchResults == undefined" class="badge">0</span> <span *ngIf="datasetInfo.relatedResearchResults == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="datasetInfo.relatedResearchResults != undefined" class="badge"> <span *ngIf="datasetInfo.relatedResearchResults != undefined" class="uk-badge uk-badge-notification">
{{datasetInfo.relatedResearchResults.length}} {{datasetInfo.relatedResearchResults.length}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation"> <li>
<a data-toggle="tab" href="#similarTab"> <a href="#similarTab">
Similar Research Results Similar Research Results
<span *ngIf="datasetInfo.similarResearchResults == undefined" class="badge">0</span> <span *ngIf="datasetInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="datasetInfo.similarResearchResults != undefined" class="badge"> <span *ngIf="datasetInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification">
{{datasetInfo.similarResearchResults.length}} {{datasetInfo.similarResearchResults.length}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation" (click)="getMetrics()"> <li (click)="getMetrics()">
<a data-toggle="tab" href="#metricsTab"> <a href="#metricsTab">
Metrics Metrics
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <ul id="tab-content" class="uk-switcher uk-margin">
<div id="relatedTab" class="tab-pane fade in active panel-body"> <li id="relatedTab">
<div *ngIf="datasetInfo.relatedResearchResults == undefined" class = "alert alert-info " > <div *ngIf="datasetInfo.relatedResearchResults == undefined" class = "uk-alert" >
There are no related research results There are no related research results
</div> </div>
<div *ngIf="datasetInfo.relatedResearchResults != undefined"> <div *ngIf="datasetInfo.relatedResearchResults != undefined">
@ -79,10 +79,10 @@
</p> </p>
<tabTable [info]="datasetInfo.relatedResearchResults"></tabTable> <tabTable [info]="datasetInfo.relatedResearchResults"></tabTable>
</div> </div>
</div> </li>
<div id="similarTab" class="tab-pane fade panel-body"> <li id="similarTab">
<div *ngIf="datasetInfo.similarResearchResults == undefined" class = "alert alert-info " > <div *ngIf="datasetInfo.similarResearchResults == undefined" class = "uk-alert" >
There are no similar research results There are no similar research results
</div> </div>
<div *ngIf="datasetInfo.similarResearchResults != undefined"> <div *ngIf="datasetInfo.similarResearchResults != undefined">
@ -93,9 +93,12 @@
<tabTable [info]="datasetInfo.similarResearchResults"></tabTable> <tabTable [info]="datasetInfo.similarResearchResults"></tabTable>
</div> </div>
</li>
<li id="metricsTab">
<div *ngIf="metrics == undefined" class = "uk-alert uk-alert-warning">
Metrics are currently unavailable
</div> </div>
<div id="metricsTab" class="tab-pane fade panel-body"> <dl *ngIf="metrics != undefined" class="uk-description-list-horizontal uk-block">
<dl *ngIf="metrics != undefined" class="dl-horizontal well">
<dt>TotalDownloads: </dt> <dt>TotalDownloads: </dt>
<dd>{{metrics.totalDownloads}}</dd> <dd>{{metrics.totalDownloads}}</dd>
<dt>TotalViews: </dt> <dt>TotalViews: </dt>
@ -106,42 +109,43 @@
class="uk-table uk-table-striped"> class="uk-table uk-table-striped">
<thead> <thead>
<tr> <tr>
<th class="text-center">ID</th> <th class="uk-text-center">ID</th>
<th class="text-center">Number Of Downloads</th> <th class="uk-text-center">Number Of Downloads</th>
<th class="text-center">Number Of Views</th> <th class="uk-text-center">Number Of Views</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let key of metrics.infos.keys()"> <tr *ngFor="let key of metrics.infos.keys()">
<td class="text-center"> <td class="uk-text-center">
<a href="{{metrics.infos.get(key).url}}" target="_blank"> <a href="{{metrics.infos.get(key).url}}" target="_blank">
{{key}} {{key}}
</a> </a>
</td> </td>
<td class="text-center"> <td class="uk-text-center">
{{metrics.infos.get(key).numOfDownloads}} {{metrics.infos.get(key).numOfDownloads}}
</td> </td>
<td class="text-center"> <td class="uk-text-center">
{{metrics.infos.get(key).numOfViews}} {{metrics.infos.get(key).numOfViews}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </li>
</div> </ul>
</div> </div>
<div class="col-xs-12 col-sm-3" *ngIf="datasetInfo != null"> <div class="uk-width-1-3" *ngIf="datasetInfo != null">
<ul class="list-group mainFunctionsBlock"> <ul class="uk-list uk-list-striped mainFunctionsBlock">
<li class="list-group-item"> <li>
<dl class="functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt >Share - Bookmark</dt> <dt >Share - Bookmark</dt>
<dd> <dd>
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="list-group-item" *ngIf="datasetInfo.collectedFrom != undefined"> <li></li>
<dl class="functionsSection"> <li *ngIf="datasetInfo.collectedFrom != undefined">
<dl class="uk-description-list-line functionsSection">
<dt>Collected from</dt> <dt>Collected from</dt>
<dd *ngFor="let item of datasetInfo.collectedFrom"> <dd *ngFor="let item of datasetInfo.collectedFrom">
<a href="{{item['url']}}"> <a href="{{item['url']}}">
@ -150,8 +154,8 @@
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="list-group-item" *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0"> <li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0">
<dl class="functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt class="title">Download from</dt> <dt class="title">Download from</dt>
<dd class="line" *ngFor="let key of datasetInfo.downloadFrom.keys()"> <dd class="line" *ngFor="let key of datasetInfo.downloadFrom.keys()">
<div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1"> <div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
@ -170,11 +174,11 @@
</li> </li>
<li class="list-group-item"> <li>
<dl class="functionsSection" *ngIf="datasetInfo.fundedByProjects != undefined"> <dl class="uk-description-list-line functionsSection" *ngIf="datasetInfo.fundedByProjects != undefined">
<dt class="title">Funded By</dt> <dt class="title">Funded By</dt>
<dd <dd
title="{{item['title']}} data-uk-tooltip="{pos:'right'}" title="{{item['title']}}
| Project Code: {{item['acronym']}} | Project Code: {{item['acronym']}}
| Funder: {{item['funderName']}} ({{item['funderShortname']}}) | Funder: {{item['funderName']}} ({{item['funderShortname']}})
| Funding: {{item['funding']}}" | Funding: {{item['funding']}}"
@ -192,14 +196,14 @@
</a> </a>
</dd> </dd>
</dl> </dl>
<dl class="functionsSection" *ngIf="datasetInfo.fundedByProjects == undefined"> <dl class="uk-description-list-line functionsSection" *ngIf="datasetInfo.fundedByProjects == undefined">
<dt class="title">Funded By</dt> <dt class="title">Funded By</dt>
</dl> </dl>
<button (click)="toggleClaimProject()" class = "btn btn-primary btn-xs" >Add Projects</button> <button (click)="toggleClaimProject()" class = "uk-button uk-button-primary uk-button-mini" >Add Projects</button>
<inline-claim-project *ngIf="result " inlineType ="dataset" [inlineEntity]="result" (projectAdded)="projectAdded($event)" ></inline-claim-project> <inline-claim-project *ngIf="result " inlineType ="dataset" [inlineEntity]="result" (projectAdded)="projectAdded($event)" ></inline-claim-project>
</li> </li>
<li class="list-group-item"> <li>
<dl class="functionsSection" *ngIf="datasetInfo.contexts != undefined"> <dl class="uk-description-list-line functionsSection" *ngIf="datasetInfo.contexts != undefined">
<dt class="title">Related to </dt> <dt class="title">Related to </dt>
<dd class="line" *ngFor="let item of datasetInfo.contexts"> <dd class="line" *ngFor="let item of datasetInfo.contexts">
<span *ngIf = "!item['inline']" > <span *ngIf = "!item['inline']" >
@ -214,10 +218,10 @@
</mark> </mark>
</dd> </dd>
</dl> </dl>
<dl class="functionsSection" *ngIf="datasetInfo.contexts == undefined"> <dl class="uk-description-list-line functionsSection" *ngIf="datasetInfo.contexts == undefined">
<dt class="title">Related to </dt> <dt class="title">Related to </dt>
</dl> </dl>
<button (click)=" toggleClaimContext()" class = "btn btn-primary btn-xs" >Add Concepts</button> <button (click)=" toggleClaimContext()" class = "uk-button uk-button-primary uk-button-mini" >Add Concepts</button>
<inline-claim-context inlineType ="dataset" [inlineEntity]="result" (contextAdded)="contextAdded($event)" ></inline-claim-context> <inline-claim-context inlineType ="dataset" [inlineEntity]="result" (contextAdded)="contextAdded($event)" ></inline-claim-context>
</li> </li>
</ul> </ul>

View File

@ -82,9 +82,6 @@ export class DatasetComponent {
}, },
err => { err => {
console.log(err); console.log(err);
console.info("error");
this.errorMessage = 'No dataset metrics found';
} }
); );
} }

View File

@ -12,50 +12,50 @@
</p> </p>
</h3> </h3>
</div> </div>
<div *ngIf="warningMessage.length > 0" class="alert 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="alert alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
</div> </div>
<div class="row row-offcanvas row-offcanvas-right" > <div class="uk-grid">
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" *ngIf="organizationInfo != null"> <div class="uk-width-2-3" *ngIf="organizationInfo != null">
<dl class="dl-horizontal"> <dl class="uk-description-list-horizontal">
<dt *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">Name: </dt> <dt *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">Name: </dt>
<dd *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">{{organizationInfo.name}}</dd> <dd *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">{{organizationInfo.name}}</dd>
<dt *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">Country: </dt> <dt *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">Country: </dt>
<dd *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">{{organizationInfo.country}}</dd> <dd *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">{{organizationInfo.country}}</dd>
</dl> </dl>
<ul class="nav nav-tabs"> <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
<li class="active"> <li class="uk-active">
<a data-toggle="tab" href="#projectsTab"> <a href="#projectsTab">
Projects Projects
<span class="badge">{{projectsNum}}</span> <span class="uk-badge uk-badge-notification">{{projectsNum}}</span>
</a> </a>
</li> </li>
<li (click)="searchDataprovidersInit()" role="presentation"> <li (click)="searchDataprovidersInit()">
<a data-toggle="tab" href="#dataProvidersTab"> <a href="#dataProvidersTab">
Data Providers Data Providers
<!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span> <!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span>
<span *ngIf="organizationInfo.dataProviders != undefined" class="badge"> <span *ngIf="organizationInfo.dataProviders != undefined" class="badge">
{{organizationInfo.dataProviders.length}} {{organizationInfo.dataProviders.length}}
</span--> </span-->
<span class="badge"> <span class="uk-badge uk-badge-notification">
{{searchDataprovidersComponent.searchUtils.totalResults}} {{searchDataprovidersComponent.searchUtils.totalResults}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation" (click)="getMetrics()"> <li (click)="getMetrics()">
<a data-toggle="tab" href="#metricsTab"> <a href="#metricsTab">
Metrics Metrics
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <ul id="tab-content" class="uk-switcher uk-margin">
<div id="projectsTab" class="tab-pane fade in active panel-body"> <li id="projectsTab">
<div *ngIf="organizationInfo.projects == undefined" class = "alert alert-info " > <div *ngIf="organizationInfo.projects == undefined" class = "uk-alert">
There are no projects There are no projects
</div> </div>
@ -74,22 +74,20 @@
<div *ngIf="organizationInfo.projects.size > 1"> <div *ngIf="organizationInfo.projects.size > 1">
<strong>Filter by Funder</strong> <strong>Filter by Funder</strong>
<ul class="list-inline"> <span *ngFor="let key of organizationInfo.projects.keys()" class="checkbox">
<li *ngFor="let key of organizationInfo.projects.keys()" class="checkbox">
<label> <label>
<!--input type="checkbox" (ngModelChange)="changeType(key)"--> <!--input type="checkbox" (ngModelChange)="changeType(key)"-->
<input type="checkbox" (click)='handleClick(key)'> <input type="checkbox" (click)='handleClick(key)'>
{{key}} {{key}}
</label> </label>
</li> </span>
</ul>
</div> </div>
<table class="uk-table uk-table-striped" *ngIf="organizationInfo.projects.size > 0"> <table class="uk-table uk-table-striped" *ngIf="organizationInfo.projects.size > 0">
<thead> <thead>
<tr> <tr>
<th class="text-center">Funder</th> <th class="uk-text-center">Funder</th>
<th class="text-center">Project Name</th> <th class="uk-text-center">Project Name</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let key of organizationInfo.projects.keys()"> <tbody *ngFor="let key of organizationInfo.projects.keys()">
@ -109,11 +107,11 @@
</table> </table>
</div> </div>
</div> </li>
<div id="dataProvidersTab" class="tab-pane fade panel-body"> <li id="dataProvidersTab">
<!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders--> <!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders-->
<div *ngIf="searchDataprovidersComponent.searchUtils.totalResults == 0" class = "alert alert-info " > <div *ngIf="searchDataprovidersComponent.searchUtils.totalResults == 0" class = "uk-alert">
There are no dataproviders There are no dataproviders
</div> </div>
@ -126,27 +124,30 @@
<div class = "uk-text-right" *ngIf = "searchDataprovidersComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "searchDataprovidersComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{searchDataprovidersComponent.searchUtils.totalResults}} results</a></div>
<search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.status"></search-result> <search-result [(results)]="searchDataprovidersComponent.results" [(status)]= "searchDataprovidersComponent.status"></search-result>
</div> </div>
</li>
<li id="metricsTab">
<div *ngIf="metrics == undefined" class = "uk-alert uk-alert-warning">
Metrics are currently unavailable
</div> </div>
<div id="metricsTab" class="tab-pane fade panel-body"> <div class="uk-block">
<div class="well">
<b>Views: </b>{{metrics}} <b>Views: </b>{{metrics}}
</div> </div>
</div> </li>
</div> </ul>
</div> </div>
<div class="col-xs-12 col-sm-3" *ngIf="organizationInfo != null"> <div class="uk-width-1-3" *ngIf="organizationInfo != null">
<ul class="uk-list"> <ul class="uk-list uk-list-striped">
<li class="list-group-item"> <li>
Share - Bookmark Share - Bookmark
</li> </li>
<li role="separator" class="list-group-item divider"></li> <li></li>
<div *ngIf="organizationInfo.projects != undefined"> <div *ngIf="organizationInfo.projects != undefined">
<li *ngFor="let key of organizationInfo.projects.keys()" class="list-group-item"> <li *ngFor="let key of organizationInfo.projects.keys()">
<a (click)="exportProjects(key)">Download projects report (CSV) for {{key}}</a> <a (click)="exportProjects(key)">Download projects report (CSV) for {{key}}</a>
</li> </li>
<li *ngFor="let key of organizationInfo.projects.keys()" class="list-group-item"> <li *ngFor="let key of organizationInfo.projects.keys()">
<a (click)="exportPublications(key)">Download publications report (CSV) for {{key}}</a> <a (click)="exportPublications(key)">Download publications report (CSV) for {{key}}</a>
</li> </li>
</div> </div>

View File

@ -119,9 +119,6 @@ export class OrganizationComponent {
}, },
err => { err => {
console.log(err); console.log(err);
console.info("error");
this.errorMessage = 'No organization metrics found';
} }
); );
} }

View File

@ -4,14 +4,14 @@
<div *ngIf="personInfo != null"> <div *ngIf="personInfo != null">
<h3>{{personInfo.fullname}}</h3> <h3>{{personInfo.fullname}}</h3>
</div> </div>
<div *ngIf="warningMessage.length > 0" class="alert 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="alert alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
</div> </div>
<div class="row row-offcanvas row-offcanvas-right" > <div class="uk-grid">
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" *ngIf="personInfo != null"> <div class="uk-width-2-3" *ngIf="personInfo != null">
<dl class="dl-horizontal"> <dl class="uk-description-list-horizontal">
<dt *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">Last name: </dt> <dt *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">Last name: </dt>
<dd *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">{{personInfo.secondnames}}</dd> <dd *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">{{personInfo.secondnames}}</dd>
<dt *ngIf="personInfo.firstname != undefined && personInfo.firstname != ''">First name: </dt> <dt *ngIf="personInfo.firstname != undefined && personInfo.firstname != ''">First name: </dt>
@ -20,29 +20,29 @@
<dd *ngIf="personInfo.country != undefined && personInfo.country != ''">{{personInfo.country}}</dd> <dd *ngIf="personInfo.country != undefined && personInfo.country != ''">{{personInfo.country}}</dd>
</dl> </dl>
<ul class="nav nav-tabs"> <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
<li class="active"> <li class="uk-active">
<a data-toggle="tab" href="#publicationsTab"> <a href="#publicationsTab">
Publications Publications
<span class="badge"> <span class="uk-badge uk-badge-notification">
{{searchPublicationsComponent.searchUtils.totalResults}} {{searchPublicationsComponent.searchUtils.totalResults}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation" (click)="searchDatasetsInit()"> <li (click)="searchDatasetsInit()">
<a data-toggle="tab" href="#researchDataTab"> <a href="#researchDataTab">
Research Data Research Data
<span class="badge"> <span class="uk-badge uk-badge-notification">
{{searchDatasetsComponent.searchUtils.totalResults}} {{searchDatasetsComponent.searchUtils.totalResults}}
</span> </span>
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <ul id="tab-content" class="uk-switcher uk-margin">
<div id="publicationsTab" class="tab-pane fade in active panel-body"> <li id="publicationsTab">
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "alert alert-info " > <div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "uk-alert">
There are no publications There are no publications
</div> </div>
@ -55,10 +55,10 @@
<div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div>
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result> <search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
</div> </div>
</div> </li>
<div id="researchDataTab" class="tab-pane fade panel-body"> <li id="researchDataTab">
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "alert alert-info " > <div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
There are no research data There are no research data
</div> </div>
@ -71,13 +71,13 @@
<div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div>
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result> <search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
</div> </div>
</div> </li>
</div> </ul>
</div> </div>
<div class="col-xs-12 col-sm-3" *ngIf="personInfo != null"> <div class="uk-width-1-3" *ngIf="personInfo != null">
<ul class="uk-list"> <ul class="uk-list uk-list-striped">
<li class="list-group-item"> <li>
Share - Bookmark Share - Bookmark
</li> </li>
</ul> </ul>

View File

@ -5,15 +5,15 @@
<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>
</div> </div>
<div *ngIf="warningMessage.length > 0" class="alert 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="alert alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
</div> </div>
<div class="row row-offcanvas row-offcanvas-right" > <div class="uk-grid" >
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" *ngIf="projectInfo != null"> <div class="uk-width-2-3" *ngIf="projectInfo != null">
<dl class="dl-horizontal"> <dl class="uk-description-list-horizontal">
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt> <dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
<dd *ngIf="projectInfo.title != undefined && projectInfo.title != ''">{{projectInfo.title}}</dd> <dd *ngIf="projectInfo.title != undefined && projectInfo.title != ''">{{projectInfo.title}}</dd>
<dt *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">Funding: </dt> <dt *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">Funding: </dt>
@ -32,8 +32,7 @@
<dd *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">{{projectInfo.specialClause39}}</dd> <dd *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">{{projectInfo.specialClause39}}</dd>
<dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt> <dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt>
<dd *ngIf="projectInfo.organizations != undefined"> <dd *ngIf="projectInfo.organizations != undefined">
<ul class="list-inline"> <span *ngFor="let key of projectInfo.organizations.keys() let i=index">
<li *ngFor="let key of projectInfo.organizations.keys()">
<a *ngIf="projectInfo.organizations.get(key) != null && <a *ngIf="projectInfo.organizations.get(key) != null &&
projectInfo.organizations.get(key) != ''" projectInfo.organizations.get(key) != ''"
href="{{(projectInfo.organizations.get(key))}}" target="_blank"> href="{{(projectInfo.organizations.get(key))}}" target="_blank">
@ -43,9 +42,8 @@
projectInfo.organizations.get(key) == ''"> projectInfo.organizations.get(key) == ''">
{{key}} {{key}}
</span> </span>
<span>;</span> <span *ngIf="i<projectInfo.organizations.size-1">,</span>
</li> </span>
</ul>
</dd> </dd>
<dt *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">More information:</dt> <dt *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">More information:</dt>
<dd *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''"> <dd *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">
@ -55,43 +53,43 @@
</dd> </dd>
</dl> </dl>
<div class="uk-text-right"> <div class="uk-text-right">
<button (click)=" toggleClaimResult()" class = "btn btn-primary btn-xs" >Add Research Results</button> <button (click)=" toggleClaimResult()" class = "uk-button uk-button-primary uk-button-mini" >Add Research Results</button>
</div> </div>
<inline-claim-result inlineType ="'project'" [inlineEntity]=project (datasetAdded)="resultsAdded($event,false)" (publicationAdded)="resultsAdded($event,true)" ></inline-claim-result> <inline-claim-result inlineType ="'project'" [inlineEntity]=project (datasetAdded)="resultsAdded($event,false)" (publicationAdded)="resultsAdded($event,true)" ></inline-claim-result>
<ul class="nav nav-tabs"> <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}">
<li class="active"> <li class="uk-active">
<a data-toggle="tab" href="#publicationsTab"> <a href="#publicationsTab">
Publications Publications
<span class="badge"> <span class="uk-badge uk-badge-notification">
{{searchPublicationsComponent.searchUtils.totalResults}} {{searchPublicationsComponent.searchUtils.totalResults}}
</span> </span>
</a> </a>
</li> </li>
<li (click)="searchDatasetsInit()"> <li (click)="searchDatasetsInit()">
<a data-toggle="tab" href="#researchDataTab"> <a href="#researchDataTab">
Research Data Research Data
<span class="badge"> <span class="uk-badge uk-badge-notification">
{{searchDatasetsComponent.searchUtils.totalResults}} {{searchDatasetsComponent.searchUtils.totalResults}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a data-toggle="tab" href="#statisticsTab"> <a href="#statisticsTab">
Statistics Statistics
</a> </a>
</li> </li>
<li role="presentation" (click)="getMetrics()"> <li (click)="getMetrics()">
<a data-toggle="tab" href="#metricsTab"> <a href="#metricsTab">
Metrics Metrics
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <ul id="tab-content" class="uk-switcher uk-margin">
<div id="publicationsTab" class="tab-pane fade in active panel-body"> <li id="publicationsTab">
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "alert alert-info " > <div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0" class = "uk-alert" >
There are no publications There are no publications
</div> </div>
@ -104,10 +102,10 @@
<div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "searchPublicationsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{searchPublicationsComponent.searchUtils.totalResults}} results</a></div>
<search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result> <search-result [(results)]="searchPublicationsComponent.results" [(status)]= "searchPublicationsComponent.status"></search-result>
</div> </div>
</div> </li>
<div id="researchDataTab" class="tab-pane fade panel-body"> <li id="researchDataTab">
<div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "alert alert-info " > <div *ngIf="searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
There are no research data There are no research data
</div> </div>
@ -120,10 +118,10 @@
<div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "searchDatasetsComponent.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{searchDatasetsComponent.searchUtils.totalResults}} results</a></div>
<search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result> <search-result [(results)]="searchDatasetsComponent.results" [(status)]= "searchDatasetsComponent.status"></search-result>
</div> </div>
</div> </li>
<div id="statisticsTab" class="tab-pane fade panel-body"> <li id="statisticsTab">
<div *ngIf="projectInfo.statistics == undefined" class = "alert alert-info "> <div *ngIf="projectInfo.statistics == undefined" class = "uk-alert">
There are no statistics There are no statistics
</div> </div>
<div *ngIf="projectInfo.statistics != undefined"> <div *ngIf="projectInfo.statistics != undefined">
@ -132,39 +130,42 @@
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
</p> </p>
</div> </div>
</li>
<li id="metricsTab">
<div *ngIf="metrics == undefined" class = "uk-alert uk-alert-warning">
Metrics are currently unavailable
</div> </div>
<div id="metricsTab" class="tab-pane fade panel-body"> <div class="uk-block">
<div class="well">
<b>Views: </b>{{metrics}} <b>Views: </b>{{metrics}}
</div> </div>
<i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="350"></i-frame> <i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="350"></i-frame>
</div> </li>
</div> </ul>
</div> </div>
<div class="col-xs-12 col-sm-3" *ngIf="projectInfo != null"> <div class="uk-width-1-3" *ngIf="projectInfo != null">
<ul class="uk-list"> <ul class="uk-list uk-list-striped">
<li class="list-group-item"> <li>
Share - Bookmark Share - Bookmark
</li> </li>
<li role="separator" class="list-group-item divider"></li> <li></li>
<li class="list-group-item"> <li>
<a data-toggle="tab" href="{{linkToSearchPublications}}"> <a href="{{linkToSearchPublications}}">
View all Project Publications View all Project Publications
</a> </a>
</li> </li>
<li class="list-group-item"> <li>
<a data-toggle="tab" href=""> <a href="">
Dynamically incorporate publications in your site (HTML) Dynamically incorporate publications in your site (HTML)
</a> </a>
</li> </li>
<li class="list-group-item"> <li>
<a data-toggle="tab" href=""> <a href="">
View {{projectInfo.funder}} progress report (HTML) View {{projectInfo.funder}} progress report (HTML)
</a> </a>
</li> </li>
<li class="list-group-item"> <li>
<export <export
[linkname]="'Download '+ projectInfo.funder +' progress report (CSV)'" [linkname]="'Download '+ projectInfo.funder +' progress report (CSV)'"
[filename]="'publications.csv'"> [filename]="'publications.csv'">
@ -177,9 +178,9 @@
</a> </a>
</div> </div>
</li--> </li-->
<li class="list-group-item"> <li>
<div class="text-center"> <div class="uk-text-center">
<a class="btn btn-primary" href="/deposit-publications"> <a class="uk-button uk-button-primary uk-button-mini" href="/deposit-publications">
Deposit Publications Deposit Publications
</a> </a>
</div> </div>

View File

@ -141,9 +141,6 @@ export class ProjectComponent{
}, },
err => { err => {
console.log(err); console.log(err);
console.info("error");
this.errorMessage = 'No project metrics found';
} }
); );
} }

View File

@ -1,22 +1,21 @@
<div>
<div class="container publication"> <div class="container publication">
<div class="container-header" > <div class="container-header" >
<div *ngIf="publicationInfo != null"> <div *ngIf="publicationInfo != null">
<showTitle [title]="publicationInfo.title"></showTitle> <showTitle [title]="publicationInfo.title"></showTitle>
</div> </div>
<div *ngIf="warningMessage.length > 0" class="alert 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="alert alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
</div> </div>
<div class="row row-offcanvas row-offcanvas-right" > <div class="uk-grid">
<div class="col-xs-6 col-sm-9 sidebar-offcanvas" *ngIf="publicationInfo != null"> <div class="uk-width-2-3" *ngIf="publicationInfo != null">
<div> <div>
<showAuthors [authors]="publicationInfo.authors"></showAuthors> <showAuthors [authors]="publicationInfo.authors"></showAuthors>
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span> <span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
</div> </div>
<dl class="dl-horizontal"> <dl class="uk-description-list-horizontal">
<dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt> <dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt>
<dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd> <dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd>
<dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal['journal'] != ''">Journal: </dt> <dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal['journal'] != ''">Journal: </dt>
@ -50,64 +49,64 @@
</dl> </dl>
<blockquote *ngIf="publicationInfo.description != ''"> <blockquote *ngIf="publicationInfo.description != ''">
<div class="text-justify" [innerHTML]="publicationInfo.description"></div> <div class="uk-text-justify" [innerHTML]="publicationInfo.description"></div>
</blockquote> </blockquote>
<div class="uk-text-right"> <div class="uk-text-right">
<button (click)=" toggleClaimResult()" class = "btn btn-primary btn-xs" >Add Research Results</button> <button (click)=" toggleClaimResult()" class = "uk-button uk-button-primary uk-button-mini" >Add Research Results</button>
</div> </div>
<inline-claim-result inlineType ="publication" [inlineEntity]="result" (datasetAdded)="resultsAdded($event,false)" (publicationAdded)="resultsAdded($event,true)" ></inline-claim-result> <inline-claim-result inlineType ="publication" [inlineEntity]="result" (datasetAdded)="resultsAdded($event,false)" (publicationAdded)="resultsAdded($event,true)" ></inline-claim-result>
<ul class="nav nav-tabs"> <ul class="uk-tab" data-uk-tab="{connect:'#tab-content'}" (click)="myfunct()">
<li class="active"> <li class="uk-active">
<a data-toggle="tab" href="#citationsTab"> <a href="#citationsTab">
References References
<span *ngIf="publicationInfo.references == undefined" class="badge">0</span> <span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.references != undefined" class="badge"> <span *ngIf="publicationInfo.references != undefined" class="uk-badge uk-badge-notification">
{{publicationInfo.references.length}} {{publicationInfo.references.length}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation"> <li>
<a data-toggle="tab" href="#relatedTab"> <a href="#relatedTab">
Related Research Results Related Research Results
<span *ngIf="publicationInfo.relatedResearchResults == undefined" class="badge">0</span> <span *ngIf="publicationInfo.relatedResearchResults == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.relatedResearchResults != undefined" class="badge"> <span *ngIf="publicationInfo.relatedResearchResults != undefined" class="uk-badge uk-badge-notification">
{{publicationInfo.relatedResearchResults.length}} {{publicationInfo.relatedResearchResults.length}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation"> <li>
<a data-toggle="tab" href="#similarTab"> <a href="#similarTab">
Similar Research Results Similar Research Results
<span *ngIf="publicationInfo.similarResearchResults == undefined" class="badge">0</span> <span *ngIf="publicationInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.similarResearchResults != undefined" class="badge"> <span *ngIf="publicationInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification">
{{publicationInfo.similarResearchResults.length}} {{publicationInfo.similarResearchResults.length}}
</span> </span>
</a> </a>
</li> </li>
<li role="presentation" *ngIf="publicationInfo.bioentities != undefined"> <li *ngIf="publicationInfo.bioentities != undefined">
<a data-toggle="tab" href="#bioentitiesTab"> <a href="#bioentitiesTab">
Bioentities Bioentities
<span class="badge">{{bioentitiesNum}}</span> <span class="uk-badge uk-badge-notification">{{bioentitiesNum}}</span>
</a> </a>
</li> </li>
<li role="presentation" *ngIf="publicationInfo.software != undefined"> <li *ngIf="publicationInfo.software != undefined">
<a data-toggle="tab" href="#softwareTab"> <a href="#softwareTab">
Software Software
<span class="badge">{{publicationInfo.software.length}}</span> <span class="uk-badge uk-badge-notification">{{publicationInfo.software.length}}</span>
</a> </a>
</li> </li>
<li role="presentation" (click)="getMetrics()"> <li>
<a data-toggle="tab" href="#metricsTab"> <a id="metrtab" href="#metricsTab" (click)="getMetrics('bla')">
Metrics Metrics
</a> </a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <ul id="tab-content" class="uk-switcher uk-margin">
<div id="citationsTab" class="tab-pane fade in active panel-body"> <li id="citationsTab">
<div *ngIf="publicationInfo.references == undefined" class = "alert alert-info " > <div *ngIf="publicationInfo.references == undefined" class = "uk-alert" >
There are no references There are no references
</div> </div>
@ -146,10 +145,10 @@
<tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging> <tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging>
</div> </div>
</div> </li>
<div id="relatedTab" class="tab-pane fade panel-body"> <li id="relatedTab">
<div *ngIf="publicationInfo.relatedResearchResults == undefined" class = "alert alert-info "> <div *ngIf="publicationInfo.relatedResearchResults == undefined" class = "uk-alert">
There are no related research results There are no related research results
</div> </div>
<div *ngIf="publicationInfo.relatedResearchResults != undefined"> <div *ngIf="publicationInfo.relatedResearchResults != undefined">
@ -160,11 +159,11 @@
<tabTable [info]="publicationInfo.relatedResearchResults"></tabTable> <tabTable [info]="publicationInfo.relatedResearchResults"></tabTable>
</div> </div>
</div> </li>
<div id="similarTab" class="tab-pane fade panel-body"> <li id="similarTab">
<div *ngIf="publicationInfo.similarResearchResults == undefined" class = "alert alert-info "> <div *ngIf="publicationInfo.similarResearchResults == undefined" class = "uk-alert">
There are no similar research results There are no similar research results
</div> </div>
<div *ngIf="publicationInfo.similarResearchResults != undefined"> <div *ngIf="publicationInfo.similarResearchResults != undefined">
@ -175,8 +174,8 @@
<tabTable [info]="publicationInfo.similarResearchResults"></tabTable> <tabTable [info]="publicationInfo.similarResearchResults"></tabTable>
</div> </div>
</div> </li>
<div *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab" class="tab-pane fade panel-body"> <li *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab">
<p> <p>
The results below are discovered through our pilot algorithms. The results below are discovered through our pilot algorithms.
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
@ -184,25 +183,25 @@
<table id="bioentitiesTable" class="uk-table uk-table-striped"> <table id="bioentitiesTable" class="uk-table uk-table-striped">
<thead> <thead>
<tr> <tr>
<th class="text-center">Bio Entity</th> <th class="uk-text-center">Bio Entity</th>
<th class="text-center">Site Name</th> <th class="uk-text-center">Site Name</th>
</tr> </tr>
</thead> </thead>
<tbody *ngFor="let key of publicationInfo.bioentities.keys()"> <tbody *ngFor="let key of publicationInfo.bioentities.keys()">
<tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()"> <tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()">
<td class="text-center" *ngIf="keyIn != undefined"> <td class="uk-text-center" *ngIf="keyIn != undefined">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" target="_blank"> <a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" target="_blank">
{{keyIn}} {{keyIn}}
</a> </a>
</td> </td>
<td class="text-center"> <td class="uk-text-center">
{{key}} {{key}}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </li>
<div *ngIf="publicationInfo.software != undefined" id="softwareTab" class="tab-pane fade panel-body"> <li *ngIf="publicationInfo.software != undefined" id="softwareTab">
<p> <p>
The results below are discovered through our pilot algorithms. The results below are discovered through our pilot algorithms.
<a href="mailto:">Let us know how we are doing!</a> <a href="mailto:">Let us know how we are doing!</a>
@ -210,12 +209,12 @@
<table id="softwareTable" class="uk-table uk-table-striped"> <table id="softwareTable" class="uk-table uk-table-striped">
<thead> <thead>
<tr> <tr>
<th class="text-center">Site Name</th> <th class="uk-text-center">Site Name</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let item of publicationInfo.software"> <tr *ngFor="let item of publicationInfo.software">
<td class="text-center"> <td class="uk-text-center">
<a href="{{item.url}}" target="_blank"> <a href="{{item.url}}" target="_blank">
{{item.name}} {{item.name}}
</a> </a>
@ -223,9 +222,12 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</li>
<li id="metricsTab">
<div *ngIf="metrics == undefined" class = "uk-alert uk-alert-warning">
Metrics are currently unavailable
</div> </div>
<div id="metricsTab" class="tab-pane fade panel-body"> <dl *ngIf="metrics != undefined" class="uk-description-list-horizontal uk-block">
<dl *ngIf="metrics != undefined" class="dl-horizontal well">
<dt>TotalDownloads: </dt> <dt>TotalDownloads: </dt>
<dd>{{metrics.totalDownloads}}</dd> <dd>{{metrics.totalDownloads}}</dd>
<dt>TotalViews: </dt> <dt>TotalViews: </dt>
@ -236,22 +238,22 @@
class="uk-table uk-table-striped"> class="uk-table uk-table-striped">
<thead> <thead>
<tr> <tr>
<th class="text-center">ID</th> <th class="uk-text-center">ID</th>
<th class="text-center">Number Of Downloads</th> <th class="uk-text-center">Number Of Downloads</th>
<th class="text-center">Number Of Views</th> <th class="uk-text-center">Number Of Views</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let key of metrics.infos.keys()"> <tr *ngFor="let key of metrics.infos.keys()">
<td class="text-center"> <td class="uk-text-center">
<a href="{{metrics.infos.get(key).url}}" target="_blank"> <a href="{{metrics.infos.get(key).url}}" target="_blank">
{{key}} {{key}}
</a> </a>
</td> </td>
<td class="text-center"> <td class="uk-text-center">
{{metrics.infos.get(key).numOfDownloads}} {{metrics.infos.get(key).numOfDownloads}}
</td> </td>
<td class="text-center"> <td class="uk-text-center">
{{metrics.infos.get(key).numOfViews}} {{metrics.infos.get(key).numOfViews}}
</td> </td>
</tr> </tr>
@ -259,24 +261,25 @@
</table> </table>
<!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame--> <!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame-->
<i-frame *ngIf="metricsClicked" [url]=openaireViewsFrameUrl width="100%" height="250"></i-frame> <i-frame *ngIf="metricsClicked" [url]=openaireViewsFrameUrl width="100%" height="250"></i-frame>
</li>
</ul>
</div> </div>
</div> <div class="uk-width-1-3" *ngIf="publicationInfo != null">
</div>
<div class="col-xs-12 col-sm-3" *ngIf="publicationInfo != null">
<ul class="list-group mainFunctionsBlock"> <ul class="uk-list uk-list-striped mainFunctionsBlock">
<li class="list-group-item"> <li>
<dl class="functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt >Share - Bookmark</dt> <dt >Share - Bookmark</dt>
<dd> <dd>
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="list-group-item" *ngIf="publicationInfo.collectedFrom != undefined"> <li></li>
<dl class="functionsSection"> <li *ngIf="publicationInfo.collectedFrom != undefined">
<dl class="uk-description-list-line functionsSection">
<dt>Collected from</dt> <dt>Collected from</dt>
<dd *ngIf="showAllCollectedFrom" class="uk-text-right"> <dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;"> <a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less View less
</a> </a>
</dd> </dd>
@ -286,22 +289,22 @@
</a> </a>
</dd> </dd>
<dd *ngIf="showAllCollectedFrom" class="uk-text-right"> <dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;"> <a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllCollectedFrom && publicationInfo.collectedFrom.length > 5" class="uk-text-right"> <dd *ngIf="!showAllCollectedFrom && publicationInfo.collectedFrom.length > 5" class="uk-text-right">
<a class="text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;"> <a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View more View more
</a> </a>
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="list-group-item" *ngIf="publicationInfo.downloadFrom != undefined && publicationInfo.downloadFrom.size > 0"> <li *ngIf="publicationInfo.downloadFrom != undefined && publicationInfo.downloadFrom.size > 0">
<dl class="functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt class="title">Download from</dt> <dt class="title">Download from</dt>
<dd *ngIf="showAllDownloadFrom" class="uk-text-right"> <dd *ngIf="showAllDownloadFrom" class="uk-text-right">
<a class="text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;"> <a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View less View less
</a> </a>
</dd> </dd>
@ -311,32 +314,32 @@
{{key}} {{key}}
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;"> <span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
<a href="{{url}}"> <a href="{{url}}">
[{{i+1}}] [{{i+1}}] -- accessMode={{publicationInfo.downloadFrom.get(key)['accessMode']}}
</a> </a>
</span> </span>
</div> </div>
<a *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 1" href="{{publicationInfo.downloadFrom.get(key)['url']}}"> <a *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 1" href="{{publicationInfo.downloadFrom.get(key)['url']}}">
{{key}} {{key}} -- accessMode={{publicationInfo.downloadFrom.get(key)['accessMode']}}
</a> </a>
</div> </div>
</dd> </dd>
<dd *ngIf="showAllDownloadFrom" class="uk-text-right"> <dd *ngIf="showAllDownloadFrom" class="uk-text-right">
<a class="text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;"> <a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllDownloadFrom && publicationInfo.downloadFrom.length > 5" class="uk-text-right"> <dd *ngIf="!showAllDownloadFrom && publicationInfo.downloadFrom.length > 5" class="uk-text-right">
<a class="text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;"> <a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View more View more
</a> </a>
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="list-group-item" *ngIf="publicationInfo.publishedIn != undefined && publicationInfo.publishedIn.size > 0"> <li *ngIf="publicationInfo.publishedIn != undefined && publicationInfo.publishedIn.size > 0">
<dl class="functionsSection"> <dl class="uk-description-list-line functionsSection">
<dt class="title">Published in</dt> <dt class="title">Published in</dt>
<dd *ngIf="showAllPublishedIn" class="uk-text-right"> <dd *ngIf="showAllPublishedIn" class="uk-text-right">
<a class="text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;"> <a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
View less View less
</a> </a>
</dd> </dd>
@ -356,28 +359,28 @@
</div> </div>
</dd> </dd>
<dd *ngIf="showAllPublishedIn" class="uk-text-right"> <dd *ngIf="showAllPublishedIn" class="uk-text-right">
<a class="text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;"> <a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllPublishedIn && publicationInfo.publishedIn.length > 5" class="uk-text-right"> <dd *ngIf="!showAllPublishedIn && publicationInfo.publishedIn.length > 5" class="uk-text-right">
<a class="text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;"> <a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
View more View more
</a> </a>
</dd> </dd>
</dl> </dl>
</li> </li>
<li class="list-group-item"> <li>
<dl class="functionsSection" *ngIf="publicationInfo.fundedByProjects != undefined"> <dl class="uk-description-list-line functionsSection" *ngIf="publicationInfo.fundedByProjects != undefined">
<dt class="title">Funded By</dt> <dt class="title">Funded By</dt>
<dd *ngIf="showAllFundedBy" class="uk-text-right"> <dd *ngIf="showAllFundedBy" class="uk-text-right">
<a class="text-muted" (click)="showAllFundedBy = !showAllFundedBy;"> <a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View less View less
</a> </a>
</dd> </dd>
<dd <dd
title="{{item['title']}} data-uk-tooltip="{pos:'right'}" title="{{item['title']}}
| Project Code: {{item['code']}} | Project Code: {{item['code']}}
| Funder: {{item['funderName']}} ({{item['funderShortname']}}) | Funder: {{item['funderName']}} ({{item['funderShortname']}})
| Funding: {{item['funding']}}" | Funding: {{item['funding']}}"
@ -397,22 +400,22 @@
</div> </div>
</dd> </dd>
<dd *ngIf="showAllFundedBy" class="uk-text-right"> <dd *ngIf="showAllFundedBy" class="uk-text-right">
<a class="text-muted" (click)="showAllFundedBy = !showAllFundedBy;"> <a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects.length > 5" class="uk-text-right"> <dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects.length > 5" class="uk-text-right">
<a class="text-muted" (click)="showAllFundedBy = !showAllFundedBy;"> <a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View more View more
</a> </a>
</dd> </dd>
</dl> </dl>
<button (click)="toggleClaimProject()" class = "btn btn-primary btn-xs" >Add Projects</button> <button (click)="toggleClaimProject()" class = "uk-button uk-button-primary uk-button-mini" >Add Projects</button>
<inline-claim-project *ngIf="result " inlineType ="publication" [inlineEntity]="result" (projectAdded)="projectAdded($event)" ></inline-claim-project> <inline-claim-project *ngIf="result " inlineType ="publication" [inlineEntity]="result" (projectAdded)="projectAdded($event)" ></inline-claim-project>
</li> </li>
<li class="list-group-item"> <li>
<dl class="functionsSection" *ngIf="publicationInfo.contexts != undefined"> <dl class="uk-description-list-line functionsSection" *ngIf="publicationInfo.contexts != undefined">
<dt class="title">Related to</dt> <dt class="title">Related to</dt>
<dd class="line" *ngFor="let item of publicationInfo.contexts"> <dd class="line" *ngFor="let item of publicationInfo.contexts">
<span *ngIf = "!item['inline']" > <span *ngIf = "!item['inline']" >
@ -431,11 +434,16 @@
<dt class="title">Related to </dt> <dt class="title">Related to </dt>
</dl> </dl>
<button (click)=" toggleClaimContext()" class = "btn btn-primary btn-xs" >Add Concepts</button> <button (click)=" toggleClaimContext()" class = "uk-button uk-button-primary uk-button-mini" >Add Concepts</button>
<inline-claim-context inlineType ="publication" [inlineEntity]="result" (contextAdded)="contextAdded($event)" ></inline-claim-context> <inline-claim-context inlineType ="publication" [inlineEntity]="result" (contextAdded)="contextAdded($event)" ></inline-claim-context>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</div>
<!--script>
$("#tabs").on('change.uk.tab', function(event, area, previous){
console.info("Switcher switched to ", area);
});
</script-->

View File

@ -73,8 +73,15 @@ ngAfterContentInit() {
public activeTab: string = ''; public activeTab: string = '';
public myfunct(tab: string) { public myfunct() {
this.activeTab = tab; //this.activeTab = tab;
/*UIkit.ul($('[data-uk-tab]').on('show.uk.tab', function(event, area){
console.info("Switcher switched to ", area);
}));*/
//var elem = document.activeElement;
//console.info("id="+elem.id);
console.info("hi");
} }
getPublicationInfo(id:string) { getPublicationInfo(id:string) {
@ -110,7 +117,8 @@ ngAfterContentInit() {
} }
} }
getMetrics() { getMetrics(id: any) {
console.info(id);
this.metricsClicked = true; this.metricsClicked = true;
//this.viewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for '+this.publicationInfo.title.name+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'; //this.viewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Number of views for '+this.publicationInfo.title.name+'","yaxisheaders":["sum of views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["spline"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
this.openaireViewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly_charts(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]},{"table":"repo_view_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"repo_view_stats_monthly_charts(source)-(piwik_id)datasource_piwik(openaire_id)-(id)datasource-name","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"repo_view_stats_monthly_charts(id)-(orid)result_oids(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true'; this.openaireViewsFrameUrl = 'http://vaggelas.athenarc.gr/stats/merge.php?com=query&data=[{"table":"result_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"OpenAIRE","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"result_stats_monthly_charts(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]},{"table":"repo_view_stats_monthly_charts","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"repo_view_stats_monthly_charts(source)-(piwik_id)datasource_piwik(openaire_id)-(id)datasource-name","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":0,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":[""],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"repo_view_stats_monthly_charts(id)-(orid)result_oids(id)-(id)result-id","values":["'+this.articleId+'"],"to":"-1"}]}]&info_types=["column","column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true';
@ -122,9 +130,6 @@ ngAfterContentInit() {
}, },
err => { err => {
console.log(err); console.log(err);
console.info("error");
this.errorMessage = 'No publication metrics found';
} }
); );
} }

View File

@ -5,7 +5,7 @@ import {Component, Input} from '@angular/core';
template: ` template: `
<span *ngIf="authors != undefined"> <span *ngIf="authors != undefined">
<div *ngIf="showAll"> <div *ngIf="showAll">
<a class="text-muted" (click)="showAll = !showAll;">View less authors</a> <a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
</div> </div>
<span *ngFor="let item of authors.slice(0,30)"> <span *ngFor="let item of authors.slice(0,30)">
<a class="custom-external" href="{{item['url']}}" target="_blank"> <a class="custom-external" href="{{item['url']}}" target="_blank">
@ -21,12 +21,12 @@ import {Component, Input} from '@angular/core';
</span> </span>
</span> </span>
<span *ngIf="!showAll && authors.length > 30"> <span *ngIf="!showAll && authors.length > 30">
<a class="text-muted" (click)="showAll = !showAll;"> <a class="uk-text-muted" (click)="showAll = !showAll;">
view all {{authors.length}} authors view all {{authors.length}} authors
</a> </a>
</span> </span>
<span *ngIf="showAll"> <span *ngIf="showAll">
<a class="text-muted" (click)="showAll = !showAll;">View less authors</a> <a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
</span> </span>
</span> </span>

View File

@ -4,7 +4,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'showIdentifiers', selector: 'showIdentifiers',
template: ` template: `
<div *ngIf="identifiers != undefined && identifiers.size > 0"> <span class="uk-description-list-horizontal" *ngIf="identifiers != undefined && identifiers.size > 0">
<dt>Identifiers:</dt> <dt>Identifiers:</dt>
<dd> <dd>
<span *ngFor="let key of identifiers.keys() let i=index"> <span *ngFor="let key of identifiers.keys() let i=index">
@ -19,7 +19,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
</span> </span>
</span> </span>
</dd> </dd>
</div> </span>
` `
}) })

View File

@ -3,7 +3,7 @@ import {Component, Input} from '@angular/core';
@Component({ @Component({
selector: 'showSubjects', selector: 'showSubjects',
template: ` template: `
<div *ngIf="subjects != undefined"> <span class="uk-description-list-horizontal" *ngIf="subjects != undefined">
<dt *ngIf="(subjects != undefined && subjects.length > 0) || <dt *ngIf="(subjects != undefined && subjects.length > 0) ||
(otherSubjects != undefined && otherSubjects.size > 0)"> (otherSubjects != undefined && otherSubjects.size > 0)">
@ -29,8 +29,9 @@ import {Component, Input} from '@angular/core';
</div> </div>
</dd> </dd>
<dd class="col-md-offset-1" <dd class="uk-grid"
*ngIf="classifiedSubjects != undefined && classifiedSubjects.size > 0"> *ngIf="classifiedSubjects != undefined && classifiedSubjects.size > 0">
<div uk-push-4-5>
<a (click)="showClassifiedSbj = !showClassifiedSbj;"> <a (click)="showClassifiedSbj = !showClassifiedSbj;">
<div *ngIf="!showClassifiedSbj"> <div *ngIf="!showClassifiedSbj">
Show additional classifications Show additional classifications
@ -38,11 +39,11 @@ import {Component, Input} from '@angular/core';
</div> </div>
<div *ngIf="showClassifiedSbj"> <div *ngIf="showClassifiedSbj">
Hide additional classifications Hide additional classifications
<i class="uk-icon-plus"></i> <i class="uk-icon-minus"></i>
</div> </div>
</a> </a>
<div class="well" *ngIf="showClassifiedSbj"> <div class="uk-block" *ngIf="showClassifiedSbj">
<div *ngFor="let key of classifiedSubjects.keys()"> <div *ngFor="let key of classifiedSubjects.keys()">
Classified by OpenAIRE into Classified by OpenAIRE into
<div> <div>
@ -50,8 +51,9 @@ import {Component, Input} from '@angular/core';
</div> </div>
</div> </div>
</div> </div>
</dd>
</div> </div>
</dd>
</span>
` `
}) })

View File

@ -4,7 +4,7 @@ import {Component, Input} from '@angular/core';
@Component({ @Component({
selector: 'showTitle', selector: 'showTitle',
template: ` template: `
<h2 *ngIf="title != undefined" [class] = "title['accessMode']" [title] = "title['accessMode']" > <h2 *ngIf="title != undefined" [class] = "title['accessMode']" data-uk-tooltip [title]="title['accessMode']" >
<div *ngIf="title['url'] != undefined"> <div *ngIf="title['url'] != undefined">
<a class="custom-external" href="{{title['url']}}" target="_blank"> <a class="custom-external" href="{{title['url']}}" target="_blank">
<div [innerHTML]="title['name']"></div> <div [innerHTML]="title['name']"></div>

View File

@ -26,10 +26,11 @@ import {Component, Input} from '@angular/core';
</span> </span>
</td> </td>
<td> <td>
<div *ngIf="item['trust'] != ''" class="progress"> <div *ngIf="item['trust'] != ''" class="uk-progress uk-progress-warning">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "item['trust']"> <div class="uk-progress-bar" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "item['trust']">
{{item['trust']}} {{item['trust']}}
</div> </div>
<!--div class="uk-progress-bar" style="width: 40%;">40%</div-->
</div> </div>
<div *ngIf="item['trust'] == ''"> <div *ngIf="item['trust'] == ''">
<p>no trust found</p> <p>no trust found</p>

View File

@ -1,5 +1,5 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {Http, Response} from '@angular/http'; import {Http, Response, Headers, RequestOptions} from '@angular/http';
import {Observable} from 'rxjs/Observable'; import {Observable} from 'rxjs/Observable';
import 'rxjs/add/observable/of'; import 'rxjs/add/observable/of';
import 'rxjs/add/operator/do'; import 'rxjs/add/operator/do';
@ -15,22 +15,33 @@ export class LoginService {
constructor(private http: Http, public _cache: CacheService) {} constructor(private http: Http, public _cache: CacheService) {}
authenticate (user: User):any { authenticate (/*user: User*/username: string, password: string):any {
/*
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
let url = OpenaireProperties.getLoginAPIURL()+user.username+"&password="+user.password; return this.http.post(this.heroesUrl, { name }, options)
.map(this.extractData)
.catch(this.handleError);
*/
let url = OpenaireProperties.getLoginAPIURL()+username+"&password="+password;
let key = url; let key = url;
if (this._cache.has(key)) { if (this._cache.has(key)) {
return Observable.of(this._cache.get(key)); return Observable.of(this._cache.get(key));
} }
return this.http.get(url) return this.http.get(url)
.map(res => <any> res.json()) .map(res => <any> res.json())
.map(res => this.parseUserInfo(res['data'], user)) .map(res => this.parseUserInfo(res['data']))
.do(res => { .do(res => {
this._cache.set(key, res); this._cache.set(key, res);
}); });
} }
private parseUserInfo(data: any, user: User): User { private parseUserInfo(data: any/*, user: User*/): User {
var user: User = new User();
user.username = data.username;
user.email = data.email; user.email = data.email;
user.id = data.id; user.id = data.id;
user.fullname = data.fullname; user.fullname = data.fullname;

View File

@ -129,6 +129,7 @@ export class PublicationService {
this.publicationInfo.title = {"name": "", "url": "", "accessMode": ""}; this.publicationInfo.title = {"name": "", "url": "", "accessMode": ""};
if(data[0]['bestlicense'].hasOwnProperty("classid")) { if(data[0]['bestlicense'].hasOwnProperty("classid")) {
this.publicationInfo.title.accessMode = data[0]['bestlicense'].classid; this.publicationInfo.title.accessMode = data[0]['bestlicense'].classid;
console.info("accessmode by bestlicense = "+this.publicationInfo.title.accessMode);
} }
if(data[1] != null) { if(data[1] != null) {
@ -191,24 +192,24 @@ export class PublicationService {
} }
if(fundingData.hasOwnProperty("funding_level_2")) { if(fundingData.hasOwnProperty("funding_level_2")) {
funding = fundingData['funding_level_2'].content; funding = fundingData['funding_level_2'].name;//.content;
} else if(fundingData.hasOwnProperty("funding_level_1")) { } else if(fundingData.hasOwnProperty("funding_level_1")) {
funding = fundingData['funding_level_1'].content; funding = fundingData['funding_level_1'].name;//.content;
} else if(fundingData.hasOwnProperty("funding_level_0")) { } else if(fundingData.hasOwnProperty("funding_level_0")) {
funding = fundingData['funding_level_0'].content; funding = fundingData['funding_level_0'].name;//.content;
} }
if(funding != undefined) { if(funding != undefined) {
funding = funding.split("::"); // funding = funding.split("::");
if(this.publicationInfo.fundedByProjects[counter]['funding'] != "") { if(this.publicationInfo.fundedByProjects[counter]['funding'] != "") {
this.publicationInfo.fundedByProjects[counter]['funding'] += ", "+funding[1]; this.publicationInfo.fundedByProjects[counter]['funding'] += ", "+funding;//[1];
} else { } else {
this.publicationInfo.fundedByProjects[counter]['funding'] = funding[1]; this.publicationInfo.fundedByProjects[counter]['funding'] = funding;//[1];
}
for(let i=2; i<funding.length; i++) {
this.publicationInfo.fundedByProjects[counter]['funding'] += " | " + funding[i];
} }
// for(let i=2; i<funding.length; i++) {
// this.publicationInfo.fundedByProjects[counter]['funding'] += " | " + funding[i];
// }
} }
} }
} }
@ -313,32 +314,31 @@ export class PublicationService {
this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'] = new Array<string>(); this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'] = new Array<string>();
} }
counter2 = this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'].length; this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'].push(url);
this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['url'][counter2] = url;
if(this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'] == null) { if(this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'] == null) {
this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'] = new Array<string>(); this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'] = new Array<string>();
} }
if(instance.hasOwnProperty("licence")) { if(instance.hasOwnProperty("licence")) {
this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'][counter2] = instance['licence'].classid; this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'].push(instance['licence'].classid);
} else { } else {
this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'][counter2] = ""; this.publicationInfo.downloadFrom.get(instance['hostedby'].name)['accessMode'].push("");
} }
} else { } else {
if(data[0] != null && data[0].hasOwnProperty("source")) { if(data[0] != null && data[0].hasOwnProperty("source")) {
let key: string; let key: string;
if(Array.isArray(data[0].source)) { if(Array.isArray(data[0].source)) {
if(!this.publicationInfo.publishedIn.has(data[0]['source'][counter1])) { if(counter1==data[0].source.length) {
key = data[0]['source'][counter1]; counter1--;
} }
key = data[0]['source'][counter1];
} else { } else {
if(!this.publicationInfo.publishedIn.has(data[0]['source'])) {
key = data[0]['source']; key = data[0]['source'];
} }
} if(!this.publicationInfo.publishedIn.has(key)) {
this.publicationInfo.publishedIn.set(key, {"url": null, "accessMode": null}); this.publicationInfo.publishedIn.set(key, {"url": null, "accessMode": null});
}
if(this.publicationInfo.publishedIn.get(key)['url'] == null) { if(this.publicationInfo.publishedIn.get(key)['url'] == null) {
this.publicationInfo.publishedIn.get(key)['url'] = new Array<string>(); this.publicationInfo.publishedIn.get(key)['url'] = new Array<string>();
@ -351,22 +351,19 @@ export class PublicationService {
} }
if(instance.hasOwnProperty("licence")) { if(instance.hasOwnProperty("licence")) {
this.publicationInfo.publishedIn.get(key)['accessMode'][counter2] = instance['licence'].classid; this.publicationInfo.publishedIn.get(key)['accessMode'].push(instance['licence'].classid);
} else { } else {
this.publicationInfo.publishedIn.get(key)['accessMode'][counter2] = ""; this.publicationInfo.publishedIn.get(key)['accessMode'].push("");
} }
counter1++; counter1++;
} }
} }
if(this.publicationInfo.title != undefined) { if(this.publicationInfo.title != undefined) {
if(this.publicationInfo.title['url'] == "") {
this.publicationInfo.title['url'] = url;
}
switch (this.publicationInfo.title['accessMode']) { switch (this.publicationInfo.title['accessMode']) {
case undefined: case undefined:
this.publicationInfo.title['accessMode'] = instance['accessMode'].classid; this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url; this.publicationInfo.title['url'] = url;
console.info("accessmode by undefined = "+this.publicationInfo.title.accessMode);
break; break;
case "CLOSED": case "CLOSED":
if(instance['licence'].classid == "OPEN" || if(instance['licence'].classid == "OPEN" ||
@ -374,6 +371,7 @@ export class PublicationService {
instance['licence'].classid == "RESTRICTED") { instance['licence'].classid == "RESTRICTED") {
this.publicationInfo.title['accessMode'] = instance['licence'].classid; this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url; this.publicationInfo.title['url'] = url;
console.info("accessmode by closed = "+this.publicationInfo.title.accessMode);
} }
break; break;
case "RESTRICTED": case "RESTRICTED":
@ -381,12 +379,20 @@ export class PublicationService {
instance['licence'].classid == "EMBARGO") { instance['licence'].classid == "EMBARGO") {
this.publicationInfo.title['accessMode'] = instance['licence'].classid; this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url; this.publicationInfo.title['url'] = url;
console.info("accessmode by restricted = "+this.publicationInfo.title.accessMode);
} }
break; break;
case "EMBARGO": case "EMBARGO":
if(instance['licence'].classid == "OPEN") { if(instance['licence'].classid == "OPEN") {
this.publicationInfo.title['accessMode'] = instance['licence'].classid; this.publicationInfo.title['accessMode'] = instance['licence'].classid;
this.publicationInfo.title['url'] = url; this.publicationInfo.title['url'] = url;
console.info("accessmode by embargo= "+this.publicationInfo.title.accessMode);
}
break;
case "OPEN":
if(this.publicationInfo.title['url'] == "") {
this.publicationInfo.title['url'] = url;
console.info("title url by empty = "+this.publicationInfo.title.url);
} }
break; break;
} }
@ -554,6 +560,7 @@ export class PublicationService {
if(this.publicationInfo.title != undefined && this.publicationInfo.title['url'] == "") { if(this.publicationInfo.title != undefined && this.publicationInfo.title['url'] == "") {
this.publicationInfo.title['url'] = url; this.publicationInfo.title['url'] = url;
console.info("title url by doi = "+this.publicationInfo.title.url);
} }
} }

View File

@ -8,25 +8,28 @@ import {User} from '../utils/entities/user';
template: ` template: `
<form class="uk-form uk-width-medium-1-3"> <form *ngIf="!loggedIn" class="uk-form uk-width-medium-1-3">
<fieldset> <fieldset>
<legend>Legend</legend> <legend>Login Form</legend>
<div class="uk-form-row"> <div class="uk-form-row">
<input placeholder="Text input" type="text"> <input placeholder="Text input" type="text" name="username" [(ngModel)]="username">
</div> </div>
<div class="uk-form-row"> <div class="uk-form-row">
<input placeholder="Password input" type="password"> <input placeholder="Password input" type="password" name="password" [(ngModel)]="password">
</div> </div>
<div class="uk-form-row"> <div class="uk-form-row">
<button class="uk-button">Login</button> <button (click)="login()" class="uk-button">Login</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>
<div class="uk-alert uk-alert-success"> ... </div>
<div class="uk-alert uk-alert-warning">...</div>
<div class="uk-alert uk-alert-danger">...</div>
<div class="container-fluid"> <div *ngIf="!loggedIn && errorMessage.length > 0" class="uk-alert uk-alert-danger">{{errorMessage}}</div>
<div *ngIf="loggedIn" class="uk-alert uk-alert-success">
Hello {{user.fullname}}!
</div>
<!--div class="container-fluid">
<div *ngIf="!loggedIn"> <div *ngIf="!loggedIn">
<div *ngIf="errorMessage.length > 0" class="alert alert-danger" role="alert"> <div *ngIf="errorMessage.length > 0" class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
@ -54,18 +57,22 @@ import {User} from '../utils/entities/user';
<div *ngIf="loggedIn"> <div *ngIf="loggedIn">
Hello {{user.fullname}}! Hello {{user.fullname}}!
</div> </div>
</div> </div-->
` `
}) })
export class LoginComponent { export class LoginComponent {
public user: User; private user: User;
private loggedIn: boolean; private loggedIn: boolean;
private errorMessage: string; private errorMessage: string;
private username: string = "";
private password: string = "";
constructor( private _loginService: LoginService ) {} constructor( private _loginService: LoginService ) {}
ngOnInit() { ngOnInit() {
this.loggedIn = false;
if( typeof localStorage !== 'undefined') { if( typeof localStorage !== 'undefined') {
if(localStorage.getItem("user")) { if(localStorage.getItem("user")) {
this.user = JSON.parse(localStorage.getItem("user")); this.user = JSON.parse(localStorage.getItem("user"));
@ -73,16 +80,17 @@ export class LoginComponent {
} }
} }
if(this.loggedIn == undefined) { /*if(this.loggedIn == undefined) {
this.user = new User(); this.user = new User();
this.loggedIn = false; this.loggedIn = false;
} }*/
this.errorMessage = ""; this.errorMessage = "";
} }
login() { login() {
this._loginService.authenticate(this.user).subscribe( this._loginService.authenticate(/*this.user*/this.username, this.password).subscribe(
data => { data => {
this.user = data;
this.loggedIn = true; this.loggedIn = true;
}, },
err => { err => {

View File

@ -1,5 +1,4 @@
export class User { export class User {
password:string;
email:string; email:string;
username: string; username: string;
id: string; id: string;

View File

@ -36,13 +36,13 @@ export class OpenaireProperties {
// private static searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private static searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
// private static searchAPIURL = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; private static searchAPIURLLAst = "http://astero.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
// private searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2.0/api/"; // private searchAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2.0/api/";
// private static searchAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private static searchAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
// private static searchAPIURLLAst = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private static searchAPIURLLAst = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/"; //private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/";
// private static searchResourcesAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; // private static searchResourcesAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources";
private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/resources"; private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT-new/rest/v2/api/resources";

View File

@ -25,7 +25,7 @@
<link href="http://scoobydoo.di.uoa.gr:8083/joomlaNew/templates/yootheme_test/css/uikit.css" rel="stylesheet" type="text/css" id="theme-style-css" /--> <link href="http://scoobydoo.di.uoa.gr:8083/joomlaNew/templates/yootheme_test/css/uikit.css" rel="stylesheet" type="text/css" id="theme-style-css" /-->
<script src="http://scoobydoo.di.uoa.gr:8083/joomlaNew/media/jui/js/jquery.min.js" type="text/javascript"></script> <script src="http://beta.openaire.eu/media/jui/js/jquery.min.js" type="text/javascript"></script>
<!--uikit--> <!--uikit-->
<script src="assets/uikit-2.27.2/js/uikit.min.js" type="text/javascript"></script> <script src="assets/uikit-2.27.2/js/uikit.min.js" type="text/javascript"></script>
<link href="assets/uikit-2.27.2/css/uikit.almost-flat.min.css" rel="stylesheet" type="text/css" /> <link href="assets/uikit-2.27.2/css/uikit.almost-flat.min.css" rel="stylesheet" type="text/css" />
@ -44,6 +44,13 @@
<script src="assets/uikit-2.27.2/js/core/tab.min.js" type="text/javascript"></script> <script src="assets/uikit-2.27.2/js/core/tab.min.js" type="text/javascript"></script>
<script src="assets/uikit-2.27.2/js/core/switcher.min.js" type="text/javascript"></script> <script src="assets/uikit-2.27.2/js/core/switcher.min.js" type="text/javascript"></script>
<!--script src="assets/uikit-2.27.2/js/core/dropdown.min.js" type="text/javascript"></script--> <!--script src="assets/uikit-2.27.2/js/core/dropdown.min.js" type="text/javascript"></script-->
<link href="assets/uikit-2.27.2/css/components/progress.css" rel="stylesheet" type="text/css" />
<link href="assets/uikit-2.27.2/css/components/tooltip.css" rel="stylesheet" type="text/css" />
<script src="assets/uikit-2.27.2/js/components/tooltip.min.js" type="text/javascript"></script>
<script src="assets/uikit-2.27.2/js/core/button.min.js" type="text/javascript"></script>
<script src="assets/uikit-2.27.2/js/core/alert.min.js" type="text/javascript"></script>
<script src="assets/uikit-2.27.2/js/components/grid.min.js" type="text/javascript"></script>
<!--script src="http://scoobydoo.di.uoa.gr:8083/joomlaNew/templates/yootheme/vendor/assets/uikit/src/js/core/dropdown.js" type="text/javascript"></script--> <!--script src="http://scoobydoo.di.uoa.gr:8083/joomlaNew/templates/yootheme/vendor/assets/uikit/src/js/core/dropdown.js" type="text/javascript"></script-->