diff --git a/deploy/beta-properties.json b/deploy/beta-properties.json
index ea55d5f..c4eb537 100644
--- a/deploy/beta-properties.json
+++ b/deploy/beta-properties.json
@@ -8,7 +8,7 @@
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
"statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
- "statisticsFrameNewAPIURL": "",
+ "statisticsFrameNewAPIURL": "http://marilyn.athenarc.gr:8080/stats-api/",
"useNewStatistisTool":false,
"claimsAPIURL" : "https://beta.services.openaire.eu/claims/rest/claimsService/",
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
@@ -53,7 +53,6 @@
"cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
-
"adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools",
"adminToolsCommunity" :"connect",
@@ -97,6 +96,7 @@
"searchLinkToAdvancedOrps" : "/search/advanced/other",
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
+
"sendMailUrl": "https://beta.services.openaire.eu/uoa-admin-tools/sendMail/",
"notifyForNewManagers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewManagers/",
"notifyForNewSubscribers": "https://beta.services.openaire.eu/uoa-admin-tools/notifyForNewSubscribers/",
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index e8fbb19..aeea6d3 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -101,10 +101,11 @@ export class AppComponent {
}
public buildMenu(communityId: string) {
- var community = null;
+ let community = null;
this.community = null;
this._communitiesService.getCommunitiesState().subscribe (
communities => {
+
if(communities.length === 0 && communityId !== null && communityId !== '') {
return;
}
@@ -161,7 +162,10 @@ export class AppComponent {
this.menuItems.push(
{
rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
- items: []
+ items: [
+ new MenuItem("","Start linking","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
+ new MenuItem("","Learn more",this.properties.claimsInformationLink,"",false,[],[],{})
+ ]
});
if(isCommunityManager){
this.menuItems.push(
diff --git a/src/app/claims/directLinking/directLinking.component.ts b/src/app/claims/directLinking/directLinking.component.ts
index cab1416..8fd8842 100644
--- a/src/app/claims/directLinking/directLinking.component.ts
+++ b/src/app/claims/directLinking/directLinking.component.ts
@@ -1,29 +1,29 @@
-import {Component, Input} from '@angular/core';
-import {Observable} from 'rxjs/Observable';
-import {ActivatedRoute, Router} from '@angular/router';
+import {Component} from '@angular/core';
+import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
- selector: 'openaire-directLinking',
- template: ` `
+ selector: 'openaire-directLinking',
+ template: `
+ `
})
export class OpenaireDirectLinkingComponent {
- communityId:string;
- constructor (
- private route: ActivatedRoute,
- private _router: Router
+ communityId: string;
- ) {
- this.route.data
- .subscribe((data: { envSpecific: any }) => {
- this.route.queryParams.subscribe(
- communityId => {
- this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
- if(!this.communityId) {
- this.communityId = communityId['communityId'];
- }
- });
- });
+ constructor(private route: ActivatedRoute) {
- }
+ }
+
+ public ngOnInit() {
+ this.route.data
+ .subscribe((data: { envSpecific: any }) => {
+ this.route.queryParams.subscribe(
+ communityId => {
+ this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
+ if (!this.communityId) {
+ this.communityId = communityId['communityId'];
+ }
+ })
+ });
+ }
}
diff --git a/src/app/claims/linking/linkingGeneric.component.ts b/src/app/claims/linking/linkingGeneric.component.ts
index 93a01e3..fab2341 100644
--- a/src/app/claims/linking/linkingGeneric.component.ts
+++ b/src/app/claims/linking/linkingGeneric.component.ts
@@ -1,6 +1,5 @@
-import {Component, Input} from '@angular/core';
-import {Observable} from 'rxjs/Observable';
-import {ActivatedRoute, Router} from '@angular/router';
+import {Component} from '@angular/core';
+import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
@@ -10,11 +9,7 @@ import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
})
export class OpenaireLinkingComponent {
communityId:string;
- constructor (
- private route: ActivatedRoute,
- private _router: Router
-
- ) {
+ constructor (private route: ActivatedRoute) {
this.route.data
.subscribe((data: { envSpecific: any }) => {
this.route.queryParams.subscribe(
diff --git a/src/app/login/user.component.ts b/src/app/login/user.component.ts
index 3c34e57..360e770 100644
--- a/src/app/login/user.component.ts
+++ b/src/app/login/user.component.ts
@@ -15,96 +15,92 @@ import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-user',
template: `
-
+
-
-
+
+
-
-
-
For this action you have to login and subscribe to research community.
- Login and Subscribe here .
+
+
For this action you have to login and subscribe to the research community.
+ Login and Subscribe here .
-
Subscribing to community....
-
An error occured while trying to subscribe to community....
+
Subscribing to community....
+
An error occured while trying to subscribe to community....
-
-
- This action requires authentication.
-
- Please sign in to continue.
-
-
-
-
-
-
- `
+
+ This action requires authentication.
+
+ Please sign in to continue.
+
+
+
+
+
+
+
+ `
})
export class OpenaireUserComponent {
- @ViewChild(UserComponent) usercomponent: UserComponent;
- @ViewChild(SubscribeComponent) subscribe: SubscribeComponent;
- properties: EnvProperties;
+ @ViewChild(UserComponent) usercomponent:UserComponent;
+ @ViewChild(SubscribeComponent) subscribe:SubscribeComponent;
+ properties:EnvProperties;
communityId = null;
- subscribeLoading: boolean = false;
- subscribeError: boolean = false;
- isSubscribed: boolean = false;
+ subscribeLoading:boolean = false;
+ subscribeError:boolean = false;
+ isSubscribed:boolean = false;
public server: boolean = true;
-
+ loggedIn:boolean = false;
constructor(private _subscribeService: SubscribeService,
- private _emailService: EmailService, private route: ActivatedRoute) {
- }
-
+ private _emailService: EmailService, private route: ActivatedRoute){}
public ngOnInit() {
- if (typeof document !== 'undefined') {
+ if( typeof document !== 'undefined') {
this.server = false;
+ this.loggedIn = Session.isLoggedIn();
}
this.route.data
.subscribe((data: { envSpecific: any }) => {
this.route.queryParams.subscribe(
communityId => {
- this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
- if (!this.communityId) {
+ this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
+ if(!this.communityId) {
this.communityId = communityId['communityId'];
}
+ if(this.subscribe.subscribed){
+ this.usercomponent.redirect();
+ }
});
});
- }
- login() {
+ }
+ login(){
this.usercomponent.logIn();
}
-
- subscribeTo() {
- if (this.subscribe && this.communityId) {
+ subscribeTo(){
+ if(this.subscribe && this.communityId){
this.subscribeLoading = true;
this.subscribe.subscribe();
+
}
}
-
- afterSubscibeEvent($event) {
+ afterSubscibeEvent($event){
var res = $event.value;
this.subscribeLoading = false;
- if (res == "ok") {
+ this.isSubscribed = this.subscribe.subscribed;
+ if(res == "ok"){
this.isSubscribed = true;
this.usercomponent.redirect();
- } else {
+ }else{
this.subscribeError = true;
}
}
- loginAndsubscribe() {
-
- }
}
diff --git a/src/app/utils/subscribe/subscribe.component.ts b/src/app/utils/subscribe/subscribe.component.ts
index 3151d67..3d05b67 100644
--- a/src/app/utils/subscribe/subscribe.component.ts
+++ b/src/app/utils/subscribe/subscribe.component.ts
@@ -71,6 +71,11 @@ export class SubscribeComponent {
this._subscribeService.isSubscribedToCommunity(this.properties, this.communityId, email).subscribe (
res => {
this.subscribed = res;
+ if(this.subscribed){
+ this.subscribeEvent.emit({
+ value: "ok"
+ });
+ }
},
error => {
this.handleError("Error getting response if email: "+email+" is subscribed to community with id: "+this.communityId, error);
diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json
index f759f0e..e08d852 100644
--- a/src/assets/env-properties.json
+++ b/src/assets/env-properties.json
@@ -56,7 +56,7 @@
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
- "adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
+ "adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
"adminToolsCommunity" :"connect",
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
@@ -99,7 +99,6 @@
"searchLinkToAdvancedOrps" : "/search/advanced/other",
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
- "searchLinkToAdvancedPeople" : "/search/advanced/people",
"sendMailUrl": "http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/sendMail/",
@@ -116,5 +115,7 @@
"reCaptchaSiteKey": "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
- "admins" : ["kostis30fylloy@gmail.com"]
+ "admins" : ["kostis30fylloy@gmail.com","argirok@di.uoa.gr"],
+ "lastIndexUpdate": "2019-05-16",
+ "indexInfoAPI": "http://beta.services.openaire.eu/openaire/info/"
}
diff --git a/src/index.html b/src/index.html
index 0847aeb..6fd75c8 100644
--- a/src/index.html
+++ b/src/index.html
@@ -44,9 +44,9 @@
-
-
-
+
+
+
diff --git a/src/styles.css b/src/styles.css
index 1927393..5f69d4f 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -1,2 +1,2 @@
/* You can add global styles to this file, and also import other style files */
-@import '~@angular/material/prebuilt-themes/indigo-pink.css';
+@import "~@angular/material/prebuilt-themes/indigo-pink.css";