pass properly boolean variables
	add all related subitems route in rootmenuitem (for enabling/disabling routes)
Footer:
	pass properly boolean variables
Content: update text

Organization/about/stats pages: add route enabled guard

Search/find: use input for placeholder text

Stats: add loading

Manage button: add svg instead of uikit




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@54209 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-12-07 14:21:38 +00:00
parent bb6a567681
commit dc07897cd8
14 changed files with 102 additions and 59 deletions

View File

@ -17,9 +17,9 @@ import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
`],
template: `
<navbar *ngIf= "properties && showMenu && !community" portal="connect" onlyTop=false [userMenuItems]=userMenuItems [menuItems]=menuItems
<navbar *ngIf= "properties && showMenu && !community" portal="connect" [onlyTop]=false [userMenuItems]=userMenuItems [menuItems]=menuItems
[(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl" [(cookieDomain)]="properties.cookieDomain" [showMenu]=showMenu></navbar>
<navbar *ngIf= "properties && showMenu && community" portal="connect" onlyTop=false [(communityId)]="community.id" [userMenuItems]=userMenuItems [menuItems]=menuItems
<navbar *ngIf= "properties && showMenu && community" portal="connect" [onlyTop]=false [(communityId)]="community.id" [userMenuItems]=userMenuItems [menuItems]=menuItems
[(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl" [(cookieDomain)]="properties.cookieDomain" [(community)]=community [showMenu]=showMenu></navbar>
<div class="custom-main-content" >
@ -36,7 +36,7 @@ import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
</span></a>
</cookie-law>
<bottom *ngIf= "isClient && showMenu && !community" [menuItems]=bottomMenuItems></bottom>
<bottom *ngIf= "isClient && community" [showSocialButton] = "false" [showMenu]=false [showDnet] =false showOpenaire=true [(communityId)]="community.id" [(APIUrl)]="properties.adminToolsAPIURL" [menuItems]=bottomMenuItems ></bottom>
<bottom *ngIf= "isClient && showMenu && community" [showSocialButton] = "false" [showMenu]=false [showDnet]=false [showOpenaire]=true [(communityId)]="community.id" [(APIUrl)]="properties.adminToolsAPIURL" [menuItems]=bottomMenuItems ></bottom>
`
@ -68,6 +68,8 @@ export class AppComponent {
var community = null;
this.community = null;
this.showMenu = false;
// var test:MenuItem = new MenuItem("monitor","Monitor","","/monitor",false,[],["/monitor"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId});
// test.
this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe (
communities => {
@ -81,7 +83,7 @@ export class AppComponent {
// {rootItem: new MenuItem("dashboard","Dashboard","","/",false,[],[],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
// items: []
// },
{rootItem: new MenuItem("search","Search","","/search/find",false,[],["/search/find"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
{rootItem: new MenuItem("search","Search","","/search/find",false,[],["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
@ -90,7 +92,7 @@ export class AppComponent {
new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
]},
{
rootItem: new MenuItem("monitor","Monitor","","/monitor",false,[],["/statistics"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
rootItem: new MenuItem("monitor","Monitor","","/monitor",false,[],["/monitor"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
items: []
},
{
@ -117,9 +119,9 @@ export class AppComponent {
new MenuItem("","Blog","https://blogs.openaire.eu/","",false,[],[],{}),
new MenuItem("","Contact us","https://beta.openaire.eu/contact-us","",false,[],[],{})
];
if(this.properties.showContent){
this.bottomMenuItems.push(new MenuItem("","Content Policy","","/content",false,[],[],{}));
}
// if(this.properties.showContent){
// this.bottomMenuItems.push(new MenuItem("","Content Policy","","/content",false,[],[],{}));
// }
this.userMenuItems =[
// new MenuItem("","My links","","/myclaims",false,[],["/myclaims"],(data['communityId'] && typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:data['communityId']}),
];
@ -138,7 +140,6 @@ export class AppComponent {
];
}
this.showMenu = true;
});

View File

@ -1,50 +1,79 @@
<div class=" uk-section uk-margin-small-top tm-middle uk-container" id="tm-main">
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
<div class="uk-container uk-margin-bottom">
<div class="uk-article-title custom-article-title">
Content policy
</div>
<div>
<p>The Research Community Dashboard (RCD) shows a "slice" of the OpenAIRE Graph that is relevant to the research community.</p>
<p>Relevant research results are specified by users and OpenAIRE algorithms.</p>
<div class="uk-margin-left">
<span class="uk-text-large uk-text-primary">Users </span>
<p>
OpenAIRE builds an open scholarly graph of research products (publications, datasets, software and other types of research products), linked to each other and to fundings, projects and organizations.
The information used to build the graph is collected from the OpenAIRE network of content providers<!-- (currently composed of more than 400 institutional repositories, 8,000 Open Access journals, 70 dataset archives and 20 funders)-->
and is inferred by OpenAIRE algorithms. OpenAIRE algorithms are capable of detecting duplicates and mining information from the full-texts of Open Access publications.
For more details about the construction of the graph, please check <a href="https://beta.openaire.eu/aggregation-and-content-provision-workflows" target="_blank" >here</a>.
</p>
<p>
Thanks to the Research Community Dashboard (RCD), researchers have a dedicated view of the OpenAIRE graph where only the research products relevant to the community are searchable and browsable.<br>
There are several ways to decide if a research product is relevant to a given community:
</p>
<p class="uk-margin-left">
<!-- <span class="uk-text-large uk-text-primary">Users </span> -->
<!-- <div class="uk-margin-left"> -->
<b>Links:</b> Users can "claim" that a research result is relevant to a community via the
<a routerLinkActive="uk-link" routerLink="/participate/claim" >Link</a> functionality of the Research community dashboard.
<br>
For more details about linking functionality, please check <a href="https://beta.openaire.eu/linking" target="_blank" >here</a>.
<!-- </div> -->
</p>
<div class="uk-margin-left uk-margin-top">
<!-- <span class="uk-text-large uk-text-primary">OpenAIRE algorithms </span><br> -->
<b>OpenAIRE algorithms:</b> Community managers can configure the OpenAIRE algorithms, in order to automatically assign research products to a community based on:
<div class="uk-margin-left">
Users can "claim" that a research result is relevant for a community via the "Linking" functionality of the RCD;
<div class="uk-alert uk-alert-info">Coming soon: the community managers will be able to curate the user claims to identify and reject "wrong" claims</div>
</div>
</div>
<div class="uk-margin-left">
<span class="uk-text-large uk-text-primary">OpenAIRE algorithms </span><br>
<div class="uk-margin-left">
OpenAIRE algorithms automatically assign research results to the dashboard based on the configuration specified by the community managers. Specifically:
<ul class=" uk-list ">
<ul class=" uk-list uk-list-bullet ">
<li>
<b>Content providers:</b> research results collected from the selected content providers are assigned to the community
<div class="uk-alert uk-alert-info">Coming soon: configuration of additional criteria to select subsets of research results collected from a provider</div>
The content providers they have been collected from. <br>Examples: all research products collected from "NeuroVault" are relevant to the Neuroinformatics community; all research products collected from the LINDAT/CLARIN repository are relevant to the CLARIN research initiative.
</li>
<li>
<b>Projects:</b> research results linked to the selected projects are assigned to the community
<div class="uk-alert uk-alert-info">Coming soon: configuration of additional criteria to select subsets of research results linked to projects</div>
The projects they have been produced in. <br>Examples: all research products of the project "Tara Mediterranee" are relevant to the European Marine Science community; all research products of the project "ARIADNE" are relevant to the Digital Humanities and Cultural Heritage community.
</li>
<li>
<b>Subjects:</b> research results whose keywords include at least one of the specified subjects are assigned to the community (only for RCD serving research communities)
<div class="uk-alert uk-alert-info">Coming soon: GUI support for the selection of keywords from standard subject classification vocabularies and taxonomies</div>
The subjects and keywords (only for RCD serving research communities). <br>Examples: all research products having "SDG11 - Sustainable cities and communities" among the subjects are relevant to the Greek Sustainable Development Solutions Network community; all research products with subject "agriculture" are relevant to the AgInfra community
</li>
<li>
<b>Acknowledgment statements:</b> found in full-texts (only for RCDs serving research infrastructures/initiatives)
</ul>
</div>
</div>
</div>
<div class="uk-margin-left uk-margin-top">
<b>Acknowledgement statements:</b> Acknowledgement statements found in full-texts (only for RCDs serving research infrastructures/initiatives)
</div>
<!--div class="uk-margin-top">
Stay tuned to discover the new criteria that will be supported in the next releases of the OpenAIRE-Connect Research Community Dashboard:
<div class="uk-margin-left ">
<ul class=" uk-list uk-list-bullet ">
<li>
Community managers will be able to specify additional criteria to select subsets of research results collected from a content provider or linked to projects.
</li>
<li>
GUI support for the selection of keywords from standard subject classification vocabularies and taxonomies
</li>
</ul>
</div>
</div-->
</div>
</div>
</div>

View File

@ -1,8 +1,8 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { RouterModule } from '@angular/router';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
import {ContentPageComponent} from './contentPage.component';
import {ContentPageRoutingModule} from './content-routing.module';
@ -10,12 +10,12 @@ import {ContentPageRoutingModule} from './content-routing.module';
@NgModule({
imports: [
ContentPageRoutingModule
ContentPageRoutingModule, RouterModule
],
declarations: [
ContentPageComponent
],
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
providers:[FreeGuard,PreviousRouteRecorder],
exports: [
ContentPageComponent
]

View File

@ -4,11 +4,12 @@ import { RouterModule } from '@angular/router';
import {AboutPageComponent} from './aboutPage.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: AboutPageComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
{ path: '', component: AboutPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -7,7 +7,7 @@ import{EnvProperties} from '../../openaireLibrary/utils/properties/env-propertie
@Component({
selector: 'about',
template: `
<div class=" uk-section uk-margin-small-top tm-middle uk-container" id="tm-main">
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
<div class="uk-container uk-margin-bottom">
<html-page></html-page>
</div>

View File

@ -4,11 +4,12 @@ import { RouterModule } from '@angular/router';
import {OrganizationsPageComponent} from './organizationsPage.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OrganizationsPageComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
{ path: '', component: OrganizationsPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -7,7 +7,7 @@ import{EnvProperties} from '../../openaireLibrary/utils/properties/env-propertie
@Component({
selector: 'organizations',
template: `
<div class=" uk-section uk-margin-small-top tm-middle uk-container" id="tm-main">
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
<div class="uk-container uk-margin-bottom">
<html-page></html-page>
</div>

View File

@ -6,7 +6,7 @@ import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-search-find',
template: `
<search-find [(connectCommunityId)]=connectCommunityId [piwikSiteId]="piwikSiteId"></search-find>
<search-find [(connectCommunityId)]=connectCommunityId [piwikSiteId]="piwikSiteId" formPlaceholderText="Search for research results"></search-find>
`,
})
export class OpenaireSearchComponent{

View File

@ -4,11 +4,12 @@ import { RouterModule } from '@angular/router';
import{StatisticsComponent} from './statistics.component';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: StatisticsComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
{ path: '', component: StatisticsComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -3,7 +3,11 @@
<div class="uk-container uk-margin-bottom">
<article class="uk-article ">
<div *ngIf="!statisticsSum || (statisticsSum.total_projects==0) || (allowedEntities.length == 0)" class="uk-alert uk-alert-info" style="margin-top:40px; padding-left:40px;">
<div *ngIf="status == errorCodes.LOADING" class="uk-animation-fade uk-width-1-1" role="alert"><span class="loading-gif uk-align-center"></span></div>
<div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning" style="margin-top:40px; padding-left:40px;">
An error occured
</div>
<div *ngIf=" (status == errorCodes.DONE) && (!statisticsSum || !statisticsDisplay || ((statisticsSum.total_projects==0) && (allowedEntities.length == 0)))" class="uk-alert uk-alert-info" style="margin-top:40px; padding-left:40px;">
No statistics are available for {{ communityId.toUpperCase() }}
</div>
<div *ngIf="statisticsSum && (statisticsSum.total_projects>0) && statisticsDisplay" class="uk-margin uk-margin-top">

View File

@ -25,6 +25,7 @@ import {availableCharts, availableEntitiesMap, StatisticsDisplay,
} from "../openaireLibrary/connect/statistics/statisticsEntities";
import {PiwikHelper} from '../utils/piwikHelper';
@Component({
selector: 'statistics',
templateUrl: 'statistics.component.html',
@ -47,8 +48,8 @@ export class StatisticsComponent {
allowedCharts: Map<string,string[]> = new Map<string,string[]>();
allowedEntities: string[] = [];
statisticsSum: StatisticsSummary;
statisticsDisplay: StatisticsDisplay;
statisticsSum: StatisticsSummary =null;
statisticsDisplay: StatisticsDisplay = null;
chartsUrlMap: {};
displayedTimeline: string;
@ -58,7 +59,8 @@ export class StatisticsComponent {
displayedProjectChart: string;
displayedProjectChartUrl: string;
displayedEntity: string;
public errorCodes:ErrorCodes = new ErrorCodes();
status = null;
constructor (
private route: ActivatedRoute,
private _router: Router,
@ -122,6 +124,7 @@ export class StatisticsComponent {
createStatisticsObjects() {
// console.log(" Stats! "+ this.properties.statisticsAPIURL);
this.status = this.errorCodes.LOADING;
this._statisticsService.getCommunityStatistics(this.properties.statisticsAPIURL,this.communityId).subscribe (
res => {
console.log('statisticsSum is:');
@ -130,12 +133,11 @@ export class StatisticsComponent {
this.statisticsSum["orp"]=res["other"];
}
console.log(this.statisticsSum);
this.getDisplayOptions();
},
error => {
console.log(error);
},
() => {
this.getDisplayOptions();
this.status = this.errorCodes.ERROR;
});
}
@ -144,13 +146,14 @@ export class StatisticsComponent {
.subscribe(
res => {
this.statisticsDisplay = res;
this.createChartUrlMap();
this.getCommunityInfo();
this.status = this.errorCodes.DONE;
},
error => {
console.log(error);
},
() => {
this.createChartUrlMap();
this.getCommunityInfo();
this.status = this.errorCodes.ERROR;
}
);
}

View File

@ -16,6 +16,7 @@ import {ConfigurationService} from '../openaireLibrary/utils/configuratio
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({
imports: [
@ -27,7 +28,7 @@ import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previo
StatisticsForDashboardComponent
],
providers: [
FreeGuard, PreviousRouteRecorder, ConfigurationService,
IsRouteEnabled, FreeGuard, PreviousRouteRecorder, ConfigurationService,
PiwikService, CommunityService, CommunitiesService, StatisticsService, TitleCasePipe
],
exports: [

View File

@ -10,7 +10,9 @@ import {Session} from '../../openaireLibrary/login/utils/helper.class';
<a *ngIf="isManager" [href]="'https://beta.admin.connect.openaire.eu/dashboard?communityId='+communityId" class="uk-button uk-button-default uk-margin-left" target="_blank" >
<span class="uk-margin-small-right uk-icon" uk-icon="cog"> </span>Manage</a>
<span class="uk-margin-small-right uk-icon"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="cog" ratio="1"><circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg></span>
Manage</a>
`

View File

@ -36,7 +36,7 @@
"piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=",
"piwikSiteId" : "80",
"loginUrl" :"http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
"loginUrl" :"http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
"logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",